| Summary: | bootstrap-prefix.sh stage2: Emerged xz fails to load liblzma.so.5 | ||
|---|---|---|---|
| Product: | Gentoo/Alt | Reporter: | gilad.arnold |
| Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
| Status: | RESOLVED OBSOLETE | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
gilad.arnold
2015-07-24 18:59:52 UTC
Prepending this to do_emerge_pkgs call (in emerge_pkgs() in bootstrap_stage2()) allows it to run smoothly:
LD_LIBRARY_PATH="${ROOT}/tmp/usr/lib:${ROOT}/tmp/lib"
Is this an acceptable fix? If so, I can submit a patch.
Same LD_LIBRARY_PATH prepending needed for the stage3 emerge_pkgs(). That said, while this happened to work on my setup, I don't think it's a good solution, as it might cause innocent host binaries to load stage2 Prefix libraries... bad idea. Looking more closely, the problem is that the DT_RPATH value found in the stage2 xz binary (EPREFIX/tmp/usr/lib) is inconsistent with the actual location of liblzma.so.5 (EPREFIX/tmp/lib). This may have to do with issue 4411 and how it affects installation locations for libraries. Strangely, though, the stage3 xz binary does not have this problem: it uses DT_RUNPATH (instead of RPATH) that properly covers all Prefix locations (in fact, with some redundancy): EPREFIX/usr/lib EPREFIX/usr/x86_64-pc-linux-gnu/lib/gcc EPREFIX/usr/x86_64-pc-linux-gnu/lib EPREFIX/usr/lib EPREFIX/lib EPREFIX/tmp/usr/x86_64-pc-linux-gnu/lib/gcc EPREFIX/tmp/usr/x86_64-pc-linux-gnu/lib EPREFIX/tmp/lib EPREFIX/tmp/usr/lib Both the stage2 and stage3 xz-utils were built with -rpath the corresponded to their install prefix (.../usr/lib) so I don't really get where the difference is coming from (different gcc/binutils?). Regardless, the fact that the stage2 xz doesn't load the correct library is still a problem that (IMO) needs to be fixed. this changed significantly since this bugreport, and needs revisiting |