Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bib1963 opened this issue May 24, 2022 · 1 comment
Assignees

Comments

@bib1963
Copy link

bib1963 commented May 24, 2022

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.

@bib1963 bib1963 changed the title Build errors: gpr-util-put_resource_usage.adb missing & requires -gnat2022 switch Build errors: gpr-util-put_resource_usage.adb missing & requires -gnat2020 switch May 24, 2022
@t-14
Copy link
Contributor

t-14 commented May 24, 2022

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.

adacore-bot pushed a commit that referenced this issue May 26, 2022
#112
(no-tn-check)

Change-Id: If02bcf17c39ef0720e223207b6ab47d4bce596f3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants