I'm trying emerge GCC-14 with additional D language. emerge wants to build gcc-11.5.0, then gcc-12.4.1_p20241219, then gcc-13.3.1_p20241220 and only then gcc-14.2.1_p20241221. All versions from 11 to 14. However, when I emerged just gcc-11.5.0 manually, emerge is going to build gcc-14 directly. First attempt: --------------------------------------- # emerge -1pv gcc These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 11.86 s (backtrack: 3/20). [ebuild NS ] sys-devel/gcc-11.5.0:11::gentoo [14.2.1_p20241221:14::gentoo] USE="cet (cxx) d* fortran graphite lto nls openmp pgo (pie) sanitize ssp zstd -ada -custom-cflags -debug -doc (-fixed-point) -go -hardened -jit (-libssp) (-multilib) -objc -objc++ -objc-gc (-pch) -systemtap -test -valgrind -vanilla -vtv (-default-stack-clash-protection%*) (-default-znow%*) (-ieee-long-double%) (-modula2%) (-rust%) (-time64%)" 0 KiB [ebuild NS ] sys-devel/gcc-12.4.1_p20241219:12::gentoo [14.2.1_p20241221:14::gentoo] USE="cet (cxx) d* (default-stack-clash-protection) (default-znow) fortran graphite lto nls openmp pgo (pie) sanitize ssp zstd -ada -custom-cflags -debug -doc (-fixed-point) -go -hardened (-ieee-long-double) -jit (-libssp) (-multilib) -objc -objc++ -objc-gc (-pch) -systemtap -test -valgrind -vanilla -vtv (-modula2%) (-rust%) (-time64%)" 78 065 KiB [ebuild NS ] sys-devel/gcc-13.3.1_p20241220:13::gentoo [14.2.1_p20241221:14::gentoo] USE="cet (cxx) d* (default-stack-clash-protection) (default-znow) fortran graphite lto nls openmp pgo (pie) sanitize ssp zstd -ada -custom-cflags -debug -doc (-fixed-point) -go -hardened (-ieee-long-double) -jit (-libssp) -modula2 (-multilib) -objc -objc++ -objc-gc (-pch) -systemtap -test -valgrind -vanilla -vtv (-rust%) (-time64%)" 82 524 KiB [ebuild R ] sys-devel/gcc-14.2.1_p20241221:14::gentoo USE="cet (cxx) d* (default-stack-clash-protection) (default-znow) fortran graphite lto nls openmp pgo (pie) sanitize ssp zstd -ada -custom-cflags -debug -doc (-fixed-point) -go -hardened (-ieee-long-double) -jit (-libssp) -modula2(-multilib) -objc -objc++ -objc-gc (-pch) -rust -systemtap -test (-time64) -valgrind -vanilla -vtv" 0 KiB Total: 4 packages (3 in new slots, 1 reinstall), Size of downloads: 160 589 KiB ======================================= All versions, from gcc-11 up to the current stable gcc-14. Then, after successfully performing "emerge -1av =sys-devel/gcc-11.5.0": --------------------------------------- # emerge -1pv gcc These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 5.16 s (backtrack: 1/20). [ebuild R ] sys-devel/gcc-14.2.1_p20241221:14::gentoo USE="cet (cxx) d* (default-stack-clash-protection) (default-znow) fortran graphite lto nls openmp pgo (pie) sanitize ssp zstd -ada -custom-cflags -debug -doc (-fixed-point) -go -hardened (-ieee-long-double) -jit (-libssp) -modula2(-multilib) -objc -objc++ -objc-gc (-pch) -rust -systemtap -test (-time64) -valgrind -vanilla -vtv" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB =======================================
Looks a like a dumber https://bugs.gentoo.org/947587
It looks like gcc-12 and gcc-13 could be skipped. Seems that gcc-11 is the only version that can build D language with C compiler. Later versions needs D compiler to build D language. However, CDG-11 is enough to build CDG-14 and extra steps (CDG-12 and CDG-13) would be just wasted.
Seems that this bug is related to https://bugs.gentoo.org/947587, but a bit different. In this case gcc-11 is required to bootstrap CDG, but intermediate gcc-12 and gcc-13 are NOT reqruired and must not be built.
Created attachment 919934 [details] Pytest output from simplified test case Made a PR documenting these failures, attachment is pytest output from this (with xfail removed). https://github.com/gentoo/portage/pull/1428
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=3f6afc11b91a9f327476593086cfa2bf16f205f4 commit 3f6afc11b91a9f327476593086cfa2bf16f205f4 Author: Alfred Wingate <parona@protonmail.com> AuthorDate: 2025-02-26 14:29:53 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-09 21:54:05 +0000 tests: resolver: Add xfail test for D bootstrap chain (bug #950310) Bug: https://bugs.gentoo.org/950310 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/portage/pull/1428 Signed-off-by: Sam James <sam@gentoo.org> lib/portage/tests/resolver/test_bootstrap_deps.py | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+)