stcarrez / ada-awa

Ada Web Application - Framework to build high performance secure web applications
Apache License 2.0
96 stars 11 forks source link

Compilation errors building using Alire #29

Closed mgrojo closed 2 years ago

mgrojo commented 2 years ago

What I did:

git clone --recurse-submodules https://github.com/stcarrez/ada-awa.git
cd ada-awa
alr build

On commit: dbbc6c69d43d056f9955759706b61a77a22868f5

Compilation errors:

awa-commands-migrate.adb:44:38: "Upgrade_List" not declared in "Databases"
awa-commands-migrate.adb:51:31: "Scan_Migration" not declared in "Databases"
awa-commands-migrate.adb:68:43: "MIGRATE_PATHS_CONFIG" not declared in "Configs"
awa-commands-migrate.adb:69:67: "MIGRATE_PATHS_CONFIG" not declared in "Configs"
awa-commands-migrate.adb:78:68: "Migrate_Paths_config" not declared in "Configs"
awa-commands-migrate.adb:80:10: invalid prefix in selected component "List"
awa-commands-migrate.adb:85:28: "Sort_Migration" not declared in "Databases"
awa-commands-migrate.adb:88:34: "Run_Migration" not declared in "Databases"
awa-commands-migrate.adb:97:34: "Prepare_Migration" not declared in "Databases"

   compilation of awa-commands-migrate.adb failed

gprbuild: *** compilation phase failed
error: Command ["gprbuild", "-s", "-j0", "-p", "-P", "/home/mgr/src/github/stcarrez/ada-awa/.alire/awa_blogs.gpr"] exited with code 4
error: Compilation failed.
stcarrez commented 2 years ago

You cannot build AWA with Alire that way. I have to publish all the crates and manage the dependencies. It is a very long and painful process.

The alire.toml file is using ADO 2.3.0 but the latest sources are using some additional developments which are not yet released. So, when you run alr build it gets some dependencies that applied to AWA 2.4.0 but they are not correct for the next AWA version.

If you checkout the sources yourself, then, you should run the build steps that I described in AWA documentation. You also have to take care of other dependencies (compiler, XML Ada, AWS, libsqlite, libmariadb, libpq, ...) yourself before running the configure.

./configure
make
mgrojo commented 2 years ago

Ok. Thank you. I thought I might have discovered some bug worth of reporting, but it's already known, I see. I then checked-out tag 2.4.0, and it built cleanly, also using alr build.

So the problem lies in inconsistencies between the versions being in the alire-index and the source code maintained in this repository? Are you aware of Alire pins. That would help to keep the Alire build always working between releases.