[Buildroot] How do you add to library path?

Grant Edwards grant.b.edwards at gmail.com
Sat Apr 28 14:53:32 UTC 2012


On 2012-04-27, Arnout Vandecappelle <arnout at mind.be> wrote:
> On Thursday 26 April 2012 19:42:01 Grant Edwards wrote:
>> What's the right way to permanently add a directory to the search path
>> for dynamic libraries?  (Preferably at build-time, rather than at
>> run-time.)
>
>  You could use the -rpath linker option, but that risks conflicts with
> libraries installed on the host (the linker puts rpath in front of the
> library search path, disregarding the sysroot, so if a library with the
> same name exists in that path on the host, the linker will link with that
> one instead of the cross-compiled one).

Thanks, that's an interesting option.  For now I've set
LD_LIBRARY_PATH. That seems sub-optimal, since the libraries are
always going to be in a location that's known at build-time.  I'll
take a look at the rpath option (and the other related methods).

-- 
Grant




More information about the buildroot mailing list