Xcode4丢弃了PPC支持,所以当我尝试构建PIL时,它会引起憎恨:
Bens-MacBook-Air:Imaging-1.1.7 bkeating$ python setup.py build running buildrunning build_pyrunning build_ext --- using frameworks at /System/Library/Frameworks building '_imaging' extension /usr/bin/gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -DHAVE_LIBJPEG -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -I/usr/local/include/freetype2 -IlibImaging -I/System/Library/Frameworks/Python.framework/Versions/2.6/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c decode.c -o build/temp.macosx-10.6-universal-2.6/decode.o /usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed Installed assemblers are: /usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64 /usr/bin/../libexec/gcc/darwin/i386/as for architecture i386 decode.c:688: fatal error: error writing to -: Broken pipe compilation terminated. lipo: can't open input file: /var/folders/jW/jW0VkC8uEb4lAjcJou+OaU+++TI/-Tmp-//ccEmCpUp.out (No such file or directory) error: command '/usr/bin/gcc-4.0' failed with exit status 1
我手动运行了第一行,并删除了-arch ppc选项,并且没有返回任何错误,但是重新运行构建过程将忽略此手动尝试。 `gcc-4.0也不存在,我将其链接到gcc-4.2。
我可以继续安装Xcode3,然后安装4,但是我想要安装新的安装。
有没有告诉PIL不为PPC编译?我在整个发行版中做了一个grep,但是并没有提到PPC。有任何想法吗?
解决方法
该解决方案与PIL无关,而是设置gcc的ARCHFLAGS:
ARCHFLAGS="-arch i386 -arch x86_64" sudo pip install PIL
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。