bootstrap-prefix.sh fails to bootstrap at stage 3 when emerging sys-libs/zlib-1.2.11-r1. A linking error of undefined reference was raised. Bootstraping actually failed at an earlier stage when emerging sys-libs/glibc, but I managed to fix it and continue. I will include the detalis in case there is some relationship (see Steps to Reproduce). Reproducible: Always Steps to Reproduce: 1. Bootstrap bash with bootstrap-bash.sh 2. Run bootstrap-prefix.sh till it stops for sys-libs/glibc-2.33-r4 with linking error ========================== {standard input}: Error: `loc1@GLIBC_2.2.5' can't be versioned to common symbol 'loc1' {standard input}: Error: `loc2@GLIBC_2.2.5' can't be versioned to common symbol 'loc2' {standard input}: Error: `locs@GLIBC_2.2.5' can't be versioned to common symbol 'locs' make[2]: *** [/fs/optimizer/styang/gentoo/var/tmp/portage/sys-libs/glibc-2.23-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl/misc/regexp.os] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/fs/optimizer/styang/gentoo/var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/misc' make[1]: *** [misc/subdir_lib] Error 2 make[1]: Leaving directory `/fs/optimizer/styang/gentoo/var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23' make: *** [all] Error 2 make: Leaving directory `/fs/optimizer/styang/gentoo/var/tmp/portage/sys-libs/glibc-2.23-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl' * ERROR: sys-libs/glibc-2.23-r4::gentoo failed (compile phase): * emake failed ============================= 3. Fixing the glibc problem by adding a patch (available from upstream https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869717) or force it to use a higer version (2.34 or higher, where the patch is already included in gentoo official portage), and continue bootstrap Actual Results: Bootstrap stops at sys-libs/zlib, with a linking error: libz.so.1.2.11: undefined reference to `memcpy@GLIBC_2.14' collect2: error: ld returned 1 exit status make: *** [examplesh] Error 1 make: *** Waiting for unfinished jobs.... libz.so.1.2.11: undefined reference to `memcpy@GLIBC_2.14' collect2: error: ld returned 1 exit status make: *** [minigzipsh] Error 1 * ERROR: sys-libs/zlib-1.2.11-r1::gentoo failed (compile phase): * emake failed Expected Results: Successfully bootstrap Red Hat Enterprise Linux Server release 6.9 (Santiago), Kernel: 2.6.32-696.10.2.el6.x86_64 Host packages version: bash: 4.1.2 glibc: 2.12 gcc: 4.4.7 Problem might be related to nptl, as my old gentoo-prefix on the same machine complains about kernel version too low when upgrading sys-libs/glibc because of the nptl feature.
Created attachment 518754 [details] bootstrap log when failed to emerge sys-libs/glibc
Created attachment 518756 [details] bootstrap log when failed to emerge sys-libs/zlib After fixing the glibc problem, bootstrap was continued and stops at sys-libs/zlib
Created attachment 518758 [details, diff] the patch applied to fix sys-libs/glibc problem This patch is available on upstream https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869717, or in gentoo official portage since sys-libs/glibc-2.24
Thanks for the report! I will look into it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=396a93ce5cbb65602468a35849df558443a59ebe commit 396a93ce5cbb65602468a35849df558443a59ebe Author: Benda Xu <heroxbd@gentoo.org> AuthorDate: 2018-02-20 07:57:03 +0000 Commit: Benda Xu <heroxbd@gentoo.org> CommitDate: 2018-02-20 08:00:37 +0000 tandalonebootstrap-prefix.sh: Add back BOOTSTRAP_RAP for zlib. By default zlib builds several example executables, even if what we want is a library. It does not matter usually. But during stage3, after glibc and before binutils, we cannot build executable reliably. These should be disabled. Closes: https://bugs.gentoo.org/647144 scripts/bootstrap-prefix.sh | 1 + 1 file changed, 1 insertion(+)