Ada - 奇怪的错误 - gcc/gnatbind 的一致版本
我正在尝试编译一个 Ada 项目。
我从 Libre AdaCore 安装了最新的 2011 GNAT GPL 包,它也包含 gcc 编译器。
则会出现以下奇怪的错误
fatal error: file dom.ali is incorrectly formatted
make sure you are using consistent versions of gcc/gnatbind
如果我输入它给我的哪个 gcc, /usr/gnat/bin/gcc
如果我输入 which gnatbind 它会给我 /usr/gnat/bin/gnatbind
“格式不正确”文件的内容如下 有
V "GNAT Lib v2011"
A -gnat05
A -gnatA
P ZX
R nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnvnnnnnnnnnnnnnnnnnnn
U dom%s dom.ads 2bd88f63 NE OO PK IU
D dom.ads 20090519080656 2bd88f63
D system.ads 20110419093140 2d1a1afa
X 1 dom.ads
44K9*DOM 46l5 46e8
任何线索吗?
预先感谢您
编辑:gnatls -v
显示以下内容(为了便于阅读而格式化),
GNATLS GPL 2011 (20110419)
Copyright (C) 1997-2011, Free Software Foundation, Inc. Source Search Path: <Current_Directory> /usr/gnat/lib/gcc/i686-pc-linux-gnu/4.5.3/adainclude/ Object Search Path: <Current_Directory> /usr/gnat/lib/gcc/i686-pc-linux-gnu/4.5.3/adalib/ Project Search Path: <Current_Directory> /usr/gnat/i686-pc-linux-gnu/lib/gnat /usr/gnat/share/gpr /usr/gnat/lib/gnat
i'm trying to compile an Ada project.
I installed the current 2011 GNAT GPL package from Libre AdaCore, it contains the gcc compiler too.
The strange error is the following
fatal error: file dom.ali is incorrectly formatted
make sure you are using consistent versions of gcc/gnatbind
if i type which gcc it gives me /usr/gnat/bin/gcc
if i type which gnatbind it gives me /usr/gnat/bin/gnatbind
The content of "the incorrectly formatted" file is the following
V "GNAT Lib v2011"
A -gnat05
A -gnatA
P ZX
R nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnvnnnnnnnnnnnnnnnnnnn
U dom%s dom.ads 2bd88f63 NE OO PK IU
D dom.ads 20090519080656 2bd88f63
D system.ads 20110419093140 2d1a1afa
X 1 dom.ads
44K9*DOM 46l5 46e8
Any clue?
Thank you in advance
Edit: gnatls -v
shows the following (formatted for readability),
GNATLS GPL 2011 (20110419)
Copyright (C) 1997-2011, Free Software Foundation, Inc. Source Search Path: <Current_Directory> /usr/gnat/lib/gcc/i686-pc-linux-gnu/4.5.3/adainclude/ Object Search Path: <Current_Directory> /usr/gnat/lib/gcc/i686-pc-linux-gnu/4.5.3/adalib/ Project Search Path: <Current_Directory> /usr/gnat/i686-pc-linux-gnu/lib/gnat /usr/gnat/share/gpr /usr/gnat/lib/gnat
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所有编译单元都必须使用完全相同的 GNAT 版本和使用的库版本进行编译。如果您使用预编译库,则可能需要重新编译它们。
请参阅 Debian Ada 政策 部分关于阿里文件。
All compilation units have to be compiled with exactly the same GNAT version and used library versions. If you use precompiled libraries, you might have to recompile them.
See the Debian Ada Policy part about ali files.