gnatbind:找不到:s-stalib.ali

时间:2013-10-25 17:39:47

标签: macos osx-mountain-lion ada gnat

我在OS X 10.8.5计算机上安装了GNAT,步骤如下:

在尝试编译一个简单的hello world示例后,我收到此错误:

$ gnat make hello
gcc -c hello.adb
gnatbind -x hello.ali
gnatbind: Cannot find: s-stalib.ali
gnatmake: *** bind failed.

知道为什么会这样吗?

PS:gnat make -a hello有效,但会产生大量文件,据我所知,不应该要求。

修改:根据要求,此处为gnatls -v

的输出
GNATLS GPL 2013 (20130314)
Copyright (C) 1997-2013, Free Software Foundation, Inc.

Source Search Path:
   <Current_Directory>
   /usr/local/gnat/lib/gcc/x86_64-apple-darwin12.2.0/4.7.4/adainclude/


Object Search Path:
   <Current_Directory>
   /usr/local/gnat/lib/gcc/x86_64-apple-darwin12.2.0/4.7.4/adalib/


Project Search Path:
   <Current_Directory>
   /usr/local/gnat/x86_64-apple-darwin12.2.0/lib/gnat
   /usr/local/gnat/share/gpr
   /usr/local/gnat/lib/gnat

以下是ls -l /usr/local/gnat/lib/gcc/x86_64-apple-darwin12.2.0/4.7.4/adalib/输出的摘录:

total 39224
-rw-rwxr--@ 1 padde  admin     4483 17 Apr  2013 Makefile.adalib
-rw-rwxr--@ 1 padde  admin     1450  3 Jun 18:00 a-assert.ali

...

