On 02/27/2017 08:11 PM, Ray Donnelly wrote: >> CMake passes the host rpath to the linker > > CMake does this because it isn't *asking* the linker, it's making > assumptions instead (and adding some predefined values like > `/usr/lib32`). If we just ask the linker instead then everything > should work just fine (I am ignore linkers that cannot tell us here > like Apple's ld64. I'm not sure how to tackle that one yet).
The /usr/lib32 path is not coming from any assumption or from guessing about the linker's rpath. It is appearing because we add to the rpath directories in which shared libraries appear that we include in our link. When find_library discovers /usr/lib32/libfoo.so, and we link to that library, then we add /usr/lib32 to the rpath if it is not in the implicit list. If we were to ask the linker what its rpath is it would say "/usr/lib" and then we would say "/usr/lib32 != /usr/lib" and add it anyway. Jörg's problem is about this lack of symlink recognition, and that is the issue I filed. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
