Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 500986 - sys-devel/binutils-config: /usr/$CHOST/lib missing from ld.so.conf paths
Summary: sys-devel/binutils-config: /usr/$CHOST/lib missing from ld.so.conf paths
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-11 13:29 UTC by Ștefan Talpalaru
Modified: 2014-11-01 08:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ștefan Talpalaru 2014-02-11 13:29:06 UTC
binutils-config is supposed to add /usr/lib64/binutils/ARCH/VERSION to LDPATH but doesn't, so packages like amule which link against libbfd fail to start.

Temporary workaround: manually add LDPATH="/usr/lib64/binutils/x86_64-pc-linux-gnu/2.24" to /etc/env.d/05binutils each time after binutils-config is run and execute env-update afterwards.

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2014-02-12 20:48:38 UTC
yeah, no.  the libs get linked into the right place by binutils-config so that they're found at runtime.
Comment 2 Ștefan Talpalaru 2014-02-12 21:21:18 UTC
SpanKY, have you read my first comment describing the problem? This is not about portage locating libraries, this issue is about amule not being able to find libbfd at runtime because the directory in which libbfd is located is not in /etc/ld.so.conf.

If I can be bothered to debug and point out the root problem, surely you can be bothered to read what I wrote before changing the summary into something completely unrelated.
Comment 3 SpanKY gentoo-dev 2014-02-13 21:13:14 UTC
(In reply to Stefan Talpalaru from comment #2)

then your system is broken.  binutils-config already has registered the path with the system.  if it didn't, many packages would already be broken and lots of people would be complaining (cairo and perf and mysql for example).

trivial proof that it is working:
$ gcc test.c -lbfd
$ ldd a.out 
        linux-vdso.so.1 (0x00007fffaefff000)
        libbfd-2.23.2.so => /usr/x86_64-pc-linux-gnu/lib/libbfd-2.23.2.so (0x00007f744ec7b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f744e8d1000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f744e6cd000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f744f118000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f744ef8c000)
$ ldconfig -p | grep libbfd-2.23.2
        libbfd-2.23.2.so (libc6,x86-64) => /usr/x86_64-pc-linux-gnu/lib/libbfd-2.23.2.so

that's because binutils-config writes /etc/ld.so.conf.d/05binutils.conf which points to the correct location.
Comment 4 Ștefan Talpalaru 2014-02-13 21:33:45 UTC
I stand corrected. I can no longer replicate the breakage after running "binutils-config 1" on ~amd64. This issue can be closed as invalid.
Comment 5 SpanKY gentoo-dev 2014-02-13 23:03:22 UTC
(In reply to Stefan Talpalaru from comment #4)

if you do manage to locate what went wrong, feel free to follow up here.  if you hit a bug/edge case, would be good to know (at least for other users).