我经常在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
。
有什么问题?
答案 0 :(得分:0)
我设法通过从包含运行时和phobos库的LD_LIBRARY_PATH中删除我的D目录来使其再次运行。可能是我的错误。