0

py2app 以以下错误结束:

/usr/bin/strip: the __LINKEDIT segment does not cover the end of the file 
(can't be processed) in: test.app/Contents/Frameworks/libgfortran.3.dylib
stripping saved 1222348 bytes (88617336 / 89839684)

控制台输出的最后一行:

../Frameworks/libgfortran.3.dylib: mach-o, but wrong architecture

我怎样才能解决这个问题?

我在 darwin 上使用 Snow Leopard (x86_64)
Python 2.6.6 (r266:84292, Feb 4 2011, 20:12:20)
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)]

4

1 回答 1

0

首先确定您计划构建的架构和操作系统版本。

然后确保libgfortran为这些架构编译您的其他依赖项。(您可以使用lipo -infofile打印 Mach-O 二进制文件中包含的架构)。

最后,如果架构是您正在使用的 Python 版本所构建的架构的子集,则编译/使用仅为这些架构构建的 Python 版本,或者破解 distutils 以删除-arch标志(并添加-isysrootif需要),如在此脚本中。

于 2011-03-12T17:04:24.153 回答