View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013429CMakeCMakepublic2012-07-20 09:592015-03-02 08:57
ReporterMika Fischer 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformArchOSLinuxOS Version3.4.4
Product VersionCMake 2.8.8 
Target VersionCMake 3.1Fixed in VersionCMake 3.1 
Summary0013429: Symlinked lib directories confuse cmake
DescriptionSince Arch Linux replaced /lib and /lib64 with symlinks to /usr/lib, I get tons of these:

 CMake Warning at CMakeLists.txt:19 (ADD_EXECUTABLE):
   Cannot generate a safe runtime search path for target Foo because files in
   some directories may conflict with libraries in implicit directories:

     runtime library [libpthread.so] in /usr/lib may be hidden by files in:
       /lib64

   Some of these libraries may not be found correctly.

The issues is that /usr/lib and /lib64 are in fact the same directory, so there cannot possibly be any problem.

So I guess cmake should take into account in its conflict resolution, whether some of the lib directories under consideration are actually identical.
TagsNo tags attached.
Attached Filesdiff file icon cmake-fix-issue-13429.diff [^] (1,345 bytes) 2014-09-08 17:36 [Show Content]
patch file icon 0001-Tolerate-symlinks-during-RPATH-ordering-13429.patch [^] (1,999 bytes) 2014-09-09 09:03 [Show Content]

 Relationships

  Notes
(0030099)
Brad King (manager)
2012-07-20 14:29

The relevant code is here:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmOrderDirectories.cxx;hb=v2.8.8#l31 [^]

Try fixing up tests of the form

 if(dir != this->Directory && ...

to also check if both directories have the same realpath.
(0036751)
myles (reporter)
2014-09-08 17:41

Following the above advice, I made the changes in the attached file cmake-fix-issue-13429.diff .

Seems to fix it (warning goes away) but needs checking by an expert.

I also think this bug deserves higher Severity because it effects every Arch Linux user and sometimes spews a whole screenful of warnings, thus obscuring other messages.
(0036755)
Brad King (manager)
2014-09-09 09:04

Re 0013429:0036751: Thanks. I revised the patch as "0001-Tolerate-symlinks-during-RPATH-ordering-13429.patch". Please test it.
(0036759)
myles (reporter)
2014-09-09 13:52
edited on: 2014-09-09 13:53

Thanks very much, it works. I tried compiling the thing that gave me lots of warnings. The spurious warnings due to symlinks were eliminated and a couple of valid warnings still showed up.

(0036760)
Brad King (manager)
2014-09-09 15:29

Re 0013429:0036759: Thanks for testing. Applied:

 Tolerate symlinks during RPATH ordering
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f99cc9c3 [^]
(0038115)
Robert Maynard (manager)
2015-03-02 08:57

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-07-20 09:59 Mika Fischer New Issue
2012-07-20 14:29 Brad King Note Added: 0030099
2012-07-20 14:29 Brad King Status new => backlog
2014-09-08 17:36 myles File Added: cmake-fix-issue-13429.diff
2014-09-08 17:41 myles Note Added: 0036751
2014-09-09 09:03 Brad King Assigned To => Brad King
2014-09-09 09:03 Brad King Status backlog => assigned
2014-09-09 09:03 Brad King Target Version => CMake 3.1
2014-09-09 09:03 Brad King File Added: 0001-Tolerate-symlinks-during-RPATH-ordering-13429.patch
2014-09-09 09:04 Brad King Note Added: 0036755
2014-09-09 13:52 myles Note Added: 0036759
2014-09-09 13:53 myles Note Edited: 0036759
2014-09-09 15:29 Brad King Note Added: 0036760
2014-09-11 13:04 Brad King Status assigned => resolved
2014-09-11 13:04 Brad King Resolution open => fixed
2014-09-11 13:04 Brad King Fixed in Version => CMake 3.1
2015-03-02 08:57 Robert Maynard Note Added: 0038115
2015-03-02 08:57 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team