-rw-rwxr--@ 1 padde  admin     3178  3 Jun 18:01 s-rpc.ali
-rw-rwxr--@ 1 padde  admin     3778  3 Jun 18:01 s-scaval.ali
-rw-rwxr--@ 1 padde  admin     4908  3 Jun 18:01 s-sequio.ali
-rw-rwxr--@ 1 padde  admin    10542  3 Jun 18:01 s-shasto.ali
-rw-rwxr--@ 1 padde  admin     6382  3 Jun 18:01 s-solita.ali
-rw-rwxr--@ 1 padde  admin     8265  3 Jun 18:01 s-stausa.ali
-rw-rwxr--@ 1 padde  admin     4919  3 Jun 18:01 s-stchop.ali
-rw-rwxr--@ 1 padde  admin    14601  3 Jun 18:01 s-stratt.ali
-rw-rwxr--@ 1 padde  admin    11024  3 Jun 18:01 s-ststop.ali
-rw-rwxr--@ 1 padde  admin     5320  3 Jun 18:01 s-stusta.ali
-rw-rwxr--@ 1 padde  admin     9804  3 Jun 18:01 s-taasde.ali
-rw-rwxr--@ 1 padde  admin     4346  3 Jun 18:01 s-tadeca.ali
-rw-rwxr--@ 1 padde  admin     4234  3 Jun 18:01 s-tadert.ali
-rw-rwxr--@ 1 padde  admin    12564  3 Jun 18:01 s-taenca.ali
-rw-rwxr--@ 1 padde  admin     6663  3 Jun 18:01 s-taprob.ali
-rw-rwxr--@ 1 padde  admin    29033  3 Jun 18:01 s-taprop.ali
-rw-rwxr--@ 1 padde  admin    13719  3 Jun 18:01 s-tarest.ali
-rw-rwxr--@ 1 padde  admin     8863  3 Jun 18:01 s-tasdeb.ali
-rw-rwxr--@ 1 padde  admin      747  3 Jun 18:01 s-tasinf.ali
-rw-rwxr--@ 1 padde  admin    13008  3 Jun 18:01 s-tasini.ali
-rw-rwxr--@ 1 padde  admin    15237  3 Jun 18:01 s-taskin.ali
-rw-rwxr--@ 1 padde  admin     1259  3 Jun 18:01 s-tasloc.ali
-rw-rwxr--@ 1 padde  admin     1710  3 Jun 18:01 s-taspri.ali
-rw-rwxr--@ 1 padde  admin    11652  3 Jun 18:01 s-tasque.ali
-rw-rwxr--@ 1 padde  admin    29450  3 Jun 18:01 s-tasren.ali
-rw-rwxr--@ 1 padde  admin     1500  3 Jun 18:01 s-tasres.ali
-rw-rwxr--@ 1 padde  admin    31332  3 Jun 18:01 s-tassta.ali
-rw-rwxr--@ 1 padde  admin    11059  3 Jun 18:01 s-tasuti.ali
-rw-rwxr--@ 1 padde  admin     7120  3 Jun 18:01 s-tataat.ali
-rw-rwxr--@ 1 padde  admin     2942  3 Jun 18:01 s-tpinop.ali
-rw-rwxr--@ 1 padde  admin    11318  3 Jun 18:01 s-tpoben.ali
-rw-rwxr--@ 1 padde  admin    19570  3 Jun 18:01 s-tpobop.ali
-rw-rwxr--@ 1 padde  admin    11075  3 Jun 18:01 s-tposen.ali
-rw-rwxr--@ 1 padde  admin     1421  3 Jun 18:01 s-traces.ali
-rw-rwxr--@ 1 padde  admin     3889  3 Jun 18:01 s-tratas.ali
-rw-rwxr--@ 1 padde  admin    17789  3 Jun 18:01 s-utf_32.ali
-rw-rwxr--@ 1 padde  admin     8312  3 Jun 18:01 s-vaflop.ali
-rw-rwxr--@ 1 padde  admin      997  3 Jun 18:01 s-valboo.ali
-rw-rwxr--@ 1 padde  admin     1239  3 Jun 18:01 s-valcha.ali
-rw-rwxr--@ 1 padde  admin     1309  3 Jun 18:01 s-valdec.ali
-rw-rwxr--@ 1 padde  admin     2921  3 Jun 18:01 s-valenu.ali
-rw-rwxr--@ 1 padde  admin     1733  3 Jun 18:01 s-valint.ali
-rw-rwxr--@ 1 padde  admin     1345  3 Jun 18:01 s-vallld.ali
-rw-rwxr--@ 1 padde  admin     1807  3 Jun 18:01 s-vallli.ali
-rw-rwxr--@ 1 padde  admin     3841  3 Jun 18:01 s-valrea.ali
-rw-rwxr--@ 1 padde  admin     3078  3 Jun 18:01 s-valuns.ali
-rw-rwxr--@ 1 padde  admin     2863  3 Jun 18:01 s-valwch.ali
-rw-rwxr--@ 1 padde  admin     2157  3 Jun 18:01 s-veboop.ali
-rw-rwxr--@ 1 padde  admin      535  3 Jun 18:01 s-vector.ali
-rw-rwxr--@ 1 padde  admin     1153  3 Jun 18:01 s-vercon.ali
-rw-rwxr--@ 1 padde  admin     3305  3 Jun 18:01 s-vmexta.ali
-rw-rwxr--@ 1 padde  admin     2474  3 Jun 18:01 s-wchwts.ali
-rw-rwxr--@ 1 padde  admin      698  3 Jun 18:01 s-widboo.ali
-rw-rwxr--@ 1 padde  admin      939  3 Jun 18:01 s-widcha.ali
-rw-rwxr--@ 1 padde  admin     2526  3 Jun 18:01 s-widenu.ali
-rw-rwxr--@ 1 padde  admin      863  3 Jun 18:01 s-widlli.ali
-rw-rwxr--@ 1 padde  admin     1126  3 Jun 18:01 s-widllu.ali
-rw-rwxr--@ 1 padde  admin     1292  3 Jun 18:01 s-widwch.ali
-rw-rwxr--@ 1 padde  admin     1301  3 Jun 18:01 s-wwdcha.ali
-rw-rwxr--@ 1 padde  admin     5682  3 Jun 18:01 s-wwdenu.ali
-rw-rwxr--@ 1 padde  admin     1957  3 Jun 18:01 s-wwdwch.ali
-rw-rwxr--@ 1 padde  admin     1561  3 Jun 18:01 sequenio.ali
-rw-rwxr--@ 1 padde  admin     1519  3 Jun 18:01 text_io.ali
-rw-rwxr--@ 1 padde  admin      391  3 Jun 18:01 unchconv.ali
-rw-rwxr--@ 1 padde  admin      389  3 Jun 18:01 unchdeal.ali

有趣的是,请求的文件s-stalib.ali 包含在此目录中。

1 个答案:

答案 0 :(得分:2)

如果您说gnatls -v(或gnat list -v),它会列出(除此之外)对象搜索路径:此处

...
Object Search Path:
   <Current_Directory>
   /opt/gnat-gpl-2013/lib/gcc/x86_64-apple-darwin12.2.0/4.7.4/adalib/
...

你说什么?这样对吗?如果文件在那里,它们是否可读?

[后来]

好的,您有9个s-s*.ali个文件,保护-rw-rwxr--@(我不确定@的意思!),而我有19个,保护{{1} }。这看起来好像由于某种原因安装没有完成。

当我安装GNAT时,我使用-r--r--r--@sudo。这可能是区别吗?

自述文件说sudo ./doinstall在当前(我认为是分发)目录中留下doinstall;这可能会提供一些线索。

如果您决定重建库,最好在“已安装”install.log目录中使用Makefile.adalib

祝你好运!