首页 > 解决方案 > 使用适用于 Linux 64 位的 GNAT 2019 公共版本在 Linux 上配置 PolyORB 失败

问题描述

配置脚本检查编译器是否可以构建 c 程序并且失败说 c 的编译器无法构建可执行文件。(检查 C 编译器是否工作......否)

执行命令 gcc xc 给出“gcc:尝试执行 'cc1' 时出错:execvp:没有这样的文件或目录”

uname -a for my system 说: x86_64 x86_64 x86_64 GNU/Linux

我的猜测是这个版本的 GNAT 没有为 c 程序正确配置。接下来要尝试的是旧版本的 GNAT

标签: linuxconfigurationadagnat

解决方案


INSTALL文件应该提供一些附加信息(特别是最后一行,以防您安装了多个版本的 GNAT)。使用安装在 Debian 10 (Buster) 上的 GNAT CE 2019:

$ uname -a
Linux debian 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux

$ which gcc
/opt/GNAT/2019/bin/gcc

$ sudo apt-get install autoconf automake libtool
[...]

$ git clone https://github.com/AdaCore/PolyORB.git
[...]

$ cd PolyORB
$ support/reconfig
Running aclocal (GNU automake) 1.16.1
Running autoheader (GNU Autoconf) 2.69
Running autoconf (GNU Autoconf) 2.69
Generating IDL tree accessors
splitting nodes.ada into:
   idl_fe-tree.ads
   idl_fe-tree.adb
Doing the necessary date modifications

$ ./configure
[...]
checking whether the C compiler works... yes
[...]

$ make
[...]

推荐阅读