2

我经常在 Ubuntu 13.10 上本地重建和使用 DMD git master。昨天我的 D 工具链无法将所有 D 程序与错误链接:

DMD 的编译输出示例:

/home/per/opt/x86_64-unknown-linux-gnu/dmd/bin/../lib/libphobos2.a(sections_linux_4c8_e6.o):src/rt/sections_linux.d:function 
_D2rt14sections_linux3DSO11__xopEqualsFKxS2rt14sections_linux3DSOKxS2rt14sections_linux3DSOZb: 
error: undefined reference to '_adEq2'
/home/per/opt/x86_64-unknown-linux-gnu/dmd/bin/../lib/libphobos2.a(sections_linux_4c8_e6.o):src/rt/sections_linux.d:function 
_D2rt14sections_linux3DSO11__xopEqualsFKxS2rt14sections_linux3DSOKxS2rt14sections_linux3DSOZb: 
error: undefined reference to '_adEq2'
/home/per/opt/x86_64-unknown-linux-gnu/dmd/bin/../lib/libphobos2.a(sections_linux_4c8_e6.o):src/rt/sections_linux.d:function 
_D2rt14sections_linux3DSO11__xopEqualsFKxS2rt14sections_linux3DSOKxS2rt14sections_linux3DSOZb: 
error: undefined reference to '_adEq2'
/home/per/opt/x86_64-unknown-linux-gnu/dmd/bin/../lib/libphobos2.a(sections_linux_4c8_e6.o):src/rt/sections_linux.d:function 
_D2rt14sections_linux3DSO11__xopEqualsFKxS2rt14sections_linux3DSOKxS2rt14sections_linux3DSOZb: 
error: undefined reference to '_adEq2'
collect2: error: ld returned 1 exit status

当我 grep 时,只有dmd二进制匹配这个符号,而不是 libphobos。我的 dmd 和 libphobos 都是最新的。

我都试过了ld.bfdld.gold

怎么了?

4

1 回答 1

0

通过从包含运行时和 phobos 库的 LD_LIBRARY_PATH 中删除我的 D 目录,我设法让它再次工作。大概是我的错。

于 2014-03-01T23:15:28.150 回答