This is the mail archive of the
mailing list for the binutils project.
Re: linking against libbfd without modify LD_LIBRARY_PATH
Many thanks for your help Mike.
The distro is gentoo (~amd64, up-to-dated) ;)
RPATH is /usr/lib64/binutils/x86_64-pc-linux-gnu/2.22
The problem is there is no such tool like pkg-config which can output
the lib path automatically, IE:
pkg-config --cflags --libs glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -lglib-2.0
Is it a known problem with Gentoo?
On Mon, Dec 5, 2011 at 1:04 AM, Mike Frysinger <firstname.lastname@example.org> wrote:
> On Sunday 04 December 2011 02:51:04 Baojun Wang wrote:
>> When I create my own application liked to libbfd (-lbfd), ``ldd myapp''
>> Â$ ldd myapp
>> Â Â Â Â linux-vdso.so.1 => Â(0x00007fff985ff000)
>> Â Â Â Â libbfd-2.21.1.so => not found
>> Â Â Â Â libc.so.6 => /lib64/libc.so.6 (0x00007f26dc31a000)
>> I need set LD_LIBRARY_PATH to let ``myapp'' runs normally.
> this is a bug in your distro. Âyou should file a bug with them.
>> But for ``objdump'', why it doesn't need to do so?
> it has RPATH entries for it:
> Â Â Â Âreadelf -d `which objdump` | grep RPATH