gnat is using its internal copy of gcc v10.x for building, the current gcc installed in the system is 14.2.1 which offers uncompatible compile flags. The build fails with fortran check: checking whether the GNU Fortran compiler is working... no configure: error: GNU Fortran is not working; please report a bug in http://gcc.gnu.org/bugzilla, attaching /var/tmp/portage/dev-lang/gnat-gpl-2021-r5/work/build/x86_64-pc-linux-gnu/libgfortran/config.log make[1]: *** [Makefile:19484: configure-target-libgfortran] Error 1 make[1]: Leaving directory '/var/tmp/portage/dev-lang/gnat-gpl-2021-r5/work/build' make: *** [Makefile:23573: bootstrap-lean] Error 2 I am attaching here the config.log, the offending configure option is: f951: Error: bad value ('raptorlake') for '-march=' switch
Created attachment 920444 [details] config.log
We're looking to kill gnat-gpl in favour of ada-bootstrap. Does that work?
I guess I need to enable system-bootstrap useflag which is disabled by default, I'll let you know
No, I don't think so. The eclass doesn't depend on gnat-gpl anymore and everything should Just Work if you enable USE=ada on sys-devel/gcc.
I have installed only latest gcc 14.2.1, if I do # USE=ada emerge -1 sys-devel/gcc -pv [ebuild N ] dev-lang/ada-bootstrap-11::gentoo 44720 KiB [ebuild NS ] sys-devel/gcc-11.5.0:11::gentoo [14.2.1_p20241221:14::gentoo] USE="ada* cet (cxx) fortran (multilib) nls openmp (pie) sanitize ssp zstd (-custom-cflags) -d -debug -doc (-fixed-point) -go -graphite -hardened -jit (-libssp) -lto -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test -valgrind -vanilla -vtv (-default-stack-clash-protection%*) (-default-znow%*) (-ieee-long-double%) (-modula2%) (-rust%) (-time64%)" 80487 KiB [ebuild NS ] sys-devel/gcc-12.4.1_p20241219:12::gentoo [14.2.1_p20241221:14::gentoo] USE="ada* cet (cxx) (default-stack-clash-protection) (default-znow) fortran (multilib) nls openmp (pie) sanitize ssp zstd (-custom-cflags) -d -debug -doc (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit (-libssp) -lto -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test -valgrind -vanilla -vtv (-modula2%) (-rust%) (-time64%)" 78065 KiB [ebuild NS ] sys-devel/gcc-13.3.1_p20241220:13::gentoo [14.2.1_p20241221:14::gentoo] USE="ada* cet (cxx) (default-stack-clash-protection) (default-znow) fortran (multilib) nls openmp (pie) sanitize ssp zstd (-custom-cflags) -d -debug -doc (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit (-libssp) -lto -modula2 -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test -valgrind -vanilla -vtv (-rust%) (-time64%)" 82573 KiB [ebuild R ] sys-devel/gcc-14.2.1_p20241221:14::gentoo USE="ada* cet (cxx) (default-stack-clash-protection) (default-znow) fortran (multilib) nls openmp (pie) sanitize ssp zstd (-custom-cflags) -d -debug -doc (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit (-libssp) -lto -modula2 -objc -objc++ -objc-gc (-pch) -pgo -rust -systemtap -test (-time64) -valgrind -vanilla -vtv" 0 KiB Total: 5 packages (1 new, 3 in new slots, 1 reinstall), Size of downloads: 285844 KiB Why does it pull three gcc versions now?
See bug 947587. There's a workaround listed in there too.
I masked older versions of gcc and rebuilt gcc with ada useflag. [ebuild R ] sys-devel/gcc-14.2.1_p20241221:14::gentoo USE="ada cet (cxx) (default-stack-clash-protection) (default-znow) fortran (multilib) nls openmp (pie) sanitize ssp zstd (-custom-cflags) -d -debug -doc (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit (-libssp) -lto -modula2 -objc -objc++ -objc-gc (-pch) -pgo -rust -systemtap -test (-time64) -valgrind -vanilla -vtv" 0 KiB Then I tried emerging gnap-gpl but it still fails in the same way as described above. So I started building gnat-gpl with USE=system-bootstrap and I get the following >>> Configuring source in /var/tmp/portage/dev-lang/gnat-gpl-2021-r5/work/gcc-10-2021-20210519-19A74-src ... * strip-flags: CFLAGS: changed ' -O2 -fno-strict-aliasing' to '-O2 -fno-strict-aliasing' * strip-flags: CXXFLAGS: changed ' -O2 -fno-strict-aliasing' to '-O2 -fno-strict-aliasing' * ADAFLAGS="" * CFLAGS="-fno-strict-aliasing -O2" * CPPFLAGS=" -D_GENTOO_TIME64_FORCE=0" * CXXFLAGS="-fno-strict-aliasing -O2" * CCASFLAGS="" * FFLAGS="-march=raptorlake -pipe -ggdb -fno-strict-aliasing -O2" * FCFLAGS="-march=raptorlake -pipe -ggdb -fno-strict-aliasing -O2" * LDFLAGS="" * Testing sys-devel/gcc:14 for Ada ... [ ok ] * PREFIX: /usr * BINPATH: /usr/x86_64-pc-linux-gnu/gcc-bin/10 * LIBPATH: /usr/lib/gcc/x86_64-pc-linux-gnu/10 * DATAPATH: /usr/share/gcc-data/x86_64-pc-linux-gnu/10 * STDCXX_INCDIR: /usr/lib/gcc/x86_64-pc-linux-gnu/10/include/g++-v10 * Languages: c,c++,fortran,ada * GCC version: 14.2.1 * GNAT version: 14.2.1 The Fortran flags are not filtered, the result is that the building still fails as already described
(In reply to Fabio Rossi from comment #7) > I masked older versions of gcc and rebuilt gcc with ada useflag. > > [ebuild R ] sys-devel/gcc-14.2.1_p20241221:14::gentoo USE="ada cet > (cxx) (default-stack-clash-protection) (default-znow) fortran (multilib) nls > openmp (pie) sanitize ssp zstd (-custom-cflags) -d -debug -doc > (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit (-libssp) > -lto -modula2 -objc -objc++ -objc-gc (-pch) -pgo -rust -systemtap -test > (-time64) -valgrind -vanilla -vtv" 0 KiB > > Then I tried emerging gnap-gpl but it still fails in the same way as > described above. I don't understand why you're emerging gnat-gpl at all. I'm trying to say that it's obsolete and it's going to be removed shortly. You don't need it. All you need is sys-devel/gcc[ada], and it'll pull in dev-lang/ada-bootstrap as-required to fulfil the former role of gnat-gpl.
I'm not trying to merge it directly, it is a dep of another package in portage: $ emerge -pv ghdl [ebuild N ] dev-lang/gnat-gpl-2021-r5:10::gentoo USE="(ada) cet (cxx) fortran multilib nls openmp pie sanitize ssp -d -debug -default-stack-clash-protection -default-znow -doc (-fixed-point) (-go) -graphite -hardened (-jit) -libgdiagnostics -libssp (-lto) -modula2 -objc -objc++ -objc-gc (-pch) (-pgo) -rust -system-bootstrap -systemtap -test (-time64) -vanilla -vtv -zstd" 0 KiB [ebuild N ] sci-electronics/ghdl-4.1.0-r1::gentoo USE="static-libs -llvm" ADA_TARGET="gcc_14 gnat_2021 -gcc_12 -gcc_13 -gcc_15" LLVM_SLOT="17 -16" 0 KiB
Seems it's a straggler (though I don't get why it's enabled there for you).
ghdl has ADA_COMPAT=( gnat_2021 gcc_13 )
(In reply to Fabio Rossi from comment #11) > ghdl has ADA_COMPAT=( gnat_2021 gcc_13 ) But you have: `ADA_TARGET="gcc_14 gnat_2021 [...]"`. Do you have a package.use for it or something?
Ok, I found the problem. I had an old package.use forcing ada_target_gnat_2021 for ghdl (the system is new but I copied the old files from the older system where I am upgrading from). After removing the offending line I finally get: !!! The ebuild selected to satisfy "ghdl" has unmet requirements. - sci-electronics/ghdl-4.1.0-r1::gentoo USE="static-libs -llvm" ABI_X86="(64)" ADA_TARGET="gcc_14 -gcc_12 -gcc_13 -gcc_15 -gnat_2021" LLVM_SLOT="17 -16" The following REQUIRED_USE flag constraints are unsatisfied: exactly-one-of ( ada_target_gnat_2021 ada_target_gcc_13 ) The above constraints are a subset of the following complete expression: exactly-one-of ( ada_target_gnat_2021 ada_target_gcc_13 ) llvm? ( static-libs ) exactly-one-of ( llvm_slot_16 llvm_slot_17 ) which is a matter of building gcc-13 or trying to extend ADA_COMPAT of ghdl Thanks for the help!
(In reply to Fabio Rossi from comment #13) > Ok, I found the problem. I had an old package.use forcing > ada_target_gnat_2021 for ghdl (the system is new but I copied the old files > from the older system where I am upgrading from). After removing the > offending line I finally get: > [...] > Thanks for the help! No problem -- and thanks for the motivation to finally last-rite it ;)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50d9cf48986effb0baf5d92103137e7902d6ae5d commit 50d9cf48986effb0baf5d92103137e7902d6ae5d Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-10 00:03:17 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-10 01:54:29 +0000 ada.eclass: drop gnat_2021 (dev-lang/gnat-gpl) support dev-lang/gnat-gpl is being last-rited. Bug: https://bugs.gentoo.org/951054 Signed-off-by: Sam James <sam@gentoo.org> eclass/ada.eclass | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d92b28347e5ddcb569edb421b5ac001e74896a5 commit 5d92b28347e5ddcb569edb421b5ac001e74896a5 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-10 00:01:38 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-10 01:54:28 +0000 sci-electronics/ghdl: drop gnat_2021 We're last-riting gnat-gpl. Bug: https://bugs.gentoo.org/951054 Signed-off-by: Sam James <sam@gentoo.org> sci-electronics/ghdl/ghdl-4.1.0-r1.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2570d850f73e257fbc2b6ef1c3d7468383159109 commit 2570d850f73e257fbc2b6ef1c3d7468383159109 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-10 00:00:39 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-10 01:54:28 +0000 profiles: last-rite dev-lang/gnat-gpl Bug: https://bugs.gentoo.org/951054 Signed-off-by: Sam James <sam@gentoo.org> profiles/package.mask | 5 +++++ 1 file changed, 5 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9869f1d89d87778f9ac6db9de0b99a71c4bc8319 commit 9869f1d89d87778f9ac6db9de0b99a71c4bc8319 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-09 23:59:14 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-10 01:54:27 +0000 profiles/base: mask ada_target_gnat_2021 Obsolete in favour of gcc_*. gnat-gpl will be removed soon. Bug: https://bugs.gentoo.org/951054 Signed-off-by: Sam James <sam@gentoo.org> profiles/base/use.mask | 4 ++++ 1 file changed, 4 insertions(+)