Gprconfig: can't find native toolchain for language 'ada'

Hello,

I have installed the gnat-10 Debian package on Linux and I can build Ada sources using gnatmake but gprconfig is not detecting my Ada compiler.

Here are some outputs that I’ve collected from my system:

gprconfig output:

$ gprconfig
--------------------------------------------------
gprconfig has found the following compilers on your PATH.
Only those matching the target and the selected compilers are displayed.
   1. GCC-ASM for Asm in /usr/local/bin/ version 13.2.0
   2. GCC-ASM for Asm in /usr/bin/ version 11.4.0
   3. GCC-ASM for Asm2 in /usr/local/bin/ version 13.2.0
   4. GCC-ASM for Asm2 in /usr/bin/ version 11.4.0
   5. GCC-ASM for Asm_Cpp in /usr/local/bin/ version 13.2.0
   6. GCC-ASM for Asm_Cpp in /usr/bin/ version 11.4.0
   7. LD for Bin_Img in /usr/bin/ version 2.38
   8. GCC for C in /usr/local/bin/ version 13.2.0
   9. GCC for C in /usr/bin/ version 11.4.0
  10. G++ for C++ in /usr/bin/ version 11.4.0
Select or unselect the following compiler (or "s" to save):

gprconfig targets:

$ gprconfig --show-targets
List of targets supported by a compiler:
x86_64-linux (native target)
x86_64-linux

gcc version:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../src/configure --prefix=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/gcc/install --with-build-time-tools=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/binutils/install/bin --enable-languages=c,ada,c++ --enable-libstdcxx --enable-libstdcxx-threads --enable-libada --disable-nls --without-libiconv-prefix --disable-libstdcxx-pch --enable-lto --disable-multilib --enable-threads=posix --with-gnu-ld --with-gnu-as --with-mpfr=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/mpfr/install --with-gmp=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/gmp/install --with-mpc=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/mpc/install --with-isl=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/isl/install --build=x86_64-pc-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (GCC)

Any help would be greatly appreciated.

Thanks,
N

1 Like

I got this working with some help from Alire (see below):

Use the toolchain assistant:

$ alr toolchain --select
Welcome to the toolchain selection assistant     

In this assistant you can set up the default toolchain to be used with any crate
that does not specify its own top-level dependency on a version of gnat or 
gprbuild.

If you choose "None", Alire will use whatever version is found in the 
environment.

ⓘ Currently configured: gnat_native=13.2.1

Please select the gnat version for use with this configuration
  1. gnat_native=13.2.1
  2. None
  3. gnat_arm_elf=13.2.1
  4. gnat_avr_elf=13.2.1
  5. gnat_riscv64_elf=13.2.1
  6. gnat_arm_elf=13.1.0
  7. gnat_avr_elf=13.1.0
  8. gnat_native=13.1.0
  9. gnat_riscv64_elf=13.1.0
  0. gnat_arm_elf=12.2.1
  a. (See more choices...)
Enter your choice index (first is default): 
> 1
ⓘ Selected tool version gnat_native=13.2.1

ⓘ Choices for the following tool are narrowed down to releases compatible with just selected gnat_native=13.2.1

ⓘ Currently configured: gprbuild=22.0.1

Please select the gprbuild version for use with this configuration
  1. gprbuild=22.0.1
  2. None
  3. gprbuild=21.0.2
  4. gprbuild=21.0.1
Enter your choice index (first is default): 
> 1
ⓘ Selected tool version gprbuild=22.0.1

Next run ‘alr printenv’ and use these settings in your environment configuration.

1 Like

gprconfig can be a bit picky. Your 13.2.0 compiler has target x86_64-pc-linux-gnu, but gprconfig is looking for x86_64-linux. The matching logic in gprconfig isn’t simple; this might work better with gprconfig --target=x86_64-pc-linux-gnu.

Not sure why that gprconfig didn’t see the Debian package, though.

It’s always best to use a gprconfig/gprbuild built by the compiler you want it to detect! which is why alr toolchain --select worked.

Thanks Simon.

What I don’t understand is why gprconfig does not detect the gcc that is installed by the gnat package (‘gcc’ 11.4.0) which is located in PATH at /usr/bin/gcc

Here is the output of gcc:

$ /usr/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)

gprconfig output (with target):

