0

So far I have downloaded GNAT GPS Community and installed this on my Linux Centos 7 machine.

My objective is to be able to complete these two online examples:

1: http://bisaga.com/blog/programming/ada-database-first-steps/ 2: https://docs.adacore.com/gnatcoll-docs/sql.html

To do this I need to install the sql and postgres libraries from here: https://github.com/AdaCore/gnatcoll-db

I know that the postgres library relies on the sql library, so I am attempting to install the sql library first! I have tried installing these libraries in various ways, as you will see if you look at my previous questions...

I am currently attempting to build these libraries from GNAT GPS, Please see the screenshot below of what my project looks like, I’ve included white dots next to the fields I have changed!

GPS I manually entered the version of GNAT GPS I’m using, the library directory, and for version I added common.

When I attempt to build this I am presented with the following error...

enter image description here

I am unsure if is possible to install the library this way, any advice on whether this is possible would be greatly appreciated.

I think I have massively over complicated installing this library. If anyone knows of a step by step install process that is available online, please do let me know.

I have also attempted to build this using gprbuild, I recieve the following error.

[parallels@localhost sql]$ gprbuild -P gnatcoll_sql.gpr --target=/home/parallels/opt/GNAT/2019/bin
gnatcoll_sql.gpr:44:52: unknown variable "So_Ext"
gnatcoll.gpr:8:06: unknown project file: "directories"
gnatcoll.gpr:8:06: imported by "/usr/share/gpr/gnatcoll.gpr"
gnatcoll.gpr:8:06: imported by "/home/parallels/Desktop/gnatcoll-db-master/sql/gnatcoll_sql.gpr"
gnatcoll.gpr:31:25: unknown package or project "Directories"
gprbuild: "gnatcoll_sql.gpr" processing failed
[parallels@localhost sql]$ 

I am using Linux Centos 7, and GNAT GPS is installed here: /home/parallels/opt/GNAT/2019/bin/gps


Added 16/04/20

Currently when I run make, then make install I recieve errors (This is why I was looking for a workaround):

[parallels@localhost sql]$ make
which: no gnatls in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/var/lib/snapd/snap/bin:/home/parallels/.local/bin:/home/parallels/bin)
gprbuild -p -m --target=executable:gcc  -j0 -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
    gnatcoll_sql.gpr
gnatcoll_sql.gpr:44:52: unknown variable "So_Ext"
gnatcoll.gpr:8:06: unknown project file: "directories"
gnatcoll.gpr:8:06: imported by "/usr/share/gpr/gnatcoll.gpr"
gnatcoll.gpr:8:06: imported by "/home/parallels/Desktop/gnatcoll-db-master/sql/gnatcoll_sql.gpr"
gnatcoll.gpr:31:25: unknown package or project "Directories"
gprbuild: "gnatcoll_sql.gpr" processing failed
make: *** [build-static] Error 4
[parallels@localhost sql]$ make install
which: no gnatls in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/var/lib/snapd/snap/bin:/home/parallels/.local/bin:/home/parallels/bin)
gprinstall -p -f --target=x86_64-redhat-linux -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  --sources-subdir=include/gnatcoll_sql --prefix=.. -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
    --build-name=static --build-var=LIBRARY_TYPE gnatcoll_sql.gpr
make: gprinstall: Command not found
make: *** [install-static] Error 127
[parallels@localhost sql]$ 

Added 17/04/20 09:00

