#1078144 gcc-14: FTBFS: /bin/bash: line 1: gnatmake: command not found

#1078144#5
Date:
2024-08-07 12:16:56 UTC
From:
To:
Dear maintainers,

Compiling the gcc-14 (14.2.0-1) failed for loong64 in the Debian Package
Auto-Building environment.
For loong64, build-depend on the gdc-14 and gnat-14 frontends.
The error log is as follows,
```
mkdir -p ada/gen_il
cd ada/gen_il; gnatmake -v -g -gnata -gnat2012 -gnatw.g -gnatyg -gnatU
-I/<<PKGBUILDDIR>>/src/gcc/ada gen_il-main
mkdir -p ada/bldtools/snamest
touch ada/GNAT_DATE
cp -p -f ../../src/gcc/ada/libgnat/gnat.ads ada/gnat.ads
/bin/bash: line 1: gnatmake: command not found
make[5]: *** [../../src/gcc/ada/Make-generated.in:21: ada/stamp-gen_il]
Error 127
make[5]: *** Waiting for unfinished jobs....
rm -f ada/bldtools/snamest/snames.ads-tmpl
ada/bldtools/snamest/snames.adb-tmpl ada/bldtools/snamest/snames.h-tmpl
ada/bldtools/snamest/xsnamest.adb ada/bldtools/snamest/xutil.ads
ada/bldtools/snamest/xutil.adb
cp -p ../../src/gcc/ada/snames.ads-tmpl
../../src/gcc/ada/snames.adb-tmpl ../../src/gcc/ada/snames.h-tmpl
../../src/gcc/ada/xsnamest.adb ../../src/gcc/ada/xutil.ads
../../src/gcc/ada/xutil.adb ada/bldtools/snamest
cd ada/bldtools/snamest && gnatmake -v xsnamest && ./xsnamest
/bin/bash: line 1: gnatmake: command not found
make[5]: *** [../../src/gcc/ada/Make-generated.in:49: ada/stamp-snames]
Error 127
make[5]: Leaving directory '/<<PKGBUILDDIR>>/build/gcc'
```

The lastest build log (2024-08-07 09:28:19) can be found at
https://buildd.debian.org/status/fetch.php?pkg=gcc-14&arch=loong64&ver=14.2.0-1&stamp=1723022899&raw=0.

gcc-14 provides gnatmake-14, without gnatmake.
The command gnatmake is used in gcc-14(14.2.0-1)
src/gcc/ada/Make-generated.in.
Please pay attention to the above phenomenon.

Thanks,
Dandan Zhang

#1078144#10
Date:
2024-08-09 13:14:14 UTC
From:
To:
Dear maintainers,

On Wed, 7 Aug 2024 20:16:56 +0800 zhangdandan wrote:


 > gcc-14 provides gnatmake-14, without gnatmake.
 > The command gnatmake is used in gcc-14(14.2.0-1)
 > src/gcc/ada/Make-generated.in.
 > Please pay attention to the above phenomenon.
 >

Refer to gcc-13/gcc-12/gcc-11 on amd64, maybe /usr/bin/gnatmake binary
need to be included in gnat-14 package (built from gcc-14).
root@debian:/home# apt-file search /usr/bin/gnatmake
gnat-11: /usr/bin/gnatmake
gnat-11: /usr/bin/gnatmake-11
gnat-12: /usr/bin/gnatmake
gnat-12: /usr/bin/gnatmake-12
gnat-13: /usr/bin/gnatmake
gnat-13: /usr/bin/gnatmake-13
gnat-14: /usr/bin/gnatmake-14
root@debian:/home# uname -a
Linux debian 6.5.0-3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.8-1
(2023-10-22) x86_64 GNU/Linux
root@debian:/home# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux trixie/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=trixie
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Thanks,
Dandan Zhang

#1078144#15
Date:
2024-08-10 05:27:53 UTC
From:
To:
Control: tags -1 + pending

this is fixed by
https://salsa.debian.org/toolchain-team/gcc/-/commit/2ef9e9ebe48e129a2bc4f209ba1bd43904456440

I would like to see building gnat with the bootstrap tools provided.  I
fixed the first build failure, but now it still fails to build in
libgnat. Maybe adding GNATMAKE and GNATBIND to FLAGS_TO_PASS fixes that?

Also, these patches have to be checked by building a cross compiler, and
by cross-building the package.

CCing debian-ada/Nicolas on this.

#1078144#22
Date:
2024-08-11 02:36:58 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
gcc-14, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1078144@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated gcc-14 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 11 Aug 2024 03:56:24 +0200
Source: gcc-14
Architecture: source
Version: 14.2.0-2
Distribution: unstable
Urgency: medium
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Closes: 1078144
Changes:
 gcc-14 (14.2.0-2) unstable; urgency=medium
 .
   * Update to git 20240811 from the gcc-14 branch.
     - Fix PR target/116287 (x86), PR target/116295 (AVR), PR target/113384 (PA),
       PR tree-optimization/116224, PR target/116189 (SH),
       PR target/116033 (RISCV), PR tree-optimization/116156,
       PR target/116043 (x86), PR target/115981 (x86), PR c++/116223,
       PR c++/112632, PR c++/116071, PR c++/88313, PR c++/115897,
       PR c++/115656, PR c++/115296, PR c++/112288, PR fortran/108889,
       PR target/116007, PR libstdc++/116038, PR libstdc++/115399,
       PR libstdc++/114387, PR libstdc++/115854, PR libstdc++/116070,
       PR libstdc++/116070.
   * Fix two lintian warnings for the control file.
   * Build-depend on pkgconf instead of pkg-config.
   * gnat: Use the GNATBIND/GNATMAKE passed from the toplevel makefile.
     Provide local unversioned symlinks gnatmake and gnatbind for the build.
     Closes: #1078144.
