[Nix-dev] Cmake and rpath

Lluís Batlle viriketo at gmail.com
Wed Mar 11 12:23:07 CET 2009


The cmake people thought a curious default behaviour regarding RPATHs.

They set the rpath of the compiled binaries to the directories
containing the libs needed for each binary (considering that the cmake
build includes shared libraries), so when a user wants to run a
program just compiled, it works without any LD_LIBRARY_PATH pointing
to the build directory.

When doing a "make install", cmake strips off all the RPATH of the
binaries. This strips off also the RPATH added by the ld wrapper.

Adding a -DCMAKE_SKIP_BUILD_RPATH=ON helped me avoiding that problem.

Maybe that could go to the cmake setup hook script?

Regards,
Lluís.



More information about the nix-dev mailing list