The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=15719 
====================================================================== 
Reported By:                David Froger
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15719
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-08-28 20:03 EDT
Last Modified:              2015-08-28 20:03 EDT
====================================================================== 
Summary:                    cmake miss --rapth-link when bin/c++ and
lib/libfoo.so are in same directory
Description: 
When 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 Reproduce: 
https://github.com/dfroger/secondary_dep


Additional Information: 
http://public.kitware.com/pipermail/cmake/2015-August/061433.html
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-08-28 20:03 David Froger   New Issue                                    
======================================================================

-- 

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-developers

Reply via email to