Giter Site home page Giter Site logo

Comments (1)

rikyoz avatar rikyoz commented on June 8, 2024

Hi!

First of all thank you all for providing such a nice library, it is a joy to use!

Thank you for using this library! 😄

I just ran into a little trouble when creating a shared library on linux that linked against libbit7z64.a, which I created following the default build instruction in the readme. The errors looked similar to the ones described in this SO Question. TIL about position independent code.

Interesting! I never experienced this issue, probably because this library wasn't initially meant to be used inside a shared library.

Adding set(CMAKE_POSITION_INDEPENDENT_CODE ON) to the top level CMakeLists.txt solved the issue for me.

Yeah, this fixes the issue indeed! However, as far as I understand, enabling PIC is not always desirable, so I don't think it should be enabled by default.
I just pushed a commit (a6248c0) that adds a BIT7Z_GENERATE_PIC option (OFF by default), which allows enabling the generation of Position Independent Code when building bit7z.

It seems like this would be relevant for a lot of other users, hence this issue. I wasn't sure if a pull request would be more suitable for this minor suggestion. Just let me know if you would prefer that.

No problem, it's just a minor change!
I hope to have helped.
Thank you for the feedback! 🙏

from bit7z.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.