Boost logo

Boost :

Subject: Re: [boost] How to set LDFLAGS in 1.66.0?
From: Nana Sakisaka (n.sakisaka_at_[hidden])
Date: 2018-03-09 01:33:38


> I'm not looking to find an external library, I'm trying to set the
RUNPATH on the boost shared libraries

There's no need to use an external library. You just pass options to b2.
Are you sure that you've tried my suggestion on previous reply?

> Ordinarilly, one just adds LDFLAGS to the configure script with the
-Wl,rpath ...

Using boost libraries does not prevent you to do so.
One could either specify RPATH for your boost library files, application
executable, or both.

BTW, looking at your pasted output of ldd indicates that you've set your
RPATH for wrong value, but that should not be boost specific; try googling
without 'boost' keyword?

2018-03-09 9:59 GMT+09:00 Dean Anderson <dean_at_[hidden]>:

> Thanks for the reply.
>
> I'm not looking to find an external library, I'm trying to set the RUNPATH
> on the boost shared libraries. For example:
>
> The path on libstdc++ is set by the ld, so it finds the right compiler
> runtime...
>
> libboost_wave.so needs a RUNPATH to where its going to be installed.
>
> Ordinarilly, one just adds LDFLAGS to the configure script with the
> -Wl,rpath ...
>
> --Dean
>
> ldd libboost_wave.so.1.66.0
> linux-vdso.so.1 => (0x00007ffebf1b6000)
> libboost_filesystem.so.1.66.0 => not found
> libboost_thread.so.1.66.0 => not found
> libboost_date_time.so.1.66.0 => not found
> libboost_chrono.so.1.66.0 => not found
> libboost_system.so.1.66.0 => not found
> librt.so.1 => /lib64/librt.so.1 (0x00007f5082f0a000)
> libstdc++.so.6 => /efs/dist/gnu/gcclib/4.9.4/.ex
> ec/x86-64.rhel.7/lib/libstdc++.so.6 (0x00007f5082c00000)
> libm.so.6 => /lib64/libm.so.6 (0x00007f50828fd000)
> libgcc_s.so.1 => /efs/dist/gnu/gcclib/4.9.4/.ex
> ec/x86-64.rhel.7/lib/libgcc_s.so.1 (0x00007f50826e6000)
> libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f50824ca000)
> libc.so.6 => /lib64/libc.so.6 (0x00007f5082108000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f508343e000)
>
>
>
> On Fri, 9 Mar 2018, Nana Sakisaka via Boost wrote:
>
> You could try passing this option to b2:
>>
>> dll-path="'$ORIGIN/../lib'"
>>
>> Make sure to escape $ and " appropriately for your CI scripts.
>> Note that there are actually two types of flags, i.e.
>> (1) the flag for your application executable (the RPATH)
>> and
>> (2) a flag for your build system's sanity check (e.g. the "checking if
>> *whatever* works..." internal binary flag for ./configure)
>>
>> p.s. Invoke command below to check whether the flags are set:
>> objdump -p ./a.out|grep RPATH
>>
>>
>>
>> 2018-03-09 8:33 GMT+09:00 Dean Anderson via Boost <boost_at_[hidden]
>> >:
>>
>> I need to set an rpath on the shared libraries. Any ideas how to do that?
>>>
>>> Alternatively, is there a fork of boost that use the gnu build system?
>>>
>>> Thanks!
>>>
>>> --Dean
>>>
>>> Av8 Internet Prepared to pay a premium for better service?
>>> www.av8.net faster, more reliable, better service
>>> 617 256 5494
>>>
>>>
>>> _______________________________________________
>>> Unsubscribe & other changes: http://lists.boost.org/mailman
>>> /listinfo.cgi/boost
>>>
>>>
>> _______________________________________________
>> Unsubscribe & other changes: http://lists.boost.org/mailman
>> /listinfo.cgi/boost
>>
>>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk