View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015719CMakeCMakepublic2015-08-28 20:032016-06-10 14:31
ReporterDavid Froger 
Assigned ToKitware Robot 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSGNU/LinuxOS Version
Product VersionCMake 3.2.3 
Target VersionFixed in Version 
Summary0015719: cmake miss --rapth-link when bin/c++ and lib/libfoo.so are in same directory
DescriptionWhen linking an executable with a library `libfoo.so` that depedent on a library
`libbar.so` in a non standard directory, flag `-Wl,-rpath-link=...` is required
so that `ld` can find `libar.so`.

It works well with /usr/bin/gcc and libraries somewhere in a non standard
directory, CMake uses the flag `-Wl,-rpath-link`.

But in this case:
    /path/to/somewhere/bin/gcc
    /path/to/somewhere/lib/libfoo.so
    /path/to/somewhere/lib/libbar.so

and with /path/to/somewhere/bin in the PATH, without setting LD_LIBRARY_PATH,
CMake drops the flag `-Wl,-rpath-link=...` and the build fails.
Steps To Reproducehttps://github.com/dfroger/secondary_dep [^]
Additional Informationhttp://public.kitware.com/pipermail/cmake/2015-August/061433.html [^]
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0039352)
David Froger (reporter)
2015-08-29 17:10

Maybe the problem is that the directory containing libbar.so is in `gcc -print-search-dirs`, and CMake wrongly assumes that this directory is search by ld too.
(0042831)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-08-28 20:03 David Froger New Issue
2015-08-29 17:10 David Froger Note Added: 0039352
2016-06-10 14:29 Kitware Robot Note Added: 0042831
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team