Checksums-Sha1:
 915f7219e652239dfda0815e3d58d0ebb0a3b872 46572 gcc-14_14.2.0-2.dsc
 01c5d1f2577dc516730348c1be15b2c45adef239 1641968 gcc-14_14.2.0-2.debian.tar.xz
 924f6e38aa10740931f20c95a7e7309de4c81051 9529 gcc-14_14.2.0-2_source.buildinfo
Checksums-Sha256:
 ec6f4d89f91eef87f5403e394421f366bc4016161fa65ff01972aae727f3825f 46572 gcc-14_14.2.0-2.dsc
 39186bd12fbe63e10ea6d9284392f31bae05700a47813121e3542895dc2e777c 1641968 gcc-14_14.2.0-2.debian.tar.xz
 23d163d24d0b7b2078a9f7ea084ffccaf078e0455c54c65a50052a9a3700190a 9529 gcc-14_14.2.0-2_source.buildinfo
Files:
 4e420b308d133fc7ab01d572010d2b9d 46572 devel optional gcc-14_14.2.0-2.dsc
 85c487f4b0c2623212ff08aa5a1ad195 1641968 devel optional gcc-14_14.2.0-2.debian.tar.xz
 986b6d96c063da1a523c7f54bfa8b6ee 9529 devel optional gcc-14_14.2.0-2_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAma4GrEQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9exOD/48XgdpkYhPzF7v4orGH++dMbTvXx4xIgDQ
Wrw2Vd5k6ae0m4M5FzKJoWgIENVrhPdEN+d7WUyk8O3/5aq5nsG1mcCFliXlEbDE
OczhmYM698yMaYnnDJMos8albxXRkRebocQEQ1OvkjEyRfTMZrxA/US+PxEb/7p9
zgqNR362W55puMPjnFPqjXTpQjgBIKhAub8KIu9lMtdad2bGEJ9lgAHN9t2/pFFF
JRCfdWBKRpoMbPDmDtT/ERORynQaAtYP3hld5tM/NhuKZxkWzjXkl1ZEz/98S7gN
Zu9xavVVMCyn+aPMmUYcfjLCjvkrBest5x7urbW7VlmMH+yhep5pLH9UlAlcQzxN
wYbjHsyHe/JIV+Cis4FLATyChzyCUsZkulUQUzo6DLx2F3tQvdYnE5cvhx+ptl7l
+6OSKPpKLYaLtncofu7M2bFznhme6ai7q7KCJfxSnEzAPDP3f5p5sM0Ea9jf02P/
eqk5K8wbZptSosI1U178tfSghMC63XnTu0XIugtjdOSu32XFiVUpRWNCjBYVFa+7
V1lC2/3t/4vF/FIHusN7ZFB7SJC0En+tSk2QctrCLDeRN9J80bPA0seOxYg/Ca7S
xBtMisxJl/ljcEVxPpzSrrCXY2oaTYVYkXW9zwxm6ll60jyObTD8oPOWXhE7ehNg
eKyUD+QF9g==
=6EB4
-----END PGP SIGNATURE-----

#1078144#27
Date:
2024-08-11 04:46:47 UTC
From:
To:
keep it open, until everything can be built with the GNATBIND/GNATMAKE
provided by tools configured in the toplevel directory.

#1078144#36
Date:
2025-04-30 13:29:28 UTC
From:
To:
Hello.
I have replaced the local bin/gnat{make,link} symbolic links with
support for GNATMAKE_FOR_BUILD in debian/patches/ada-gnat-name.diff
(a4959c4f).
I have tested
  a normal build                    build=amd  host=amd  target=amd
  cross-building a native compiler  build=amd  host=arm  target=arm
  building a cross-compiler         build=amd  host=amd  target=arm
Matthias, you have restored the symbolic links (173b1d30), so I
suppose you have encountered one more build failure.
Could you please send details so that I can reproduce?

#1078144#41
Date:
2025-04-30 13:36:45 UTC
From:
To:
iirc, I saw that with the gcc-snapshot build, taken from the trunk (16).

https://buildd.debian.org/status/fetch.php?pkg=gcc-snapshot&arch=amd64&ver=1%3A20250423-1&stamp=1745465519&raw=1

the -2 package just added these symlinks.

#1078144#46
Date:
2025-05-01 10:59:36 UTC
From:
To:
Thanks.
ada-gnat-name.diff was not applied during snapshot builds.
45e0cd4d fixes this and removes the symbolic links again.