This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linking against libbfd without modify LD_LIBRARY_PATH

On Mon, Dec 5, 2011 at 11:32 PM, Mike Frysinger <> wrote:
> On Monday 05 December 2011 08:05:36 Baojun Wang wrote:
>> 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
> binutils-config in Gentoo takes care of setting up an ldpath that is full of
> links to all the binutils libraries. Âseems to be working for me:
> $ cat /etc/
> /usr/x86_64-pc-linux-gnu/lib
> $ echo 'main(){}' > test.c
> $ gcc test.c -lbfd
> $ ldd a.out Â| grep bfd
> Â Â Â Â => /usr/x86_64-pc-linux-gnu/lib/
> (0x00007f92d450c000)
>> 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
> the binutils project doesn't provide .pc files, so i'm not going to generate
> one for Gentoo as it'd encourage forking
> also, please don't top post
Sorry about that.
> -mike

I think the problem is because I upgraded binutils, but didn't run
``env-update'' after that, after I run env-update, there is no such
issue any more. Many thanks for your prompt reply, Mike.

Best Regards

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]