$ gprconfig --target=x86_64-linux-gnu
--------------------------------------------------
gprconfig has found the following compilers on your PATH.
Only those matching the target and the selected compilers are displayed.
   1. GNAT for Ada in /home/computer/.config/alire/cache/dependencies/gnat_native_13.2.1_788a01f9/bin/ version 13.2 (default runtime)
   2. GCC-ASM for Asm in /home/computer/.config/alire/cache/dependencies/gnat_native_13.2.1_788a01f9/bin/ version 13.2.0
   3. GCC-ASM for Asm in /usr/local/bin/ version 13.2.0
   4. GCC-ASM for Asm in /usr/bin/ version 11.4.0
   5. GCC-ASM for Asm2 in /home/computer/.config/alire/cache/dependencies/gnat_native_13.2.1_788a01f9/bin/ version 13.2.0
   6. GCC-ASM for Asm2 in /usr/local/bin/ version 13.2.0
   7. GCC-ASM for Asm2 in /usr/bin/ version 11.4.0
   8. GCC-ASM for Asm_Cpp in /home/computer/.config/alire/cache/dependencies/gnat_native_13.2.1_788a01f9/bin/ version 13.2.0
   9. GCC-ASM for Asm_Cpp in /usr/local/bin/ version 13.2.0
  10. GCC-ASM for Asm_Cpp in /usr/bin/ version 11.4.0
  11. LD for Bin_Img in /home/computer/.config/alire/cache/dependencies/gnat_native_13.2.1_788a01f9/bin/ version 2.40
  12. LD for Bin_Img in /usr/bin/ version 2.38
  13. GCC for C in /home/computer/.config/alire/cache/dependencies/gnat_native_13.2.1_788a01f9/bin/ version 13.2.0
  14. GCC for C in /usr/local/bin/ version 13.2.0
  15. GCC for C in /usr/bin/ version 11.4.0  
  16. G++ for C++ in /home/computer/.config/alire/cache/dependencies/gnat_native_13.2.1_788a01f9/bin/ version 13.2.0
  17. G++ for C++ in /usr/bin/ version 11.4.0
Select or unselect the following compiler (or "s" to save):

GNAT tools are installed in /usr/bin:

$ ls /usr/bin/gnat*
/usr/bin/gnat         /usr/bin/gnatchop-10   /usr/bin/gnatgcc      /usr/bin/gnatlink     /usr/bin/gnatmake-10  /usr/bin/gnatprove
/usr/bin/gnat-10      /usr/bin/gnatclean     /usr/bin/gnathtml     /usr/bin/gnatlink-10  /usr/bin/gnatname     /usr/bin/gnatxref
/usr/bin/gnatbind     /usr/bin/gnatclean-10  /usr/bin/gnathtml-10  /usr/bin/gnatls       /usr/bin/gnatname-10  /usr/bin/gnatxref-10
/usr/bin/gnatbind-10  /usr/bin/gnatfind      /usr/bin/gnatkr       /usr/bin/gnatls-10    /usr/bin/gnatprep
/usr/bin/gnatchop     /usr/bin/gnatfind-10   /usr/bin/gnatkr-10    /usr/bin/gnatmake     /usr/bin/gnatprep-10

So, it looks like it cannot find the runtime associated with the compiler installed at /usr/bin:

gprconfig verbose shows:

