Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 868228 - sys-devel/gcc-12.2.0:12 - configure: error: GDC is required to build d
Summary: sys-devel/gcc-12.2.0:12 - configure: error: GDC is required to build d
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 940470
Blocks:
  Show dependency tree
 
Reported: 2022-09-03 08:56 UTC by Toralf Förster
Modified: 2024-12-11 07:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.88 KB, text/plain)
2022-09-03 08:56 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,2.74 KB, text/plain)
2022-09-03 08:56 UTC, Toralf Förster
Details
environment (environment,135.08 KB, text/plain)
2022-09-03 08:57 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,22.57 KB, application/x-bzip)
2022-09-03 08:57 UTC, Toralf Förster
Details
gcc-build-logs.tar.bz2 (gcc-build-logs.tar.bz2,8.58 KB, application/x-bzip)
2022-09-03 08:57 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,13.29 KB, application/x-bzip)
2022-09-03 08:57 UTC, Toralf Förster
Details
sys-devel:gcc-12.2.0:20220903-064504.log (sys-devel:gcc-12.2.0:20220903-064504.log,18.77 KB, text/plain)
2022-09-03 08:57 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,36.98 KB, application/x-bzip)
2022-09-03 08:57 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2022-09-03 08:56:57 UTC
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"
Comment 1 Toralf Förster gentoo-dev 2022-09-03 08:56:58 UTC
Created attachment 802990 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-09-03 08:56:59 UTC
Created attachment 802993 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-09-03 08:57:00 UTC
Created attachment 802996 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-09-03 08:57:01 UTC
Created attachment 802999 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-09-03 08:57:02 UTC
Created attachment 803002 [details]
gcc-build-logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-09-03 08:57:03 UTC
Created attachment 803005 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2022-09-03 08:57:04 UTC
Created attachment 803008 [details]
sys-devel:gcc-12.2.0:20220903-064504.log
Comment 8 Toralf Förster gentoo-dev 2022-09-03 08:57:06 UTC
Created attachment 803011 [details]
temp.tar.bz2
Comment 9 Arniiiii 2023-09-19 10:08:26 UTC
Got the same error at gcc-12.3.1_p20230526 if +d USE flag. clang profile.
Comment 10 Arsen Arsenović gentoo-dev 2023-09-19 12:53:35 UTC
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?
Comment 11 Squeaktoy 2024-07-24 17:37:41 UTC
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.
Comment 12 Larry the Git Cow gentoo-dev 2024-09-29 01:07:02 UTC
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(+)
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-01 06:50:07 UTC
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.