setting rpath-link

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

setting rpath-link

CMake mailing list

Hi,

I am in a situation where I have to use 2 versions of the boost library (c++), one “explicitly” and one indirectly (through a package that comes as a shared lib).

The external package is to be considered as a black box.

Playing around on the web (as I am rather new to it), I came across the very nice article:

http://www.kaizou.org/2015/01/linux-libraries/

which in the last section recommends the usage of –rpath-link=/path/to/old/boost

How can I specify this in CMake (preferably in 3.5.2 , as this s the currently used version in the company I work for)?

TIA,

Petros

 

PS: Issues of how this would propagate at installation phase, although very important, are not pressing right now, as manual workarounds can be employed, or another question later may be made ;-)

 


--

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setting rpath-link

Chuck Atkins
Hi Petros,
This doesn't really answer your question but it may solve your problem a different way.  I've fought this very same boost problem many times in the past.  In my case it was needing to link against Matlab dev libraries, which in turn pulled their own private copy of boost in.  I tried a similar approach of rpath-link but it wasn't feasible since it had to work on Windows as well.  The best way to address it, I found, was to use the bcp tool that comes with boost to generate a copy of the boost source tree with a different namespace.  So I created my own private boost in the kwboost:: namespace instead of boost:: with libraries kwboost_filesystem.so, etc.  That way I could guarantee that the version I used was exactly the version I created and would in turn also not create the same problem for anybody else when they linked to me.

- Chuck<a href="tel:(518)%20881-1183" value="+15188811183" target="_blank">

On Fri, Jun 16, 2017 at 10:50 AM, Mamales, Petros via CMake <[hidden email]> wrote:

Hi,

I am in a situation where I have to use 2 versions of the boost library (c++), one “explicitly” and one indirectly (through a package that comes as a shared lib).

The external package is to be considered as a black box.

Playing around on the web (as I am rather new to it), I came across the very nice article:

http://www.kaizou.org/2015/01/linux-libraries/

which in the last section recommends the usage of –rpath-link=/path/to/old/boost

How can I specify this in CMake (preferably in 3.5.2 , as this s the currently used version in the company I work for)?

TIA,

Petros

 

PS: Issues of how this would propagate at installation phase, although very important, are not pressing right now, as manual workarounds can be employed, or another question later may be made ;-)

 


--

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


--

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
Loading...