bootstrapping a prefix on gentoo fails to install (not build) sys-devel/glibc due to the following failed test: >>> Installing (1 of 37) sys-libs/glibc-2.25-r5::gentoo_prefix * Defaulting /etc/host.conf:multi to on Inconsistency detected by ld.so: get-dynamic-info.h: 146: elf_get_dynamic_info: Assertion `info[DT_RUNPATH] == NULL' failed! * ERROR: sys-libs/glibc-2.25-r5::gentoo_prefix failed (preinst phase): * simple run test (/home/hanetzer/gentoo/usr/bin/cal) failed * * Call stack: * ebuild.sh, line 115: Called __call-ebuildshell 'pkg_preinst' * ebuild.sh, line 529: Called pkg_preinst * environment, line 2889: Called toolchain-glibc_pkg_preinst * environment, line 4617: Called glibc_sanity_check * environment, line 2089: Called die * The specific snippet of code: * LC_ALL=C ./ld-*.so --library-path . ${x} > /dev/null || die "simple run test (${x}) failed"; * * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.25-r5::gentoo_prefix'`, * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.25-r5::gentoo_prefix'`. * The complete build log is located at '/home/hanetzer/gentoo/var/tmp/portage/sys-libs/glibc-2.25-r5/temp/build.log'. * The ebuild environment file is located at '/home/hanetzer/gentoo/var/tmp/portage/sys-libs/glibc-2.25-r5/temp/environment'. * Working directory: '/home/hanetzer/gentoo/var/tmp/portage/sys-libs/glibc-2.25-r5/image/home/hanetzer/gentoo/lib' * S: '/home/hanetzer/gentoo/var/tmp/portage/sys-libs/glibc-2.25-r5/work/glibc-2.25' !!! FAILED preinst: 1 >>> Failed to install sys-libs/glibc-2.25-r5, Log file: >>> '/home/hanetzer/gentoo/var/tmp/portage/sys-libs/glibc-2.25-r5/temp/build.log' * Messages for package sys-libs/glibc-2.25-r5: * Defaulting /etc/host.conf:multi to on * ERROR: sys-libs/glibc-2.25-r5::gentoo_prefix failed (preinst phase): * simple run test (/home/hanetzer/gentoo/usr/bin/cal) failed * * Call stack: * ebuild.sh, line 115: Called __call-ebuildshell 'pkg_preinst' * ebuild.sh, line 529: Called pkg_preinst * environment, line 2889: Called toolchain-glibc_pkg_preinst * environment, line 4617: Called glibc_sanity_check * environment, line 2089: Called die * The specific snippet of code: * LC_ALL=C ./ld-*.so --library-path . ${x} > /dev/null || die "simple run test (${x}) failed"; * * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.25-r5::gentoo_prefix'`, * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.25-r5::gentoo_prefix'`. * The complete build log is located at '/home/hanetzer/gentoo/var/tmp/portage/sys-libs/glibc-2.25-r5/temp/build.log'. * The ebuild environment file is located at '/home/hanetzer/gentoo/var/tmp/portage/sys-libs/glibc-2.25-r5/temp/environment'. * Working directory: '/home/hanetzer/gentoo/var/tmp/portage/sys-libs/glibc-2.25-r5/image/home/hanetzer/gentoo/lib' * S: '/home/hanetzer/gentoo/var/tmp/portage/sys-libs/glibc-2.25-r5/work/glibc-2.25' Reproducible: Always Steps to Reproduce: 1. do whatever hacks you have to to get bootstrap-prefix.sh to get to this point (patching gcc, setting FEATURES="-multilib-strict" beforehand) 2. set up timezones in the prefix, and etc/hosts 3. ./bootstrap-prefix.sh 4. follow the prompts 5. glibc builds 6. glibc fails at install time. Actual Results: glibc fails at install time due to failed tests. Expected Results: installation of sys-devel/glibc to gentoo prefix.
Created attachment 496342 [details] build.log
It looks like prefix ${something} injected -rpath/-runpath into ld executable itself. Build log even complains about it loudly: """ * QA Notice: The following files contain insecure RUNPATHs""" Do you know what injects those RUNPATHs for you? I don't see it explicitly set in build log. It looks prefix-specific toolchain tweak.
I can confirm this with glibc-2.25-r9, with prefix on SLES 11. I am adding prefix@gentoo.org to the CC list as well.
This now works when doing a rap-style prefix (prefix/linux-standalone/amd64), but this may still be broken on non-rap prefixes.
Yes, the ld wrapper in Prefix injects rpath entries, so if this breaks it, then this is to be expected. I don't think we'd ever expect non-RAP Prefix users to compile/use glibc, so I'm not sure how much this is an issue, if it works for RAP (which doesn't use the wrapper in the same way/at all).
(In reply to Fabian Groffen from comment #5) > Yes, the ld wrapper in Prefix injects rpath entries, so if this breaks it, > then this is to be expected. I don't think we'd ever expect non-RAP Prefix > users to compile/use glibc, so I'm not sure how much this is an issue, if it > works for RAP (which doesn't use the wrapper in the same way/at all). Closing as invalid then.