Hi,
I need to use GNATcoll in my project, the libraries are located under /usr/include/, but I don’t know how to tell gprbuild/gnat or whatever command, to go find the non-standard and non-local libraries under this directory (recursively). I read the user guides but don’t grok anything, it’s too convoluted.
Is there a environment variable like PATH for packages ?
Are you not using Alire?
I tried and failed: "alr search gnatcoll" fails · Issue #1733 · alire-project/alire · GitHub
Does alr search --list
work?
Checked your GPR_PROJECT_PATH
? I think the dir which contains gnatcoll.gpr has to be in the path.
In my .zshrc
I’ve got export GPR_PROJECT_PATH=/opt/gcc-14.1.0-aarch64/share/gpr:$GPR_PROJECT_PATH
No.
stderr: SEMANTIC_VERSIONING.MALFORMED_INPUT
stderr: Empty point number
stderr: raised SEMANTIC_VERSIONING.MALFORMED_INPUT : Empty point number
[/usr/bin/alr]
0x457d88 Semantic_Versioning.Parse.Eat_Number at semantic_versioning.adb:78
0x45981b Semantic_Versioning.Parse.Accept_Number at semantic_versioning.adb:142
0x459b07 Semantic_Versioning.Parse.Accept_Number at semantic_versioning.adb:159
0x459b07 Semantic_Versioning.Parse.Accept_Number at semantic_versioning.adb:159
0x45af3e Semantic_Versioning.Parse at semantic_versioning.adb:179
0x9c0403 Alire.Origins.Deployers.System.Apt.Detect at alire-origins-deployers-system-apt.adb:73
0x89b0b9 Alire.Externals.From_System.Detect at alire-externals-from_system.adb:46
0x8b1a18 Alire.Externals.Lists.Detect at alire-externals-lists.adb:34
0x926d0d Alire.Index.Detect_Externals at alire-index.adb:189
0xd111c2 Alire.Solver.Resolve.Detect_Unavailable_Direct_Dependencies.2 at alire-solver.adb:1220
0xcf76b7 Alire.Solver.Resolve at alire-solver.adb:1296
0xcf4f06 Alire.Solver.Is_Resolvable at alire-solver.adb:182
0x4cc6d7 Alr.Commands.Search.Execute at alr-commands-search.adb:54
0x4ce424 Alr.Commands.Search.Execute at alr-commands-search.adb:101
0x4cfbb0 Alr.Commands.Search.Execute at alr-commands-search.adb:225
0x4d0f73 Alr.Commands.Search.Execute at alr-commands-search.adb:273
0x4cb8b8 Alr.Commands.Search.Execute at alr-commands-search.adb:302
0x4cbce7 Alr.Commands.Search.Execute at alr-commands-search.adb:23
0x53939b Alr.Commands.Sub_Cmd.Execute at clic-subcommand-instance.adb:749
0x54587e Alr.Commands.Execute at alr-commands.adb:561
0x436183 Alr.Main at alr-main.adb:13
0x438de1 Main at b__alr-main.adb:2257
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fd8d79d7c88
0x7fd8d79d7d43
[/usr/bin/alr]
0x43601c _start at ???
0xfffffffffffffffe
error: Empty point number
error: alr encountered an unexpected error, re-run with -d for details.
error: error location: 0x457d88 Semantic_Versioning.Parse.Eat_Number
% locate gnatcoll.gpr
/opt/gcc-13.2.0-aarch64/share/gpr/gnatcoll.gpr
/opt/gcc-14.1.0-aarch64/share/gpr/gnatcoll.gpr
/opt/gcc-14.1.0-x86_64/share/gpr/gnatcoll.gpr
%
Did you find gnatcoll.gpr and make sure that the path is set?
Yes but I see no change (extracts):
> echo $GPR_PROJECT_PATH
/usr/share/gpr
> gnatmake *.adb
diary.adb:16:06: error: file "gnatcoll.ads" not found
gnatmake: "diary-diary_view.adb" compilation error
> alr search --list
[..........]
error: Empty point number
error: error location: 0x457d88 Semantic_Versioning.Parse.Eat_Number at semantic_versioning.adb:78
I don’t think gnatmake
will use GPR_PROJECT_PATH
. Use gprbuild
instead, or try with gnatmake -P yourproject.gpr
(which should behave in the same way as gprbuild
, but without any advantage, I think).
If you don’t have a GPR file yet, try with this:
with "gnatcoll"
project Diary is
for Source_Dirs use (".");
for Object_Dir use "obj";
end Diary;
Is there a gnatcoll.gpr
located in your /usr/share/gpr
?
How did you install gcc
, gnatcoll-core
and gnatcoll-bindings
?
yes, that’s how I found the directory in the first place. I installed gcc and gnat through my debian’s official repos. I can try and install things manually too. As for gnatcoll, I downloaded this and ran the corresponding scripts.