prefix-guest on top of opensuse leap: current bootstrap-prefix.sh halts on error when trying to build sys-devel/binutils in stage2: "configure: error: compiler and assembler with CET support are required for --enable-cet". using the previous snapshot 20240622 sort of works, but the final "emerge --depclean" removes sys-devel/binutils, causing all sorts of disaster in subsequent runs of emerge in the newly built prefix. seems, the two commits to gx86, gitweb.gentoo.org/repo/gentoo.git/commit?id=14f2561 (adding "sys-devel/binutils cet" to amd64/package.use.force) and gitweb.gentoo.org/repo/gentoo.git/commit?id=1d4bc75 (drop amd64?(sys-devel/binutils[cet]) from BDEPEND) need some action in the prefix profile...
Please include the logs.
hmmm. they sum up to about 100 MB, tarred-and-compressed still 2100 KB. will upload stage2.log from run of (almost) current bootstrap-prefix.sh, snapshot 20240721, and a somewhat shortened stage3.log from run of the same bootstrap-prefix.sh with snapshot version changed to 20240622. done on opensuse leap 15.6 after "export PREFIX_DISABLE_RAP=yes". any more logs wanted? note that the 2 commits cited above date from 20240702. without sys-devel/binutils installed in the prefix, the hosts' ld is used by an emerge inside the prefix, and the routinely (?) added RUNPATH entry, containing notably PREFIX/usr/x86_64-pc-linux-gnu/lib/gcc and PREFIX/usr/lib, in prefix libraries and binaries is missing in (most of) them.
Created attachment 898373 [details] stage2 of failed run of bootstrap-prefix.sh, snapshot 20240721
Created attachment 898374 [details] stage3.log of bootstrap-prefix.sh, snapshot version changed to 20240622
please let me state that bootstrap-prefix.sh, as of now, still fails to build a prefix instance (prefix-guest as well as RAP) on top of opensuse leap, i.e., on top of an amd64 system and host gcc not cet capable. as "sys-devel/binutils cet" was added recently to arch/amd64/package.use.force, bootstrap-prefix.sh fails to emerge sys-devel/binutils in stage2 w/ error message "compiler and assembler with CET support are required for --enable-cet". i worked around by creating "${ROOT}"/tmp/etc/portage/profile/package.use.force and adding "sys-devel/binutils -cet" there. next point of trouble, when bootstrapping prefix-guest: recently, with net-misc/curl-8.9.1, +http3 and +quic were added to curl ebuild's IUSE flags, resulting in circular dependency net-libs/nghttp3 --> dev-build/cmake --> net-misc/curl --> net-libs/nghttp3 at the end of stage3 when "emerge -uDN" is run. i worked around by adding "-http3 -quic -curl_quic_openssl" to the "export USE=..." statement preceding that emerge. (probably these should also go into the myuse array in do_emerge_pkgs.) finally, when bootstrapping a prefix-guest, "emerge --depclean" at the end of stage3 removes sys-devel/binutils from the installed prefix system. this IMO is obviously a Bad Thing, see above in Comment #2. i worked around by adding "emerge -n sys-devel/binutils" before that depclean. but instead of added to the world file, sys-devel/binutils should, as it used to, be part of the prefix' gcc dependencies: BDEPEND+="prefix-guest? ( amd64? ( ${CATEGORY}/binutils[cet?] ) )"
Created attachment 900616 [details, diff] patch to bootstrap-prefix.sh patch to bootstrap-prefix.sh containing my work-arounds described in comment #5
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=63b269d10e7d752c4ca4f793d428da8b2fd4cd16 commit 63b269d10e7d752c4ca4f793d428da8b2fd4cd16 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2024-08-19 16:22:42 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2024-08-19 16:22:42 +0000 scripts/bootstrap-prefix: try and unify USE-flag disabling As pointed out by hsk17, we have two places in which we disable different sets of USE-flags, try to unify them. In addition add http3, quic and curl_quic_openssl during bootstrap. Bug: https://bugs.gentoo.org/936629 Signed-off-by: Fabian Groffen <grobian@gentoo.org> scripts/bootstrap-prefix.sh | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-)
Nothing depending on binutils seems like a bug, but it seems true on normal systems too. The fact that sys-libs/db happens to depend on the linker makes it not being removed I guess for musl systems, glibc seems to depend on the linker too, but this is interesting.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ae67723b0166b5de843e288b40d56016fffcf192 commit ae67723b0166b5de843e288b40d56016fffcf192 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2024-08-19 16:41:45 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2024-08-19 16:41:45 +0000 scripts/bootstrap-prefix: workaround binutils being dep-cleaned Thanks hsk17 for noticing and providing a patch. Bug: https://bugs.gentoo.org/936629 Signed-off-by: Fabian Groffen <grobian@gentoo.org> scripts/bootstrap-prefix.sh | 5 +++++ 1 file changed, 5 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=a075ebb0f6e2b47034e3d69fdf30a06e6f61af8a commit a075ebb0f6e2b47034e3d69fdf30a06e6f61af8a Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2024-08-19 16:54:35 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2024-08-19 16:54:35 +0000 scripts/bootstrap-prefix: avoid USE=cet with binutils during bootstrap the host compiler used may not support CET, causing binutils to fail, so wait for that later when we got our own compiler Thanks hsk17 for the analysis and proposed fix. Bug: https://bugs.gentoo.org/936629 Signed-off-by: Fabian Groffen <grobian@gentoo.org> scripts/bootstrap-prefix.sh | 4 ++++ 1 file changed, 4 insertions(+)
I applied all three of your fixes, thanks! Does this resolve the problem completely for you?
(In reply to Fabian Groffen from comment #11) > I applied all three of your fixes, thanks! great, thanks > Does this resolve the problem completely for you? seems mkdir -p "${ROOT}"/tmp/etc/portage/profile is actually needed before echoing into package.use.force :-)
weird, then all commands before that that do similar stuff should fail to, and the Solaris bit I added recently and it will fail for sure if that doesn't work ...
(In reply to Fabian Groffen from comment #13) > weird, then all commands before that that do similar stuff should fail to, > and the Solaris bit I added recently and it will fail for sure if that > doesn't work ... ROOT/tmp/etc/portage exists and files there can be handled, but package.use.force lives in subdir profile and that subdir has yet to be created. unfortunately, the re-organisation of the to-be-disabled-use-flags does not yet fully work as expected - stage3 finishes but the circular deps problem now is in the final "emerge -uDN @world". last lines of the terminal output attached. maybe the full set of DISABLE_USE for "emerge -uDN @system" at the end of stage3 is too much? will have a deeper look into this tonight or tomorrow.
Created attachment 900729 [details] failed bootstrap-prefix.sh: last lines of terminal output
as stated above, full set of DISABLE_USE flags suppresses install of net-misc/curl at all in stage3's final "emerge -uDN @system". thus it will be pulled in by main bootstrap's final "emerge -uDN @world", resulting in the noted circular dep. so i'd say, either explicitly emerge a stripped-down net-misc/curl in stage3, or run, as it used to be, the "emerge -uDN @system" in stage3 with a somewhat minimal subset of DISABLE_USE. and then the susequent "emerge -uDN @world" will get it right. for me, and for the moment, running "emerge -uDN @system" in stage3 with export USE="-http2 -http3 -quic -curl_quic_openssl" did the trick.
I added the mkdir and I've reverted to the previous limited set and did some work around it to stage the upgrade. At least it could resolve without cyclic deps now.
tried the latest bootstrap-prefix.sh (1c92fe1), but found, "-http2" only was not enough to inhibit circular dependency w/ curl, seems we need export USE="-git -crypt -http2 -http3 -quic -curl_quic_openssl" preceding "emerge -uDN @system" in stage3. then bootstrap-prefix.sh finished ok. see attached an edited stage3.log.
Created attachment 900845 [details] an abridged stage3.log of my latest run of bootstrap-prefix.sh
yes, this is obvious, because I tested on Solaris where quic isn't compiling, so it's masked... duh, sorry
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=715db699226245f555867d8f3774f1f9343f2c8a commit 715db699226245f555867d8f3774f1f9343f2c8a Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2024-08-21 13:27:55 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2024-08-21 13:27:55 +0000 scripts/bootstrap-prefix: use DISABLE_USE for circular deps Use set of USE-flags that are necessary to break circular deps, and reduce more to just weed unnecessary dependencies. Use DISABLE_USE for the circular ones so they can be properly reused. Bug: https://bugs.gentoo.org/936629 Signed-off-by: Fabian Groffen <grobian@gentoo.org> scripts/bootstrap-prefix.sh | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-)
yes, that works :-)