【问题标题】:What does "ld: mach-o string pool extends beyond end of file" mean?“ld:mach-o 字符串池超出文件末尾”是什么意思?
【发布时间】:2020-01-08 23:03:11
【问题描述】:

我目前正在尝试制作和安装一套专业软件 (https://github.com/scottransom/presto),但遇到了这个错误:

gfortran -g -fPIC -o /path-to/presto/bin/psrorbit powerplot.o xyline.o psrorbit.o -L/usr/local/Cellar/cfitsio/3.450/lib -lcfitsio -lcurl -L/path-to/presto/lib -lpresto -L/usr/local/lib -lfftw3f -L/usr/local/lib/pgplot -lcpgplot -lpgplot -L/opt/X11/lib -lX11 -L/opt/X11/lib -lpng16 -lm
ld: mach-o string pool extends beyond end of file in /usr/local/lib/libcpgplot.dylib file '/usr/local/lib/libcpgplot.dylib' for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [psrorbit] Error 1

我认为这不是与 PRESTO 本身有关的问题,因为多次搜索(请参阅 thisthisthis)指向一些基本的东西,也许是 Xcode。我目前有版本 11.3,并且我还安装了命令行工具。再说一遍,错误本身意味着什么?任何帮助都会很有用!

【问题讨论】:

  • 我在另一个项目中遇到此错误消息。也许与增量编译/链接有关(source)?或者可能是 strip 程序 (source) 的错误?

标签: xcode clang gfortran


【解决方案1】:

根据我对Apple's version of ld源代码的阅读,这个错误意味着对象中的符号表在文件结束时提前结束。

链接时似乎对目标文件执行了相当多的完整性检查。很可能,您的/usr/local/lib/libcpgplot.dylib 副本已损坏。

【讨论】:

  • 就我而言,我链接的目标文件已损坏。我能够通过重新下载受影响的动态库的副本来解决此错误。
猜你喜欢
  • 2017-05-16
  • 1970-01-01
  • 2014-03-17
  • 1970-01-01
  • 1970-01-01
  • 2012-05-07
  • 1970-01-01
  • 2012-10-31
  • 1970-01-01
相关资源
最近更新 更多