首页 > 解决方案 > ld:存档没有目录文件错误与自制程序

问题描述

我正在尝试编译微信,

%> brew upgrade weechat --debug
...

[ 86%] Built target weechat_gui_curses_normal
[ 87%] Building C object src/gui/curses/normal/CMakeFiles/weechat.dir/main.o
[ 87%] Linking C executable weechat
ld: archive has no table of contents file '../../../plugins/libweechat_plugins.a' for architecture x86_64
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
make[2]: *** [src/gui/curses/normal/weechat] Error 254
make[1]: *** [src/gui/curses/normal/CMakeFiles/weechat.dir/all] Error 2
make: *** [all] Error 2
bash-3.2$ exit

它失败了archive has no table of contents file for architecture x86_64,这似乎是一个通用错误,因为它发生在 mysql@5.5 和许多其他包中。

我还看到了 ranlib 错误

/usr/local/homebrew/bin/ranlib: libweechat_gui_curses_normal.a(gui-curses-term.o): unknown load command 0x32

有任何想法吗?

标签: homebrew

解决方案


解决。

简单地做brew unlink binutils或指定 RANLIB=/usr/bin/ranlib。


推荐阅读