[parallels@localhost gnatcoll-db]$ echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/var/lib/snapd/snap/bin:/home/parallels/.local/bin:/home/parallels/bin/home/parallels/opt/GNAT/2019/bin
[parallels@localhost gnatcoll-db]$ export PATH=$PATH/home/parallels/opt/GNAT/2019/bin
[parallels@localhost gnatcoll-db]$ echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/var/lib/snapd/snap/bin:/home/parallels/.local/bin:/home/parallels/bin/home/parallels/opt/GNAT/2019/bin/home/parallels/opt/GNAT/2019/bin
[parallels@localhost gnatcoll-db]$ ls
CONTRIBUTING.md  COPYING.RUNTIME  gen_gps_help.py  gnat_debug.adc  postgres   sql     testsuite            xref
COPYING3         docs             gnatcoll_db2ada  gnatinspect     README.md  sqlite  version_information
[parallels@localhost gnatcoll-db]$ make -w -C sql setup
make: Entering directory `/home/parallels/Desktop/gnatcoll-db/sql'
make: Leaving directory `/home/parallels/Desktop/gnatcoll-db/sql'
[parallels@localhost gnatcoll-db]$ make -w -C sql clean build
make: Entering directory `/home/parallels/Desktop/gnatcoll-db/sql'
gprclean -q  -XGNATCOLL_VERSION=0.0 -XBUILD=PROD -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
    gnatcoll_sql.gpr
gprclean: project file "gnatcoll_sql.gpr" not found in .::/usr/share/gpr:/usr/lib/gnat
make: [clean-static] Error 4 (ignored)
gprclean -q  -XGNATCOLL_VERSION=0.0 -XBUILD=PROD -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -XGPR_BUILD=relocatable \
    gnatcoll_sql.gpr
gprclean: project file "gnatcoll_sql.gpr" not found in .::/usr/share/gpr:/usr/lib/gnat
make: [clean-relocatable] Error 4 (ignored)
gprclean -q  -XGNATCOLL_VERSION=0.0 -XBUILD=PROD -XLIBRARY_TYPE=static-pic -XXMLADA_BUILD=static-pic -XGPR_BUILD=static-pic \
    gnatcoll_sql.gpr
gprclean: project file "gnatcoll_sql.gpr" not found in .::/usr/share/gpr:/usr/lib/gnat
make: [clean-static-pic] Error 4 (ignored)
gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
    gnatcoll_sql.gpr
gprbuild: project file "gnatcoll_sql.gpr" not found in .::/usr/x86_64-linux/lib/gnat:/usr/share/gpr:/usr/lib/gnat
make: *** [build-static] Error 4
make: Leaving directory `/home/parallels/Desktop/gnatcoll-db/sql'
[parallels@localhost gnatcoll-db]$ 

Added 17/04/20 10:30


1  [parallels@localhost ~]$ git clone https://github.com/AdaCore/gnatcoll-db
2  Cloning into 'gnatcoll-db'...
3  remote: Enumerating objects: 61, done.
4  remote: Counting objects: 100% (61/61), done.
5  remote: Compressing objects: 100% (61/61), done.
6  remote: Total 17399 (delta 27), reused 34 (delta 0), pack-reused 17338
7  Receiving objects: 100% (17399/17399), 12.63 MiB | 2.21 MiB/s, done.
8  Resolving deltas: 100% (13119/13119), done.
9  [parallels@localhost ~]$ PATH=/opt/GNAT/2019/bin/:$PATH
10 [parallels@localhost ~]$ echo $PATH
11 /opt/GNAT/2019/bin/:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/var/lib/snapd/snap/bin:/home/parallels/.local/bin:/home/parallels/bin
12 [parallels@localhost ~]$ cd ~/gnatcoll-db/sql
13 [parallels@localhost sql]$ ls
14 gnatcoll-sql.adb       gnatcoll-sql-exec_private.adb  gnatcoll-sql_fields.adb  gnatcoll-sql_impl.ads     gnatcoll-sql-orm.ads       gnatcoll-sql-sessions.ads
15 gnatcoll-sql.ads       gnatcoll-sql-exec_private.ads  gnatcoll-sql_fields.ads  gnatcoll-sql-inspect.adb  gnatcoll-sql-orm-impl.adb  Makefile
16 gnatcoll-sql-exec.adb  gnatcoll-sql-exec-tasking.adb  gnatcoll_sql.gpr         gnatcoll-sql-inspect.ads  gnatcoll-sql-orm-impl.ads
17 gnatcoll-sql-exec.ads  gnatcoll-sql-exec-tasking.ads  gnatcoll-sql_impl.adb    gnatcoll-sql-orm.adb      gnatcoll-sql-sessions.adb
18 [parallels@localhost sql]$ make
19 gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
20  gnatcoll_sql.gpr
21 gnatcoll_sql.gpr:44:52: unknown variable "So_Ext"
22 gnatcoll.gpr:8:06: unknown project file: "directories"
23 gnatcoll.gpr:8:06: imported by "/usr/share/gpr/gnatcoll.gpr"
24 gnatcoll.gpr:8:06: imported by "/home/parallels/gnatcoll-db/sql/gnatcoll_sql.gpr"
25 gnatcoll.gpr:31:25: unknown package or project "Directories"
26 gprbuild: "gnatcoll_sql.gpr" processing failed
27 make: *** [build-static] Error 4
28 [parallels@localhost sql]$ gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
29 >     gnatcoll_sql.gpr
30 gnatcoll_sql.gpr:44:52: unknown variable "So_Ext"
31 gnatcoll.gpr:8:06: unknown project file: "directories"
32 gnatcoll.gpr:8:06: imported by "/usr/share/gpr/gnatcoll.gpr"
33 gnatcoll.gpr:8:06: imported by "/home/parallels/gnatcoll-db/sql/gnatcoll_sql.gpr"
34 gnatcoll.gpr:31:25: unknown package or project "Directories"
35 gprbuild: "gnatcoll_sql.gpr" processing failed
36 [parallels@localhost sql]$ 

