无法编译Ada Web Server AWS hello_world应用程序

4

系统配置:

  • Linux 3.19(Mint)
  • GPS版本:GPS 2016(20160515),运行在i686-pc-linux-gnu上,使用GNAT 4.6

已安装的软件包:

  • libaws-bin
  • libaws-dbg
  • libaws2.10.2
  • libaws2.10.2-dev
  • gnat-gps
  • gnat-gps-common
  • gnat-4.6
  • gnat-4.6-base
  • gnat-4.8-base
  • gnat

故障描述:

当尝试使用GNAT编程工具(GPS)编译aws_hello_world项目时,出现以下错误信息:

错误文本:default.gpr:2:6 未知的项目文件:“aws”

default.gpr

with "aws"; -- This is the line with the error --

project Default is

   for Source_Dirs use ("src");
   for Object_Dir use "obj";
   for Exec_Dir use ".";

   for Main use ("default-main.adb");

   package Builder is
      for Executable ("default-main.adb") use "default";
   end Builder;

   package Compiler is
      for Switches ("Ada") use ("-gnat05");
   end Compiler;

end Default;

尝试使用命令行构建项目也失败了:

ada_n00b@wasted_planet ~/Desktop/aws_hello_world $ gprbuild
using project file default.gpr
Error: no native compiler found for language 'ada', default runtime 
default.gpr:2:06: unknown project file: "aws"
gprbuild: "default.gpr" processing failed

任何有关如何构建它的帮助都将不胜感激!提前致谢。

1
AdaCore 套件 AWS 与 Amazon Web Services 没有任何关系,因此我已将标签移除。 - Simon Wright
我曾以为AWS代表Ada Web Server,但实际上这个缩写是有歧义的。 - John Leimon
1
gprbuild对编译器版本要求比较严格。如果它需要的是4.6版本(你说你有GNAT 4.6),但只找到了4.8版本(你说你有gnat-4.8-base),那么它可能会拒绝工作。 - Simon Wright
1
@Johnson 这并不含糊;当您创建问题时,可以选择的标签描述会自动显示。阅读它们会立即让您意识到这是错误的标签。 - Keith M
1
在完美的世界中,是的。但令人恼火的是,还有其他语言存在,使用这些语言的人往往会肆意挪用Ada社区项目名称。 - T.E.D.
2个回答

3
解决方案是安装AdaCore提供的GNAT GPL编译器,并使用它来构建Ada Web Server。我之前使用的是Debian软件包仓库中提供的FSF GNAT,但是Ada Web Server无法使用FSF GNAT直接构建。

2
我非常怀疑它完全不兼容。但很可能会少一些即插即用的功能。 - T.E.D.
2
我已经针对你的评论提高了我的答案的精度。 - John Leimon

0

你在命令行上收到的错误信息揭示了你的错误:

Error: no native compiler found for language 'ada', default runtime

您可能需要在构建系统上安装gnat软件包。


1
@Johnson:将/usr/local/gnat添加到你的$PATH中。 - trashgod
@Johnson 你可能需要更新一下问题。gnat 并不在你所安装的 Ubuntu 软件包列表中。 - Jacob Sparre Andersen
@JacobSparreAndersen,问题现在已经更新。 - Keith M

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接