System: Vagrantfile generic/debian11 Steps to Reproduce: Run bootstrap-prefix.sh
Created attachment 852630 [details] build.log
Full large log is available here as an artifact https://github.com/APN-Pucky/gentoo-prefix-tester/actions/runs/4182207353 bugz does not seem to uploading it.
Created attachment 852632 [details] full.log.bz2
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f4bae8f7128a0a7977d4cf765f21301a2275f32e commit f4bae8f7128a0a7977d4cf765f21301a2275f32e Author: Sam James <sam@gentoo.org> AuthorDate: 2023-03-01 00:51:07 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-01 00:51:07 +0000 sys-devel/binutils: add 2.40(-r2) Bug: https://bugs.gentoo.org/895240 Bug: https://bugs.gentoo.org/892549 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/binutils/Manifest | 2 + sys-devel/binutils/binutils-2.40-r2.ebuild | 509 +++++++++++++++++++++ .../files/binutils-2.40-linker-search-path.patch | 74 +++ 3 files changed, 585 insertions(+)
configure has: checking for dlopen... no checking for dlopen in -ldl... no and from config.log: """ configure:10945: checking for dlopen configure:10945: gcc -isystem /home/gentoo/gentoo/usr/include -B/home/gentoo/gentoo/usr/lib64 -L/home/gentoo/gentoo/usr/lib64 -Wl,--dynamic-linker=/home/gentoo/gentoo/lib64/ld-linux-x86-64.so.2 -o conftest -O2 -pipe -O2 -pipe -L/home/gentoo/gentoo/usr/lib64 -Wl,--dynamic-linker=/home/gentoo/gentoo/lib64/ld-linux-x86-64.so.2 conftest.c >&5 /home/gentoo/gentoo/tmp/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /home/gentoo/gentoo/var/tmp/portage/sys-devel/binutils-2.40-r2/temp/ccJRRcQb.o: in function `main': conftest.c:(.text.startup+0x7): undefined reference to `dlopen' collect2: error: ld returned 1 exit status configure:10949: checking for dlopen in -ldl configure:10974: gcc -isystem /home/gentoo/gentoo/usr/include -B/home/gentoo/gentoo/usr/lib64 -L/home/gentoo/gentoo/usr/lib64 -Wl,--dynamic-linker=/home/gentoo/gentoo/lib64/ld-linux-x86-64.so.2 -o conftest -O2 -pipe -O2 -pipe -L/home/gentoo/gentoo/usr/lib64 -Wl,--dynamic-linker=/home/gentoo/gentoo/lib64/ld-linux-x86-64.so.2 conftest.c -ldl >&5 /home/gentoo/gentoo/tmp/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /home/gentoo/gentoo/var/tmp/portage/sys-devel/binutils-2.40-r2/temp/cc6ky0pA.o: in function `main': conftest.c:(.text.startup+0x7): undefined reference to `dlopen' collect2: error: ld returned 1 exit status configure:10974: $? = 1 """
Was looking for dlopen and... $ nm -D /home/gentoo/gentoo/lib64/ld-linux-x86-64.so.2 nm: /home/gentoo/gentoo/lib64/ld-linux-x86-64.so.2: unknown type [0x13] section `.relr.dyn' why is there anything DT_RELR in there?
Just to give an update: 1. The DT_RELR thing is a real issue I have some hacks for which I'll submit/commit in the next few days, but it's unrelated. 2. It's to do with not properly using the new glibc from stage2 & being confused wrt ${EPREFIX}/lib* and ${EPREFIX}/usr/lib* 3. It turns out someone's submitted a PR already which properly explains the issue so I didn't need to spend a while on it earlier as it turns out ;) https://github.com/gentoo/prefix/pull/22 Will look at the PR later.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=97f76fa9e3aeeac6f44dbc979dcddb86ce7e1686 commit 97f76fa9e3aeeac6f44dbc979dcddb86ce7e1686 Author: Bart Oldeman <bart.oldeman@calculquebec.ca> AuthorDate: 2023-03-01 17:29:36 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-04 02:21:34 +0000 Use gcc --sysroot in rap stage3 post glibc install Since glibc now has non-prefixed filenames in `$EPREFIX/usr/lib64/libc.so`, it picks up non-prefixed `/lib64/libc.so.6` from stage2 gcc, unless we replace its -I, -L, and -B options by --sysroot. Then it will look at the same places as the future stage3 gcc. This avoids issues building binutils, which can't find dlopen in older `/lib64/libc.so.6`, since dlopen used to be in `libdl` instead. The whole logic no longer tests for compiler == gcc, since clang is only used for non-rap on MacOS. Closes: https://bugs.gentoo.org/895240 Signed-off-by: Bart Oldeman <bart.oldeman@calculquebec.ca> Closes: https://github.com/gentoo/prefix/pull/22 Signed-off-by: Sam James <sam@gentoo.org> scripts/bootstrap-prefix.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)