Added 17/04/20 11:15


[parallels@localhost ~]$ git clone https://github.com/AdaCore/gnatcoll-db
Cloning into 'gnatcoll-db'...
remote: Enumerating objects: 61, done.
remote: Counting objects: 100% (61/61), done.
remote: Compressing objects: 100% (61/61), done.
remote: Total 17399 (delta 27), reused 34 (delta 0), pack-reused 17338
Receiving objects: 100% (17399/17399), 12.63 MiB | 3.04 MiB/s, done.
Resolving deltas: 100% (13119/13119), done.
[parallels@localhost ~]$ PATH=/home/parallels/opt/GNAT/2019/bin:$PATH
[parallels@localhost ~]$ echo $path

[parallels@localhost ~]$ echo $PATH
/home/parallels/opt/GNAT/2019/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/var/lib/snapd/snap/bin:/home/parallels/.local/bin:/home/parallels/bin
[parallels@localhost ~]$ PATH=/home/parallels/opt/GNAT/2019/bin:$PATH
[parallels@localhost ~]$ 
[parallels@localhost ~]$ cd ~/gnatcoll-db/sql
[parallels@localhost sql]$ ls
gnatcoll-sql.adb               gnatcoll-sql-exec_private.ads  gnatcoll_sql.gpr          gnatcoll-sql-orm.adb       gnatcoll-sql-sessions.ads
gnatcoll-sql.ads               gnatcoll-sql-exec-tasking.adb  gnatcoll-sql_impl.adb     gnatcoll-sql-orm.ads       Makefile
gnatcoll-sql-exec.adb          gnatcoll-sql-exec-tasking.ads  gnatcoll-sql_impl.ads     gnatcoll-sql-orm-impl.adb
gnatcoll-sql-exec.ads          gnatcoll-sql_fields.adb        gnatcoll-sql-inspect.adb  gnatcoll-sql-orm-impl.ads
gnatcoll-sql-exec_private.adb  gnatcoll-sql_fields.ads        gnatcoll-sql-inspect.ads  gnatcoll-sql-sessions.adb
[parallels@localhost sql]$ make
gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
    gnatcoll_sql.gpr
Setup
   [mkdir]        object directory for project GnatColl_SQL
   [mkdir]        library directory for project GnatColl_SQL
Compile
   [Ada]          gnatcoll-sql_impl.adb
   [Ada]          gnatcoll-sql_fields.adb
   [Ada]          gnatcoll-sql.adb
gnatcoll-sql_impl.adb:30:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql_impl.ads:30:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
   [Ada]          gnatcoll-sql-sessions.adb
gnatcoll-sql-sessions.adb:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-sessions.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-sessions.ads:34:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-sessions.ads:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-sessions.ads:37:14: warning: license of withed unit "GNATCOLL.Pools" may be inconsistent
   [Ada]          gnatcoll-sql-orm.adb
   [Ada]          gnatcoll-sql-orm-impl.adb
   [Ada]          gnatcoll-sql-inspect.adb
