安装GNATCOLL SQL和POSTGRES-Centos7 Linux,不使用configure / make

问题描述 投票:0回答:1

到目前为止,我已经下载了GNAT GPS Community并将其安装在我的Linux Centos 7计算机上。

我的目标是能够完成以下两个在线示例:

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

为此,我需要从此处安装sql和postgres库:https://github.com/AdaCore/gnatcoll-db

我知道postgres库依赖于sql库,因此我尝试首先安装sql库!我已经尝试过以各种方式安装这些库,因为您将看到以前的问题...

我目前正在尝试从GNAT GPS构建这些库,请参见下面的屏幕快照,查看我的项目的样子,我在更改的字段旁边添加了白点!

GPS我手动输入了我正在使用的GNAT GPS的版本,库目录,以及我添加的通用版本。

[当我尝试构建它时,出现以下错误...

enter image description here

我不确定是否可以通过这种方式安装库,对于是否可行的任何建议将不胜感激。

我想我已经为安装该库付出了巨大的努力。如果有人知道在线提供的分步安装过程,请告诉我。

我也曾尝试使用gprbuild来构建它,我收到以下错误。

[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]$ 

我正在使用Linux Centos 7,并且在此处安装了GNAT GPS:/home/parallels/opt/GNAT/2019/bin/gps


添加16/04/20

当前,当我运行make,然后进行make install时,我收到错误信息(这就是为什么我要寻找解决方法的原因:]

[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]$ 

[添加17/04/20

[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]$ 
postgresql centos7 ada gnat gnat-gps
1个回答
0
投票

您仍然有PATH问题。

[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是我用于macOS构建的脚本。更改为更通用,然后已设置PATH以使其包含GNAT(即命令gnatls -v有效),请从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

听起来好像您对命令行没有太多经验。诸如this tutorial之类的方法可能会有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.