Giter VIP home page Giter VIP logo

Comments (5)

coalsont avatar coalsont commented on June 13, 2024

It is not easy for me to test this, as uninstalling the system zlib on most linux distributions would cripple many things. It seems like the CMake TARGET_LINK_LIBRARIES including ${ZLIB_LIBRARIES} at the end is supposed to handle this.

Can you put a 'message("ZLIB_LIBRARIES: " ${ZLIB_LIBRARIES}' into the Desktop/CMakeLists.txt to see what it is set to? If it points to the right location, are the arguments you mention adding to the link command currently missing, or just misplaced?

from workbench.

coalsont avatar coalsont commented on June 13, 2024

I think I misunderstood, and you have system and non-system zlib installed. In that case, both can be found, and I don't know how to tell CMake to get the compiler and linker to ignore one that exists in a location where it needs to find other libraries.

from workbench.

coalsont avatar coalsont commented on June 13, 2024

After some reading on the linker, it seems that having -L/path/to/zlib anywhere in the link command before an -lz should allow -lz to get the custom zlib instead of the system one - is it installed somewhere other than /chimerahomes/phi/lib? I'm again curious what 'message("ZLIB_LIBRARIES: " ${ZLIB_LIBRARIES})' says.

from workbench.

darthsuogles avatar darthsuogles commented on June 13, 2024

Thank you for prompt reply.
I tried it and it indeed found the non-system zlib.
You are right about the linker, just put the path before -lz would work.
I seems more like a CMake bug.

For the moment I just modified the following variable in CMakeCache.txt.
CMAKE_EXE_LINKER_FLAGS:STRING=-L<my_custom_libdir>

This is preferred lib location for my system anyway.

Thank you.

from workbench.

coalsont avatar coalsont commented on June 13, 2024

Closing for now, as a workaround exists, and it is unclear how to fix it in the CMakeLists.txt file (may be CMake bug).

from workbench.

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.