[cmake-developers] [CMake 0014875]: /lib64 wrongfully appears in RPATH

Mantis Bug Tracker mantis at public.kitware.com
Mon Apr 14 13:15:14 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14875 
====================================================================== 
Reported By:                Lekensteyn
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14875
Category:                   Modules
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-04-14 13:15 EDT
Last Modified:              2014-04-14 13:15 EDT
====================================================================== 
Summary:                    /lib64 wrongfully appears in RPATH
Description: 
When a program is built, the /lib64 directory appears in RPATH which breaks
local testing of a build if a library used by the program appears in /lib64.

Originally reported at https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9989.

Steps to Reproduce: 
Create the following CMakeLists.txt file, ensure that /lib64 exists:

cmake_minimum_required (VERSION 2.6)
project ("bug test")
# test.c: int main(void){return 0;}
add_executable(test test.c)
target_link_libraries(test /lib64/libglib-2.0.so.0)

After compilation, `chrpath test` should show nothing. Instead, it shows
RPATH=lib64

Additional Information: 
This is Arch Linux package cmake 2.8.12.2-2
/lib64 and /lib are symlinked to usr/lib
/usr/lib64 is symlinked to lib

The attached patch fixes the issue.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-04-14 13:15 Lekensteyn     New Issue                                    
2014-04-14 13:15 Lekensteyn     File Added: UnixPaths.patch                    
======================================================================



More information about the cmake-developers mailing list