alire icon indicating copy to clipboard operation
alire copied to clipboard

Dependencies libgpr, gnatcoll_gmp error while building

Open octonion opened this issue 3 years ago • 10 comments

The following

alr init --bin test
cd test
alr with libgpr
alr build

fails with numerous errors similar to gpr.adb:1757:13: error: ambiguous expression (cannot resolve "To_Lower"). Likewise, the dependency gnatcoll_gmp will exhibit errors while building.

This is on Linux Ubuntu 20.04, GNAT 2021 community (but same error with GNAT-9 installed via apt-get). I've attached my alire.toml and alire.lock files. toml.zip

octonion avatar Jul 12 '21 00:07 octonion

Thanks for the report, @octonion . I'll look into it.

mosteo avatar Jul 12 '21 07:07 mosteo

This is a run-time incompatibility with the GNAT 2021 release, the package GNAT.Case_Utils has new functions that conflicts with Ada.Characters.Handling. This was fixed in the gprbuild/libgpr repo: https://github.com/AdaCore/gprbuild/commit/d80333875c76f16623bfc0c3d1c2c6f1987993fe#diff-94a9fa9c99dfbf54eb4a3a0773213e4e321faa2056a89427a5d9a9018a3794fd

Fabien-Chouteau avatar Jul 20 '21 15:07 Fabien-Chouteau

Will this problem persist with the new bundled compilers?

mosteo avatar Jul 22 '21 09:07 mosteo

No, I checked and libgpr compiles fine with GNAT FSF 10.

Fabien-Chouteau avatar Jul 23 '21 13:07 Fabien-Chouteau

I'm hitting the same problem. Would it be possible to release a new version of the crate?

1ma avatar Aug 14 '21 18:08 1ma

There are no new major releases available for those projects. The only solution so far is to use an older compiler (e.g. GNAT Community 2020).

Fabien-Chouteau avatar Aug 16 '21 08:08 Fabien-Chouteau

I've been working fine, but compiled first thing this morning and got it for some reason with the error appearing in gpr.adb, gnatcoll-projects.adb and gpr-knowledge.adb. I haven't changed my environment in any way that I'm aware, I tried using 10.3.1 and it also fails.

PS D:\dev\ada\septum> alr toolchain
CRATE         VERSION  STATUS    NOTES
gprbuild      21.0.1   Default
gprbuild      2021.0.0 Available Detected at D:\apps\GNAT\2021\bin\gprbuild.exe
gnat_native   11.2.1   Default
gnat_external 2021.0.0 Available Detected at D:\apps\GNAT\2021\bin\gnat.exe
PS D:\dev\ada\septum> alr toolchain
CRATE         VERSION  STATUS    NOTES
gprbuild      21.0.1   Default
gprbuild      2021.0.0 Available Detected at D:\apps\GNAT\2021\bin\gprbuild.exe
gnat_native   10.3.1   Default
gnat_native   11.2.1   Available
gnat_external 2021.0.0 Available Detected at D:\apps\GNAT\2021\bin\gnat.exe

pyjarrett avatar Sep 19 '21 13:09 pyjarrett

It compiles on my side with GNAT 11.2.1 from Alire.

Fabien-Chouteau avatar Sep 20 '21 10:09 Fabien-Chouteau

It compiles on my side with GNAT 11.2.1 from Alire.

Seems broken with gcc-12

landgraf avatar Jan 28 '22 09:01 landgraf

This doesn't look like issue with Alire. I've got same error with gprbuild (fsf gnat from gcc-12) without alire involved.

landgraf avatar Jan 28 '22 09:01 landgraf