gnatcoll-sql.ads:104:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
   [Ada]          gnatcoll-sql-exec_private.adb
gnatcoll-sql-exec_private.adb:32:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-exec_private.ads:32:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
   [Ada]          gnatcoll-sql-exec.adb
gnatcoll-sql-exec.adb:34:17: warning: license of withed unit "GNATCOLL.OS.Constants" may be inconsistent
gnatcoll-sql-exec.adb:35:14: warning: license of withed unit "GNATCOLL.Plugins" may be inconsistent
gnatcoll-sql-exec.adb:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-exec.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-exec.ads:110:22: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-exec.ads:112:14: warning: license of withed unit "GNATCOLL.Plugins" may be inconsistent
gnatcoll-sql-exec.ads:114:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
   [Ada]          gnatcoll-sql-exec-tasking.adb
gnatcoll-sql-exec-tasking.adb:31:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-exec-tasking.adb:32:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-exec-tasking.adb:33:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-inspect.adb:34:14: warning: license of withed unit "GNATCOLL.Mmap" may be inconsistent
gnatcoll-sql-inspect.adb:35:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-inspect.adb:36:14: warning: license of withed unit "GNATCOLL.VFS" may be inconsistent
gnatcoll-sql-inspect.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-inspect.ads:43:14: warning: license of withed unit "GNATCOLL.VFS" may be inconsistent
gnatcoll-sql-inspect.ads:44:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-inspect.ads:46:22: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
Build Libraries
   [gprlib]       gnatcoll_sql.lexch
   [archive]      libgnatcoll_sql.a
   [index]        libgnatcoll_sql.a
gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -XGPR_BUILD=relocatable \
    gnatcoll_sql.gpr
Setup
   [mkdir]        object directory for project GnatColl_SQL
   [mkdir]        library directory for project GnatColl_SQL
Compile
   [Ada]          gnatcoll-sql_impl.adb
   [Ada]          gnatcoll-sql_fields.adb
   [Ada]          gnatcoll-sql.adb
gnatcoll-sql_impl.adb:30:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql_impl.ads:30:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
   [Ada]          gnatcoll-sql-sessions.adb
gnatcoll-sql-sessions.adb:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-sessions.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-sessions.ads:34:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-sessions.ads:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-sessions.ads:37:14: warning: license of withed unit "GNATCOLL.Pools" may be inconsistent
   [Ada]          gnatcoll-sql-orm.adb
   [Ada]          gnatcoll-sql-orm-impl.adb
   [Ada]          gnatcoll-sql-inspect.adb
gnatcoll-sql.ads:104:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
   [Ada]          gnatcoll-sql-exec_private.adb
gnatcoll-sql-exec_private.adb:32:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-exec_private.ads:32:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
   [Ada]          gnatcoll-sql-exec.adb
gnatcoll-sql-exec.adb:34:17: warning: license of withed unit "GNATCOLL.OS.Constants" may be inconsistent
gnatcoll-sql-exec.adb:35:14: warning: license of withed unit "GNATCOLL.Plugins" may be inconsistent
gnatcoll-sql-exec.adb:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-exec.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-exec.ads:110:22: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-exec.ads:112:14: warning: license of withed unit "GNATCOLL.Plugins" may be inconsistent
gnatcoll-sql-exec.ads:114:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
   [Ada]          gnatcoll-sql-exec-tasking.adb
gnatcoll-sql-exec-tasking.adb:31:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-exec-tasking.adb:32:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-exec-tasking.adb:33:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-inspect.adb:34:14: warning: license of withed unit "GNATCOLL.Mmap" may be inconsistent
gnatcoll-sql-inspect.adb:35:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-inspect.adb:36:14: warning: license of withed unit "GNATCOLL.VFS" may be inconsistent
gnatcoll-sql-inspect.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-inspect.ads:43:14: warning: license of withed unit "GNATCOLL.VFS" may be inconsistent
gnatcoll-sql-inspect.ads:44:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-inspect.ads:46:22: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
Build Libraries
   [gprlib]       gnatcoll_sql.lexch
   [link library] libgnatcoll_sql.so
gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=static-pic -XXMLADA_BUILD=static-pic -XGPR_BUILD=static-pic \
    gnatcoll_sql.gpr
Setup
   [mkdir]        object directory for project GnatColl_SQL
   [mkdir]        library directory for project GnatColl_SQL
Compile
   [Ada]          gnatcoll-sql_impl.adb
   [Ada]          gnatcoll-sql_fields.adb
   [Ada]          gnatcoll-sql.adb
gnatcoll-sql_impl.adb:30:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql_impl.ads:30:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
   [Ada]          gnatcoll-sql-sessions.adb
gnatcoll-sql-sessions.adb:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-sessions.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-sessions.ads:34:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-sessions.ads:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-sessions.ads:37:14: warning: license of withed unit "GNATCOLL.Pools" may be inconsistent
   [Ada]          gnatcoll-sql-orm.adb
   [Ada]          gnatcoll-sql-orm-impl.adb
   [Ada]          gnatcoll-sql-inspect.adb
gnatcoll-sql.ads:104:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
   [Ada]          gnatcoll-sql-exec_private.adb
gnatcoll-sql-exec_private.adb:32:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-exec_private.ads:32:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
   [Ada]          gnatcoll-sql-exec.adb
gnatcoll-sql-exec.adb:34:17: warning: license of withed unit "GNATCOLL.OS.Constants" may be inconsistent
gnatcoll-sql-exec.adb:35:14: warning: license of withed unit "GNATCOLL.Plugins" may be inconsistent
gnatcoll-sql-exec.adb:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-exec.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-exec.ads:110:22: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-exec.ads:112:14: warning: license of withed unit "GNATCOLL.Plugins" may be inconsistent
gnatcoll-sql-exec.ads:114:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
   [Ada]          gnatcoll-sql-exec-tasking.adb
gnatcoll-sql-exec-tasking.adb:31:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-exec-tasking.adb:32:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-exec-tasking.adb:33:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-inspect.adb:34:14: warning: license of withed unit "GNATCOLL.Mmap" may be inconsistent
gnatcoll-sql-inspect.adb:35:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-inspect.adb:36:14: warning: license of withed unit "GNATCOLL.VFS" may be inconsistent
gnatcoll-sql-inspect.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-inspect.ads:43:14: warning: license of withed unit "GNATCOLL.VFS" may be inconsistent
gnatcoll-sql-inspect.ads:44:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-inspect.ads:46:22: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
Build Libraries
   [gprlib]       gnatcoll_sql.lexch
   [archive]      libgnatcoll_sql.a
   [index]        libgnatcoll_sql.a

Here is my gnatcoll_postgres.gpr build for reference

[parallels@localhost postgres]$ make
gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_HASPQPREPARE=yes -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
    gnatcoll_postgres.gpr
gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_HASPQPREPARE=yes -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -XGPR_BUILD=relocatable \
    gnatcoll_postgres.gpr
gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_HASPQPREPARE=yes -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=static-pic -XXMLADA_BUILD=static-pic -XGPR_BUILD=static-pic \
    gnatcoll_postgres.gpr
Compile
   [Ada]          gnatcoll-sql_impl.adb
   [Ada]          gnatcoll-sql_fields.adb
   [Ada]          gnatcoll-sql.adb
gnatcoll-sql_impl.adb:30:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql_impl.ads:30:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
   [Ada]          gnatcoll-sql-sessions.adb
gnatcoll-sql-sessions.adb:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-sessions.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-sessions.ads:34:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-sessions.ads:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-sessions.ads:37:14: warning: license of withed unit "GNATCOLL.Pools" may be inconsistent
   [Ada]          gnatcoll-sql-orm.adb
   [Ada]          gnatcoll-sql-orm-impl.adb
   [Ada]          gnatcoll-sql-inspect.adb
gnatcoll-sql.ads:104:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
   [Ada]          gnatcoll-sql-exec_private.adb
gnatcoll-sql-exec_private.adb:32:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-exec_private.ads:32:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
   [Ada]          gnatcoll-sql-exec.adb
