Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 605944 - sys-libs/binutils-libs: install libbfd-*.so incompatible with ld.bfd from sys-devel/binutils
Summary: sys-libs/binutils-libs: install libbfd-*.so incompatible with ld.bfd from sys...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-16 22:34 UTC by Michał Górny
Modified: 2017-02-09 15:09 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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-01-16 22:34:31 UTC
Both binutils and binutils-libs install supposedly the same library. The former into isolated directory, the latter into /usr/lib64.

Normally:

$ ldd /usr/bin/ld
	linux-vdso.so.1 (0x00007fffb3dc4000)
	libbfd-2.27.so => /usr/lib64/binutils/x86_64-pc-linux-gnu/2.27/libbfd-2.27.so (0x00007f86fe7d3000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f86fe5cf000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f86fe234000)
	libz.so.1 => /lib64/libz.so.1 (0x00007f86ff387000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f86ff1cd000)

However, if an application sets LD_LIBRARY_PATH=/usr/lib64 for some reason:

$ LD_LIBRARY_PATH=/usr/lib64 ldd /usr/bin/ld
	linux-vdso.so.1 (0x00007ffda070a000)
	libbfd-2.27.so => /usr/lib64/libbfd-2.27.so (0x00007f7af4c33000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f7af4a2f000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f7af4694000)
	libz.so.1 => /lib64/libz.so.1 (0x00007f7af5126000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f7af4f6c000)

While this normally should be harmless (i.e. not worth 'fixing'), for some reason the libbfd-2.27.so is incompatible with ld:

$ LD_LIBRARY_PATH=/usr/lib64 ld
ld: symbol lookup error: ld: undefined symbol: rx_additional_link_map_text

I think it's a very bad idea to install two incompatible libraries using the same name, especially that one of them lands in standard library search path.
Comment 1 SpanKY gentoo-dev 2017-01-18 06:08:42 UTC
it's incompatible when you build them using incompatible settings.  like USE=multitarget.

messing with settings like forcing LD_LIBRARY_PATH=/usr/lib64 and then complaining when apps start using the libs from there sounds like a case of PEBKAC.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-01-18 08:58:34 UTC
Then you should enforce that on ebuild level instead of expecting people to guess that two packages are building the same library twice for no good reason and that this could break toolchain.
Comment 3 SpanKY gentoo-dev 2017-01-18 10:24:54 UTC
(In reply to Michał Górny from comment #2)

i really have no idea what you're talking about.  please quote real examples of problems instead of talking in vague nonsense.

you've also provided no justification for your "no good reason" claim, and you making that statement is clear that you haven't bothered to research any of the history behind these packages/libs.

not to mention this bug follows your normal trend of:
(1) make vague statements
(2) get upset when your vague statements are rejected
(3) whine & cc qa@gentoo.org

please fix your style.  it's not conducive to getting any useful work done and simply serves to annoy people and waste time.