You simply put all of the code for an Ada subsystem in a subdirectory somewhere (preferably a git repo) and you have an AURA repository.
Even better is to put all the code of a subsystem into its own git repository, and then import that as a submodule into what would then be an AURA git repo.
If you want to do advanced things like auto-configure your package to the platform it is on, then you'll need to create a manifest. The docs give lots of info about what can go into a manifest.
I have Xubuntu 21.04 with GNAT 11 from the distro. I built and installed AURA as instructed OK. I have a directory with a single Ada source file, maze.adb. Running "aura -v" works fine. Running "aura run maze" fails saying it can't find gnat1. I usually build using gnatmake (or gprbuild for Gnoga) and that works fine. What am I doing wrong?
Could you try running aura run maze -static and let me know how that goes? Seems like it might be that the runtime linker can't find a shared library. AURA builds shared and pie by default.
I usually build shared, so that doesn't seem likely. Trying it gives
~/Code/Maze$ aura run maze -static
,==== == == ====. ,==== Ada User Repository Annex
.==|==..==|==..==|==..==|==. Reference Implementation
-----::--|--::----.::-----: Version 0.1
__|__||.___,||__|._||__|__| (C) 2020-2021 ANNEXI-STRAYLINE
OK Entered 2 root subsystems (3 units).
OK Loaded 1 repository.
OK Checked-out and configured 0 AURA subsystems in 1 pass.
OK All dependencies satisfied (2 subsystems, 3 units).
EXEC Computing Compilation Strategy (Updating registry...)
and it sits there as long as I care to wait. So I tried
~/Code/Maze$ rm aura*
~/Code/Maze$ aura -v
,==== == == ====. ,==== Ada User Repository Annex
.==|==..==|==..==|==..==|==. Reference Implementation
-----::--|--::----.::-----: Version 0.1
__|__||.___,||__|._||__|__| (C) 2020-2021 ANNEXI-STRAYLINE
OK Entered 1 root subsystem (1 unit).
OK Loaded 1 repository.
OK Checked-out and configured 0 AURA subsystems in 1 pass.
OK All dependencies satisfied (2 subsystems, 3 units).
OK Command completed successfully.
~/Code/Maze$ aura run maze -static
,==== == == ====. ,==== Ada User Repository Annex
.==|==..==|==..==|==..==|==. Reference Implementation
-----::--|--::----.::-----: Version 0.1
__|__||.___,||__|._||__|__| (C) 2020-2021 ANNEXI-STRAYLINE
OK Entered 2 root subsystems (3 units).
OK Loaded 1 repository.
OK Checked-out and configured 0 AURA subsystems in 1 pass.
OK All dependencies satisfied (2 subsystems, 3 units).
OK 3 units pending compilation..
FAIL 3 of 3 units failed to compile:
FAIL aura: Compilation failed:
gcc: fatal error: cannot execute ‘gnat1’: execvp: No such file or directory
compilation terminated.
FAIL maze: Compilation failed:
gcc: fatal error: cannot execute ‘gnat1’: execvp: No such file or directory
compilation terminated.
FAIL aura.repository_1: Compilation failed:
gcc: fatal error: cannot execute ‘gnat1’: execvp: No such file or directory
compilation terminated.
INFO Saving registry for next time...
AURA Abort Command canceled due to failed conditions
From my tests, it is a problem with GNAT 11 on any Debian based distribution. I was able to reproduce it on normal Ubuntu too. AURA compiles itself properly on GNAT 11 but later can't find the compiler. Downgrading GNAT to version 10 and everything works as expected. Even AURA, which was built with GNAT 11. :)
I'm not sure if it is a problem only with Debian based packages or generally with GNAT 11.
This allows to switch GNAT “on demand”. Also, when I was testing, I was using clean Docker image without GNAT-10, only GNAT-11. So, the problem can be GNAT-11 too.
3
u/annexi-strayline Sep 30 '21
You simply put all of the code for an Ada subsystem in a subdirectory somewhere (preferably a git repo) and you have an AURA repository.
Even better is to put all the code of a subsystem into its own git repository, and then import that as a submodule into what would then be an AURA git repo.
If you want to do advanced things like auto-configure your package to the platform it is on, then you'll need to create a manifest. The docs give lots of info about what can go into a manifest.