gnatcoll-sql-exec.adb:34:17: warning: license of withed unit "GNATCOLL.OS.Constants" may be inconsistent
gnatcoll-sql-exec.adb:35:14: warning: license of withed unit "GNATCOLL.Plugins" may be inconsistent
gnatcoll-sql-exec.adb:36:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-exec.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-exec.ads:110:22: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
gnatcoll-sql-exec.ads:112:14: warning: license of withed unit "GNATCOLL.Plugins" may be inconsistent
gnatcoll-sql-exec.ads:114:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
   [Ada]          gnatcoll-sql-exec-tasking.adb
gnatcoll-sql-exec-tasking.adb:31:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-exec-tasking.adb:32:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-exec-tasking.adb:33:14: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
   [C]            postgres_support.c
   [Ada]          gnatcoll-sql-ranges.adb
   [Ada]          gnatcoll-sql-postgres.adb
gnatcoll-sql-inspect.adb:34:14: warning: license of withed unit "GNATCOLL.Mmap" may be inconsistent
gnatcoll-sql-inspect.adb:35:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-inspect.adb:36:14: warning: license of withed unit "GNATCOLL.VFS" may be inconsistent
gnatcoll-sql-inspect.adb:37:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-inspect.ads:43:14: warning: license of withed unit "GNATCOLL.VFS" may be inconsistent
gnatcoll-sql-inspect.ads:44:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-inspect.ads:46:22: warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
   [Ada]          gnatcoll-sql-postgres-gnade.adb
gnatcoll-sql-postgres-gnade.ads:43:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
   [Ada]          gnatcoll-sql-postgres-builder.adb
gnatcoll-sql-postgres-builder.adb:37:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-postgres-builder.adb:38:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-postgres-builder.adb:39:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-postgres.adb:30:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-postgres.ads:29:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
Build Libraries
   [gprlib]       gnatcoll_sql.lexch
   [archive]      libgnatcoll_sql.a
   [index]        libgnatcoll_sql.a
   [gprlib]       gnatcoll_postgres.lexch
   [archive]      libgnatcoll_postgres.a
   [index]        libgnatcoll_postgres.a
