too long lines were shrinked: checking for the correct version of gmp.h... yes checking for the correct version of mpfr.h... yes checking for the correct version of mpc.h... yes checking for the correct version of the gmp/mpfr/mpc libraries... yes configure: error: GDC is required to build d * ERROR: sys-devel/gcc-12.2.0::gentoo failed (configure phase): * Failed to run command: /bin/sh /var/tmp/portage/sys-devel/gcc-12.2.0/work/gcc-12.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/12.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include --datadir=/usr/share/ ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_desktop_plasma-j4-20220903-080005 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-11.3.0 * clang/llvm (if any): Python 3.10.6 php cli: GNU Make 4.3 HEAD of ::gentoo commit 9932f80de4486578c2eee90d505eb13adedf79ba Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Sat Sep 3 05:31:47 2022 +0000 2022-09-03 05:31:47 UTC emerge -qpvO sys-devel/gcc [ebuild NS ] sys-devel/gcc-12.2.0 [11.3.0] USE="(cxx) d* fortran go* jit* (multilib) nls nptl openmp (pie) sanitize ssp systemtap* vtv* (-ada) (-cet) (-custom-cflags) -debug -doc (-fixed-point) -graphite (-hardened) (-libssp) -lto -objc -objc++ -objc-gc (-pch) -pgo -test (-valgrind) -vanilla -zstd"
Created attachment 802990 [details] emerge-info.txt
Created attachment 802993 [details] emerge-history.txt
Created attachment 802996 [details] environment
Created attachment 802999 [details] etc.portage.tar.bz2
Created attachment 803002 [details] gcc-build-logs.tar.bz2
Created attachment 803005 [details] logs.tar.bz2
Created attachment 803008 [details] sys-devel:gcc-12.2.0:20220903-064504.log
Created attachment 803011 [details] temp.tar.bz2
Got the same error at gcc-12.3.1_p20230526 if +d USE flag. clang profile.
yeah, gdc takes a bit of a bootstrap path (same as gnat). I bootstrapped both by building gnat-gpl[d,ada] and then using that to build gcc[d,ada]. I'm surprised that you also ran into this, though, rather than getting an error in dependency resolution. Do you have a sys-devel/gcc[d] installed? If so, does the selected GCC have a GDC? Post gcc-config -c, gcc-config -l. Which versions of GCC and with which flags do you have installed?
If anyone is wondering how exactly you can bootstrap GCC with gnat-gpl, then I will tell you how. First you need to install gnat-gpl with the d useflag on. Then you need to ln -s /usr/x86_64-pc-linux-gnu/gcc-bin/10/x86_64-pc-linux-gnu-gdc /usr/local/bin/gdc Now retry emerging gcc with the d useflag and it should use GNAT's GDC to do so.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3355cb0ab6d92d84eeff44163da5309d114726b3 commit 3355cb0ab6d92d84eeff44163da5309d114726b3 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-09-29 01:04:44 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-09-29 01:04:44 +0000 toolchain.eclass: rework D handling The recent work for Ada makes things easier here because you don't have to try juggle both GNAT and GDC at the same time. Anyway, let's do something similar: iterate over installed GCCs and try to use the best GDC available for bootstrapping, so users don't have to manually select it with `gcc-config`. More mangling may be needed than setting GDC down the line. Bug: https://bugs.gentoo.org/868228 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
This is all done now (as is Ada). Of course, there's still a need to build bootstrap tarballs for other arches but that's tracked separately.