我经常在 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.bfd
和ld.gold
。
怎么了?