Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 869953 - sys-devel/gcc-12.2.0:12 - configure: error: GNAT is required to build ada
Summary: sys-devel/gcc-12.2.0:12 - configure: error: GNAT is required to build ada
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 871219 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-13 07:15 UTC by Toralf Förster
Modified: 2023-09-25 13:32 UTC (History)
3 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,19.48 KB, text/plain)
2022-09-13 07:15 UTC, Toralf Förster
Details
emerge-history.txt.bz2 (emerge-history.txt.bz2,66.40 KB, application/x-bzip)
2022-09-13 07:15 UTC, Toralf Förster
Details
environment (environment,137.69 KB, text/plain)
2022-09-13 07:15 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,52.84 KB, application/x-bzip)
2022-09-13 07:15 UTC, Toralf Förster
Details
gcc-build-logs.tar.bz2 (gcc-build-logs.tar.bz2,8.58 KB, application/x-bzip)
2022-09-13 07:15 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,13.35 KB, application/x-bzip)
2022-09-13 07:15 UTC, Toralf Förster
Details
sys-devel:gcc-12.2.0:20220912-201832.log (sys-devel:gcc-12.2.0:20220912-201832.log,18.83 KB, text/plain)
2022-09-13 07:15 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,37.77 KB, application/x-bzip)
2022-09-13 07:15 UTC, Toralf Förster
Details
gcc-12 config.log (config.log,24.92 KB, text/x-log)
2023-04-18 10:36 UTC, Sergey 'L29Ah' Alirzaev
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-13 07:15:24 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: GNAT is required to build ada
 * 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_no_multilib_systemd-j4-20220909-180005

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.3.1
 [2] x86_64-pc-linux-gnu-10.3.1
 [3] x86_64-pc-linux-gnu-12.2.0 *
clang/llvm (if any):
/usr/lib/llvm/15
15.0.0
Python 3.10.7
Available Ruby profiles:
  [1]   ruby27 (with Rubygems)
  [2]   ruby31 (with Rubygems) *
The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
GNU Make 4.3

  HEAD of ::gentoo
commit 2a1d7ac3723f1060987ef62c6953cb390ecda053
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Mon Sep 12 18:57:42 2022 +0000

    2022-09-12 18:57:42 UTC

emerge -qpvO sys-devel/gcc
[ebuild   R   ] sys-devel/gcc-12.2.0  USE="ada* (cxx) fortran go graphite jit nls nptl openmp pgo (pie) sanitize ssp vtv (-cet) (-custom-cflags) -d -debug -doc (-fixed-point) (-hardened) (-libssp) -lto (-multilib) -objc -objc++ -objc-gc (-pch) -systemtap -test (-valgrind) -vanilla -zstd"
Comment 1 Toralf Förster gentoo-dev 2022-09-13 07:15:25 UTC
Created attachment 804898 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-09-13 07:15:27 UTC
Created attachment 804901 [details]
emerge-history.txt.bz2
Comment 3 Toralf Förster gentoo-dev 2022-09-13 07:15:28 UTC
Created attachment 804904 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-09-13 07:15:29 UTC
Created attachment 804907 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-09-13 07:15:30 UTC
Created attachment 804910 [details]
gcc-build-logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-09-13 07:15:31 UTC
Created attachment 804913 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2022-09-13 07:15:32 UTC
Created attachment 804916 [details]
sys-devel:gcc-12.2.0:20220912-201832.log
Comment 8 Toralf Förster gentoo-dev 2022-09-13 07:15:34 UTC
Created attachment 804919 [details]
temp.tar.bz2
Comment 9 Jeremy Stent 2022-09-18 13:17:59 UTC
The page for Gentoo ProjectAda (https://wiki.gentoo.org/wiki/Project:Ada) documents what needs to be done.  You must set the "ADA_TARGET" variable in the make.conf.  You will probably need to merge gnat-gpl, select that as the gcc compiler, then merge gcc with the ada USE flag, and finally you will probably want to change the gcc compiler (gcc-config or eselect gcc) to you new compiler.
Comment 10 Stephan Hartmann (RETIRED) gentoo-dev 2022-09-18 14:30:11 UTC
*** Bug 871219 has been marked as a duplicate of this bug. ***
Comment 11 Toralf Förster gentoo-dev 2022-12-05 22:22:13 UTC
so probably the tinderbox should ignore the USE flag "ada" for now ?
Comment 12 Sergey 'L29Ah' Alirzaev 2023-04-18 10:35:44 UTC
(In reply to Jeremy Stent from comment #9)
> The page for Gentoo ProjectAda (https://wiki.gentoo.org/wiki/Project:Ada)
> documents what needs to be done.  You must set the "ADA_TARGET" variable in
> the make.conf.  You will probably need to merge gnat-gpl, select that as the
> gcc compiler, then merge gcc with the ada USE flag, and finally you will
> probably want to change the gcc compiler (gcc-config or eselect gcc) to you
> new compiler.

It doesn't work for me. sys-devel/gcc-12.2.1_p20230304 screams about the lack of GNAT. Attaching gcc's config.log that left me clueless.

gnat-gpl-2021-r4 is merged.
$ eselect gcc list
 [1] x86_64-pc-linux-gnu-10 *
 [2] x86_64-pc-linux-gnu-12

make.conf contains:
ADA_TARGET="gnat_2021"
ADA=x86_64-pc-linux-gnu-gcc-10
ADAFLAGS=${CFLAGS}
Comment 13 Sergey 'L29Ah' Alirzaev 2023-04-18 10:36:13 UTC
Created attachment 860311 [details]
gcc-12 config.log
Comment 14 Arsen Arsenović gentoo-dev 2023-04-18 10:45:53 UTC
To build up-to-date GNAT, I needed to build dev-lang/gnat-gpl and use that to build a sys-devel/gcc[ada] of the desired version, by selecting it via eselect gcc.

Does that procedure work for you?
Comment 15 Sergey 'L29Ah' Alirzaev 2023-04-18 13:16:49 UTC
(In reply to Sergey 'L29Ah' Alirzaev from comment #13)
> Created attachment 860311 [details]
> gcc-12 config.log

‰ gcc-10 -c conftest.adb 
fatal error, run-time library not installed correctly
cannot locate file system.ads
compilation abandoned

gnat-gpl installation didn't contain the system.ads file indeed. After rebuilding gnat-gpl with itself, though, it appeared, and gcc seems to be building happily now.