[parallels@localhost postgres]$ 
Lloyd Thomas
  • 345
  • 2
  • 12
  • Does this answer your question? [How to install Gnatcoll Postgres on Linux Centos 7](https://stackoverflow.com/questions/61206487/how-to-install-gnatcoll-postgres-on-linux-centos-7) – egilhh Apr 15 '20 at 11:57
  • Thanks @egilhh - this was another question I posted previously!! – Lloyd Thomas Apr 15 '20 at 12:01
  • well, yes. Exactly. It's a duplicate, and that comment must have been autogenerated when I marked it as such. – egilhh Apr 15 '20 at 12:04
  • Okay, well the answer is no, it doesn’t answer my question @egilhh – Lloyd Thomas Apr 15 '20 at 12:13
  • but you did accept an answer, so... – egilhh Apr 15 '20 at 12:14
  • @egilhh - This question is different and hasn’t been answered! – Lloyd Thomas Apr 15 '20 at 12:16
  • It certainly looks like the exact same question, so how is it different? Please modify your question to clarify – egilhh Apr 15 '20 at 12:18
  • @egilkk - In this question I am asking if it's possible to install the Libraries without using configure/make, in the other question I am not. – Lloyd Thomas Apr 15 '20 at 12:23
  • @LloydThomas Note that the bottom of your question specifically asks for a step by step process similar to another (that you link) and that process you linked uses configure/make. Maybe this is causing the confusion? – Jere Apr 15 '20 at 12:54
  • Ahhh, okay @Jere thank you that is a good point, I will remove this from the question. – Lloyd Thomas Apr 15 '20 at 12:59
  • Given your objectives (to complete two online examples) I don’t see why you want to mess around trying to build the tools in ways that are clearly not the way that the tool developers intend. That said, I just managed to build `gnatcoll-db/postgres/gnatcoll_postgres.gpr` from within GPS - you might want to look at the menu View>Scenario to adjust things. However, installation will only work from the Makefile. – Simon Wright Apr 15 '20 at 16:28
  • Hi @Simon Wright, thanks for the reply. My intentions were to build that way so I could try and see why the package wasn't building, within the GPS debugger. Thanks for your suggestion, I will take a look at menu View>Scenario - Currently when I run make, then make install I recieve errors. I've added these to the original post, as there isn't enough room in a comment. – Lloyd Thomas Apr 16 '20 at 07:13

2 Answers2

2

The following allowed gnatcoll-db to build under GNAT Community 2019.

Clone the repo:

$ git clone https://github.com/AdaCore/gnatcoll-db

Add the path to the GNAT Community 2019 (this is a quick hack just to add to the start of the path, as have multiple compilers installed):

$ PATH=/opt/GNAT/2019/bin/:$PATH

Build with the default settings:

$ cd ~/gnatcoll-db/sql
$ make
gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
    gnatcoll_sql.gpr
Setup
   [mkdir]        object directory for project GnatColl_SQL
   [mkdir]        library directory for project GnatColl_SQL
Compile
<snip>
Build Libraries
   [gprlib]       gnatcoll_sql.lexch
   [archive]      libgnatcoll_sql.a
   [index]        libgnatcoll_sql.a
Chester Gillon
  • 326
  • 2
  • 4
  • Hi @Chester Gillon, Thank you very much for you reply. I have attempted this, however I recieve the same error as I previously did. I believe it is down to the PATH - I have just posted the output from the command line within my original question with today's date and time, as it will not fit in this comment. Please notice on line 11 my PATH, does this look correct? Thank you for your help :) – Lloyd Thomas Apr 17 '20 at 09:32
  • 1
    The PATH needs to point to where GNAT is installed. In your case try: `$ PATH=/home/parallels/opt/GNAT/2019/bin:$PATH` – Chester Gillon Apr 17 '20 at 09:44
  • It worked!! I've included the output from terminal in my original awnser. I shall now attempt to use the library. Thank you very much for your help, feels great to have made some progress with this :) – Lloyd Thomas Apr 17 '20 at 10:14
1

You still have PATH problems.

[parallels@localhost sql]$ make
which: no gnatls in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/var/lib/snapd/snap/bin:/home/parallels/.local/bin:/home/parallels/bin)
...
which: no gnatls in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/var/lib/snapd/snap/bin:/home/parallels/.local/bin:/home/parallels/bin)
...
make: gprinstall: Command not found

This is the script I use for building for macOS. Altering to be more general, and having set your PATH so that it includes GNAT (i.e. the command gnatls -v works), run this from gnatcoll-db/:

make -w -C sql setup
make -w -C sql clean build
make -w -C sql install

make -w -C postgres setup
make -w -C postgres clean build
make -w -C postgres install

It sounds as though you don’t have much experience with the command line. Something like this tutorial might help.

Simon Wright
  • 25,108
  • 2
  • 35
  • 62
  • Thank you @Simon Wright - I've read through the tutorial you have recommended and this is making more sense to me now. I didn't have gnatls installed, I have got that from here: https://command-not-found.com/gnatls - I'm still unsure of the PATH that needs to be changed..... – Lloyd Thomas Apr 17 '20 at 08:29
  • cont.... Please would you be able to look at the output from my command line (added to the original question with today's date), I have attempted to set the export path before running the setup and clean build commands from your script. Is there anything you can spot that I have done wrong. Thanks again for your help and patience, it's very much appreciated. – Lloyd Thomas Apr 17 '20 at 08:29
  • 1
    The compilation worked fine, the warnings (which I don’t see with a different compiler) relate to the fact that the gnatcoll-db cloned from Github has a more permissive licence than the gnatcoll-core installed with your compiler. Don’t worry (unless you intend to write proprietary software and distribute it without your source code) – Simon Wright Apr 17 '20 at 10:52
  • Great! Thank you @Simon Wright, this is good news. This machine is my home setup, just to mess around on. So this is good... I'm trying to become familiar with Linux. However, I will install this on my Mac OS too, and I will be sure to make use of your repository. Thanks for all the help :) – Lloyd Thomas Apr 17 '20 at 11:47