[OE-core] non-standard library locations and rpath

Khem Raj raj.khem at gmail.com
Fri Dec 2 07:08:49 UTC 2016


On Thu, Dec 1, 2016 at 8:18 AM, Jack Mitchell <ml at embed.me.uk> wrote:
> I'm having some troubles with shared library, shared library dependencies
> and rpaths. I have libfoo, which depends on libbar when I try to link libfoo
> with my app, it requires libbar to be found. libbar is in a non-standard
> location, /usr/local/bar when I compiled libfoo, I used -Wl,rpath-link
> ${STAGING_SYSROOT}/usr/local/bar and -Wl,rpath /usr/local/bar. Now when I
> come to try link my app with libfoo, it fails to link as it can't find
> libbar, which I assume means the rpath in libfoo isn't being properly
> prepending with sysroot what is the proper way to support this in OE? My
> library has the following rpath information:
>
> 0x0000000f (RPATH) Library rpath: [$ORIGIN/../lib:/usr/local/bar]
>
> So why isn't the rpath being prepended with the sysroot when I compile my
> app and link libfoo? The apps build system is using cmake, but this should
> be a built in linker feature, correct?

Only first path ( before :) is relative to location of binary at runtime

>
> Cheers,
> Jack.
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list