Weirdness when building Gprbuild 25.0.0

Trying to build gprbuild via bootstrapping process.

Background: On Linux, I have typically compiled gcc with ada from source. Grpbuild (25.0.0) is then built from source via the “bootstrap.sh” ( GitHub - AdaCore/gprbuild: GPRbuild is an advanced build system designed to help automate the construction of multi-language systems. · GitHub ).

The previous success has been with gcc 15.2 and gprbuild 25.0.0. The bootstrapping process had worked simply and flawlessly.

Recently, tried the same procedure with gcc master (version gcc (GCC) 16.0.1 20260327 (experimental)). Gcc builds fine, gnat, gnatmake and friends works fine. However, the bootstrapping process for gprbuild fails. Issuing a “sudo ./bootstrap.sh” yields a quizzical error:

gcc -c -I./ -I/home/foo/GPR/gprbuild-25.0.0/src -I/home/foo/GPR/gprbuild-25.0.0/gpr/src -I../xmlada/sax -I../xmlada/dom -I../xmlada/schema -I../xmlada/unicode -I../xmlada/input_sources -I- /home/foo/GPR/gprbuild-25.0.0/gpr/src/gpr_build_util.adb
gpr-compilation-process.adb:44:29: error: operator for type “String” is not declared in “Env_Maps”
gnatmake: “/home/foo/GPR/gprbuild-25.0.0/gpr/src/gpr-compilation-process.adb” compilation error

The “Env_Maps” is simply a “Containers.Indefinite_Ordered_Maps” as shown in this line from gpr-compilation-process.adb:

package Env_Maps is new Containers.Indefinite_Ordered_Maps (String, String);

The Containers.Indefinite_Ordered_Maps is found in the gcc source code file gcc/ada/libgnat/a-ciorma.adb. The only difference in that file between gcc 15.2.0 and the recent 16.0.1 (experimental) is the copyright date bump.

As the grpbuild files being used are exactly the same whether I used gcc-15.2.0 or gcc-16.0.1 (experimental), and the a-ciorma.adb (containing Containers.Indefinite_Ordered_Maps contains identical code, I am believing there must be an issue with the gnat code of gcc 16.0.1.

Are there any recommendations on how to understand the failure mode on this? (If it is a gcc-16.0.1 gnat error, I would like to file a bugzilla to get it fixed asap.) But, even boiling this down to a minimal example is elusive to me.

All hints/suggestions greatly appreciated.

1 Like

That’s a bug in gprbuild rather than GNAT. It’s fixed on the master branch.

Ahhh… this is very good information. Thanks kindly for pointing me in the right direction on this. Will bootstrap from gprbuild master immediately!

Wow, works like a charm, perfect!