$ gprconfig -v --target=x86_64-linux-gnu
...snip...
   GNAT is candidate: filename=gnatls    
     target: executing "gcc -dumpmachine" output=<use -v -v> no match    
     target: grep matched="x86_64-linux-gnu"    
     version: executing "gnatls -v --version" output=<use -v -v> no match    
     version: grep matched="10.5"    
     variables: executing "gcc -v" output=<use -v -v> no match    
     variables: grep matched="11.4.0"    
     languages: constant := Ada
     runtimes: search directories matching \.\./lib/gcc(-lib)?/x86_64-linux-gnu/11.4.0/adalib/, starting from /usr/bin/    
       <dir>: Recurse into /usr/bin/..
       <dir>: Recurse into /usr/lib    
       <dir>: Check directories in /usr/lib/ that match gcc(-lib)?    
       <dir>: Matched gcc    
       <dir>: Recurse into /usr/lib/gcc/x86_64-linux-gnu    
       <dir>: Check directories in /usr/lib/gcc/x86_64-linux-gnu/ that match 11.4.0
     Done search directories
     runtimes: search directories matching \.\./lib/gcc(-lib)?/x86_64-linux-gnu/11.4.0/ada_object_path, starting from /usr/bin/    
       <dir>: Recurse into /usr/bin/..    
       <dir>: Recurse into /usr/lib    
       <dir>: Check directories in /usr/lib/ that match gcc(-lib)?    
       <dir>: Matched gcc    
       <dir>: Recurse into /usr/lib/gcc/x86_64-linux-gnu    
       <dir>: Check directories in /usr/lib/gcc/x86_64-linux-gnu/ that match 11.4.0    
     Done search directories                                                                                                                                            
     runtimes: search directories matching \.\./lib/gcc(-lib)?/x86_64-linux-gnu/11.4.0/rts-(.*)/adalib/, starting from /usr/bin/    
       <dir>: Recurse into /usr/bin/..    
       <dir>: Recurse into /usr/lib    
       <dir>: Check directories in /usr/lib/ that match gcc(-lib)?    
       <dir>: Matched gcc    
       <dir>: Recurse into /usr/lib/gcc/x86_64-linux-gnu    
       <dir>: Check directories in /usr/lib/gcc/x86_64-linux-gnu/ that match 11.4.0    
     Done search directories    
     runtimes: search directories matching \.\./x86_64-linux-gnu/lib/gnat/(.*)/adalib/, starting from /usr/bin/    
       <dir>: Recurse into /usr/bin/..    
       <dir>: No such directory: /usr/x86_64-linux-gnu    
     Done search directories    
     No runtime found where one is required for: /usr/bin/
...snip...

I wonder where your gprconfig came from? The Debian gprbuild package includes one, installed in /usr/bin, so you’d think it’d match the compiler.

$ which gprconfig
$ gprconfig --version.

Here is the gprconfig that is first selected by the PATH:

$ which gprconfig
/usr/local/bin/gprconfig

$ gprconfig --version
GPRCONFIG 22.0.0 (2023-10-20) (x86_64-pc-linux-gnu)
Copyright (C) 2006-2023, AdaCore
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I just noticed there are two gprconfigs installed, one in /usr/bin and one in /usr/local/bin. One of them detects an Ada compiler (and runtime) and the other does not.

/usr/local/bin:

$ /usr/local/bin/gprconfig --version
GPRCONFIG 22.0.0 (2023-10-20) (x86_64-pc-linux-gnu)
Copyright (C) 2006-2023, AdaCore
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ /usr/local/bin/gprconfig
--------------------------------------------------
gprconfig has found the following compilers on your PATH.
Only those matching the target and the selected compilers are displayed.
   1. GCC-ASM for Asm in /usr/local/bin/ version 13.2.0
   2. GCC-ASM for Asm in /usr/bin/ version 11.4.0
   3. GCC-ASM for Asm2 in /usr/local/bin/ version 13.2.0
   4. GCC-ASM for Asm2 in /usr/bin/ version 11.4.0
   5. GCC-ASM for Asm_Cpp in /usr/local/bin/ version 13.2.0
   6. GCC-ASM for Asm_Cpp in /usr/bin/ version 11.4.0
   7. LD for Bin_Img in /usr/bin/ version 2.38
   8. GCC for C in /usr/local/bin/ version 13.2.0
   9. GCC for C in /usr/bin/ version 11.4.0
  10. G++ for C++ in /usr/bin/ version 11.4.0
Select or unselect the following compiler (or "s" to save):

/usr/bin:

$ /usr/bin/gprconfig --version
GPRCONFIG Pro 18.0w (19940713) (x86_64-pc-linux-gnu)
Copyright (C) 2006-2016, AdaCore
This is free software; see the source for copying conditions.
See your AdaCore support agreement for details of warranty and support.
If you do not have a current support agreement, then there is absolutely
no warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
$ /usr/bin/gprconfig
--------------------------------------------------
gprconfig has found the following compilers on your PATH.
Only those matching the target and the selected compilers are displayed.
   1. GNAT for Ada in /usr/bin/ version 10.5 (default runtime)
   2. GCC-ASM for Asm in /usr/local/bin/ version 13.2.0
   3. GCC-ASM for Asm in /usr/bin/ version 11.4.0
   4. GCC-ASM for Asm2 in /usr/local/bin/ version 13.2.0
   5. GCC-ASM for Asm2 in /usr/bin/ version 11.4.0
   6. GCC-ASM for Asm_Cpp in /usr/local/bin/ version 13.2.0
   7. GCC-ASM for Asm_Cpp in /usr/bin/ version 11.4.0
   8. LD for Bin_Img in /usr/bin/ version 2.38
   9. GCC for C in /usr/local/bin/ version 13.2.0
  10. GCC for C in /usr/bin/ version 11.4.0
  11. G++ for C++ in /usr/bin/ version 11.4.0
