AdaCore / gprbuild

GPRbuild is an advanced build system designed to help automate the construction of multi-language systems.
Other
65 stars 21 forks source link

Build errors: gpr-util-put_resource_usage.adb missing & requires -gnat2020 switch #112

Open bib1963 opened 2 years ago

bib1963 commented 2 years ago

Trying to build latest git update.

It fails with:

./bootstrap.sh --with-xmlada=../xmlada --with-kb=../gprconfig_kb --prefix=./bootstrap
gcc -c -I./ -I/home/src/build/Ada/gprbuild/src -I/home/src/build/Ada/gprbuild/gpr/src -I../xmlada/sax -I../xmlada/dom -I../xmlada/schema -I../xmlada/unicode -I../xmlada/input_sources -I- /home/src/build/Ada/gprbuild/src/gprbuild-main.adb
cannot generate code for file gprbuild-main.adb (missing subunits)
gpr-util.adb:4085:04: warning: subunit "Gpr.Util.Put_Resource_Usage" in file "gpr-util-put_resource_usage.adb" not found
gnatmake: "/home/src/build/Ada/gprbuild/src/gprbuild-main.adb" compilation error

Symlinking gpr-util-put_resource_usage__unix.adb to gpr-util-put_resource_usage.adb works, but I see no info to complete such a step in the README.md file. I don't even know if this is the correct thing to do.

I also get the error:

gcc -c -I./ -I/home/src/build/Ada/gprbuild/src -I/home/src/build/Ada/gprbuild/gpr/src -I../xmlada/sax -I../xmlada/dom -I../xmlada/schema -I../xmlada/unicode -I../xmlada/input_sources -I- /home/src/build/Ada/gprbuild/src/gprbuild-link.adb
gprbuild-link.adb:1425:17: object renaming without subtype is an Ada 2020 feature
gprbuild-link.adb:1425:17: unit must be compiled with -gnat2020 switch
gprbuild-link.adb:2767:27: object renaming without subtype is an Ada 2020 feature
gprbuild-link.adb:2767:27: unit must be compiled with -gnat2020 switch

Editing bootstrap.sh and adding -gnat2020 to inc_flags works, but again, I have no idea if this is the correct thing to do.

This is using gcc-11.3.0.

If these errors are due to not using a compliant Ada2020 compiler, then the README.md should reflect that.

t-14 commented 2 years ago

Thanks for the heads up. Clearly a fallout from 38ebfdf and some other recent changes. We'll review this; your workarounds look correct in the meantime.