I installed GtkAda using alire and created a project/crate that uses it. This works so far but each time I issue ‘alr edit’ the post fetch actions are executed which involves a complete build of GtkAda.
If I run GNAT studio from the command line gtkada.gpr is not found.
I wonder if there is to keep alire from doing a compete build of GtkAda?
I’m using alire 1.2.1 as unfortunately my Linux system is too old for alire 2.0.
Update: I now figured out how to set GPR_PROJECT_PATH so that gnatstudio finds gtkada.gpr. But that doesn’t keep alr edit from rebuilding GtkAda.
Well, as I wrote, alr edit works, but before launching Gnat studio it performs a complete build of GtkAda (even if the build already happened before), which is somewhat annoying.
Oh, sorry, it’s clear I didn’t pay enough attention.
I tried to reproduce it myself with Alire 2.0, which is the version I’m using, and wasn’t able to do it, so it is either solved with these versions (gtkada or Alire), or something in your setup triggers it.
My steps were:
alr init test_gtkada
cd test_gtkada/
alr with gtkada
alr build
alr edit
Using the following commands to get it in the my standard directory C:\GNAT\gtkada.
Starting with C:\GNAT I used:
alr init --bin gtkada
cd gtkada
alr with gtkada
alr build
I now got the following error message:
ERROR: ******************* BEGIN Alire bug detected *******************
ERROR: Location : 0x7ff68b6fe441 Semantic_Versioning.Basic.Restrictions.First_Index at alire-builds-hashes.adb:87
ERROR: Extra info: Conflicting build hashes for release gtkada=0.1.0-dev
ERROR: Report at : Sign in to GitHub · GitHub
ERROR: Re-run with global switches -vv -d for a full log and stack trace.
ERROR: ******************** END Alire bug detected ********************
I don’t have an existing I just have deleted all files and directories of thelast version(s) that delivered fault message. I never found another way of deleting (or disabling) possible old and faulty versions.
If I understood correctly, you want a Gtkada installation in a specific directory, to be used by simply “with-ing” it in your .gpr file. What I did was
Create a temporary download directory
cd into that dir; then do
alr get gtkada
cd into the dir created by alr (gtkada_<…>); do
alr build
alr install -–prefix=/dir/where/you/want/gtkada/installed
NOTE: in my experience alr install doesn’t install in the requested dir. (I think because in the alr build step ./configure isn’t called with —prefix and it is not possible to give the flag to alr build). After some fiddling and twiddling I was able to install in the preferred dir with gprinstall -Pgtkada —prefix=<…>
NOTE: following the steps as previously posted by @dmitry-kazakov does install in the preferred dir
NOTE: when installed in this way do NOT do “alr with gtkada”; just add the grkada installation to your gpr search path and simply add “with gtkada” to your gpr file
FWIW, when using alr get I never ever have seen messages about updates to a git repo. Could it be that you have a git repo in the root of C:\ ? I hope not …
Wrt the failing of the ./configure script (as executed by alr), Is gcc on your search path? Or is there an AntiVirus active that blocks gcc or gcc generated code. I have F-Secure as AV, and it frequently quarantines gcc generated code.
Or is the PowerShell that causes some problems? I don’t use PS, hate it, I think it is a monstrosity. When I need to use alr and that is rarely, I only use MSYS2 tty.