Select or unselect the following compiler (or "s" to save):

To find the ada runtime I used:

$ find / 2> /dev/null | grep system\.ads$
/usr/lib/gcc/x86_64-linux-gnu/10/adainclude/system.ads

I would expect both gprconfigs to be able to detect an Ada compiler because each toolchain has an Ada compiler:

$ /usr/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
$ /usr/local/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../src/configure --prefix=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/gcc/install --with-build-time-tools=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/binutils/install/bin --enable-languages=c,ada,c++ --enable-libstdcxx --enable-libstdcxx-threads --enable-libada --disable-nls --without-libiconv-prefix --disable-libstdcxx-pch --enable-lto --disable-multilib --enable-threads=posix --with-gnu-ld --with-gnu-as --with-mpfr=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/mpfr/install --with-gmp=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/gmp/install --with-mpc=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/mpc/install --with-isl=/home/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-linux/isl/install --build=x86_64-pc-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (GCC)

So would I. Anyone else got any thoughts?

I wanted to try a fresh installation of Emacs ada-mode, to see if there are still rough points, and I’ve reproduced this problem (using a clean user account under Ubuntu 22.04).

tester@mgr:~/.emacs.d/elpa/ada-mode-8.1.0$ ./build.sh
alr is /home/tester/.local/bin/alr
building ada-mode executables via Alire
Clonando en '/home/tester/.config/alire/indexes/community/repo'...
remote: Enumerating objects: 9854, done.
remote: Counting objects: 100% (2281/2281), done.
remote: Compressing objects: 100% (589/589), done.
remote: Total 9854 (delta 1829), reused 1897 (delta 1650), pack-reused 7573
Recibiendo objetos: 100% (9854/9854), 1.74 MiB | 1.51 MiB/s, listo.
Resolviendo deltas: 100% (5535/5535), listo.
ⓘ Deploying emacs_ada_mode=8.1.0...                                      
Clonando en '/home/tester/.emacs.d/elpa/ada-mode-8.1.0/alr-lbku.tmp'...
remote: Counting objects: 48758, done.
remote: Compressing objects: 100% (10336/10336), done.
remote: Total 48758 (delta 38298), reused 48758 (delta 38298)
Recibiendo objetos: 100% (48758/48758), 240.39 MiB | 2.27 MiB/s, listo.
Resolviendo deltas: 100% (38298/38298), listo.
warning: remoto HEAD refiere a un ref inexistente, no se puede hacer checkout.

ⓘ Deploying stephes_ada_library=3.7.3...
Clonando en '/home/tester/.local/share/alire/releases/alr-vglx.tmp'...
remote: Counting objects: 48758, done.
remote: Compressing objects: 100% (10336/10336), done.
remote: Total 48758 (delta 38298), reused 48758 (delta 38298)
Recibiendo objetos: 100% (48758/48758), 240.39 MiB | 2.08 MiB/s, listo.
Resolviendo deltas: 100% (38298/38298), listo.
warning: remoto HEAD refiere a un ref inexistente, no se puede hacer checkout.

ⓘ Deploying xmlada=22.0.0...                                                                 
      -=O=-    #     #      #      #                                                                    
ⓘ Deploying libgpr=22.0.0...                                                     
    -=O#-  #     #     #                                                                                
ⓘ Deploying gnatcoll=22.0.0...                                                   
   -=#=- #     #     #                                                                                  
ⓘ Deploying wisitoken=4.2.1...                                                     
Clonando en '/home/tester/.local/share/alire/releases/alr-nlwr.tmp'...
remote: Counting objects: 48758, done.
remote: Compressing objects: 100% (10336/10336), done.
remote: Total 48758 (delta 38298), reused 48758 (delta 38298)
Recibiendo objetos: 100% (48758/48758), 240.39 MiB | 2.44 MiB/s, listo.
Resolviendo deltas: 100% (38298/38298), listo.
warning: remoto HEAD refiere a un ref inexistente, no se puede hacer checkout.

