Why does the build system override bfd/opcodes host libs via LD_LIBRARY_PATH?

Mike Frysinger vapier@gentoo.org
Fri Apr 4 21:31:00 GMT 2008


On Friday 04 April 2008, Thiemo Seufer wrote:
> I see a funny effect when building binutils native on Debian
> unstable/mips:
>
> The host /usr/bin/ar segfaults because
>  1) it is a dynamic executable which needs libbfd.so
>  2) the build system provides a freshly built (and ABI incompatible)
>     via LD_LIBRARY_PATH.
>
> The library path override comes from RPATH_ENVVAR, which ultimately
> stems from a lib_path definition in the toplevel Makefile.def:
>
> [...]
> host_modules= { module= bfd; lib_path=.libs; bootstrap=true; };
> host_modules= { module= opcodes; lib_path=.libs; bootstrap=true; };
> [...]
>
> However, the users of those libraries are AFAICS careful to get the
> paths right, which suggests meddling with the environment isn't needed
> in that case.
>
> Did I miss something, or is removing those two lib_path statements the
> right solution?
>
> gmp and mpfr are two more host libraries which define a lib_path, but
> they require --disable-shared, which avoids the problem.

this is bug 4970.  i found punting RPATH_ENVVAR is simpler.
http://sources.gentoo.org/gentoo/src/patchsets/binutils/2.18/08_all_binutils-RPATH_ENVVAR-smack.patch
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20080404/277fda03/attachment.sig>


More information about the Binutils mailing list