MantisBT - CMake
View Issue Details
0012326CMakeCMakepublic2011-07-09 14:032012-02-06 06:07
Modestas Vainius 
Brad King 
normalminoralways
closedfixed 
amd64Debian GNU/Linuxsid
CMake 2.8.5 
CMake 2.8.6CMake 2.8.6 
0012326: [linux multiarch] /lib/<arch> is not in implicit link directories list
This is related to 0012037. CMake does not consider /lib/<arch> as implicit link directory as it's not in CMAKE_C_IMPLICIT_LINK_DIRECTORIES nor CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES. As a result, its sometimes (wrongly) adds /lib/<arch> to R(UN)PATH. I attach the patch which solves this issue. Not sure if it's a right way and if more path clean up calls are not needed.

By the way, what's more alarming is that solution proposed in http://public.kitware.com/Bug/view.php?id=11751#c25028 [^] will no longer work as CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES variable no longer has needed multiarch directories... However, it's too early to mess with CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES in Modules/Platform/UnixPath.cmake
No tags attached.
related to 0012037closed Brad King support multiarch lib paths for Debian/Ubuntu 
diff multiarch_lib_dirs_should_be_implicit.diff (1,127) 2011-07-09 14:03
https://public.kitware.com/Bug/file/3967/multiarch_lib_dirs_should_be_implicit.diff
Issue History
2011-07-09 14:03Modestas VainiusNew Issue
2011-07-09 14:03Modestas VainiusFile Added: multiarch_lib_dirs_should_be_implicit.diff
2011-07-25 13:21Brad KingRelationship addedrelated to 0012037
2011-07-25 13:28Brad KingAssigned To => Brad King
2011-07-25 13:28Brad KingStatusnew => assigned
2011-07-25 13:32Brad KingNote Added: 0027065
2011-07-25 13:43Modestas VainiusNote Added: 0027066
2011-07-27 09:45Brad KingNote Added: 0027078
2011-07-27 09:45Brad KingStatusassigned => resolved
2011-07-27 09:45Brad KingResolutionopen => fixed
2011-09-12 17:13David ColeFixed in Version => CMake 2.8.6
2011-09-12 17:13David ColeTarget Version => CMake 2.8.6
2012-02-06 06:07David ColeNote Added: 0028502
2012-02-06 06:07David ColeStatusresolved => closed

Notes
(0027065)
Brad King   
2011-07-25 13:32   
How can the lib/<arch> directory not be in CMAKE_C_IMPLICIT_LINK_DIRECTORIES? We're detecting <arch> by looking for the lib/<arch> pattern in that variable.

The value of CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES is a hard-coded list of guesses that pre-dated the detected language-specific variable. The new one should contain everything because it is detected from the real toolchain. We kept the old one only for compatibility and "just in case".
(0027066)
Modestas Vainius   
2011-07-25 13:43   
/usr/lib/<arch> is in CMAKE_C_IMPLICIT_LINK_DIRECTORIES, not /lib/<arch>. The rationale behind this is that development symlinks (*.so) are never in /lib. They are always in /usr/lib/<arch>/libname.so even if the library itself is in /lib/<arch>/.
(0027078)
Brad King   
2011-07-27 09:45   
Okay, that makes sense. Applied with minor formatting change:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=317d077f [^]

Thanks!
(0028502)
David Cole   
2012-02-06 06:07   
Closing resolved issues that have not been updated in more than 4 months.