ⓘ Deploying emacs_wisi=4.3.2...                                                    
Clonando en '/home/tester/.local/share/alire/releases/alr-sdkz.tmp'...
remote: Counting objects: 48758, done.
remote: Compressing objects: 100% (10336/10336), done.
remote: Total 48758 (delta 38298), reused 48758 (delta 38298)
Recibiendo objetos: 100% (48758/48758), 240.39 MiB | 2.73 MiB/s, listo.
Resolviendo deltas: 100% (38298/38298), listo.
warning: remoto HEAD refiere a un ref inexistente, no se puede hacer checkout.

                                                                                    
emacs_ada_mode=8.1.0 successfully retrieved.
Dependencies were solved as follows:                                                     

   +   emacs_wisi          4.3.2  (new)
   +📦 gnat                12.3.0 (new,gnat_external,executable in path)
   +   gnatcoll            22.0.0 (new,indirect)
   +   libgpr              22.0.0 (new,indirect)
   +📦 re2c                3.0.0  (new,system package)
   +   stephes_ada_library 3.7.3  (new)
   +   wisitoken           4.2.1  (new)
   +   xmlada              22.0.0 (new,indirect)

ⓘ Alire has selected automatically this toolchain:
   gprbuild=22.0.1
   gnat_native=13.2.1
You can select a different toolchain at any time with `alr toolchain --select`
Download will start now:
Press Enter to continue or Ctrl-C to abort

ⓘ Deploying gprbuild=22.0.1...
################################################################################################## 100,0%
ⓘ gprbuild=22.0.1 installed successfully.
ⓘ Deploying gnat_native=13.2.1...
################################################################################################## 100,0%
ⓘ gnat_native=13.2.1 installed successfully.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ⓘ Running post-fetch actions for xmlada=22.0.0...                        
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking whether gnat can build shared libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
configure: creating ./config.status
config.status: creating xmlada_shared.gpr
config.status: creating Makefile
config.status: creating tests/dom/default.gpr
ⓘ Building wisitoken=4.2.1/build/wisitoken_alire.gpr (1/2)...
gnatcoll.gpr:254:07: warning: value "windows" is not used as label
gprconfig: can't find a native toolchain for language 'ada'
gprconfig: can't find a native toolchain for language 'ada'
Setup
   [mkdir]        object directory for project XmlAda_Sax
   [mkdir]        library directory for project XmlAda_Sax
   [mkdir]        object directory for project XmlAda_Schema
   [mkdir]        object directory for project GPR
   [mkdir]        library directory for project GPR
   [mkdir]        object directory for project GnatColl
   [mkdir]        library directory for project GnatColl
   [mkdir]        object directory for project Stephes_Ada_Library
   [mkdir]        exec directory for project Stephes_Ada_Library
   [mkdir]        object directory for project Wisitoken_Alire
   [mkdir]        library directory for project Wisitoken_Alire
xmlada_unicode.gpr:26:09: warning: there are no sources of language "C" in this project
xmlada_sax.gpr:28:09: warning: there are no sources of language "C" in this project
xmlada_input.gpr:27:09: warning: there are no sources of language "C" in this project
xmlada_dom.gpr:28:09: warning: there are no sources of language "C" in this project
xmlada_schema.gpr:29:09: warning: there are no sources of language "C" in this project
stephes_ada_library.gpr:21:09: warning: there are no sources of language "C" in this project
gpr.gpr:21:17: no compiler for language "Ada", cannot compile "gpr-nmsc.ads"
gprbuild: *** compilation phase failed
error: Command ["gprbuild", "-s", "-j0", "-p", "-P", "/home/tester/.local/share/alire/builds/wisitoken_4.2.1_dc778486/df017e61466065dc300f4a800276b91f9e60761ca70ebabeff76ebc55fb9d345/build/wisitoken_alire.gpr"] exited with code 4
error: Compilation failed.

Steps:

  • Install alr v2.0
  • In emacs 27.1, install the ada-mode package and follow instructions, that is:
cd ~/.emacs.d/elpa/ada-mode-8.1.0
./build.sh

Installed packages in my case are:

ii  gnat-12        12.3.0-1ubuntu1~22.04 amd64        GNU Ada compiler
ii  gprbuild       2021.0.0.0778b109-5 amd64        multi-language extensible build tool

But gprbuild on its own is able to compile a simple program.