在带有Xcode4的OS X Snow Leopard上安装PIL(不支持PPC) [英] Installing PIL on OS X Snow Leopard w/Xcode4 (no PPC support)

查看:88
本文介绍了在带有Xcode4的OS X Snow Leopard上安装PIL(不支持PPC)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xcode4放弃了对PPC的支持,因此当我尝试构建PIL时,它会引起仇恨:

Xcode4 dropped PPC support, so when I try building PIL, it throws hate:

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.

I ran that first line, manually, and removed the -arch ppc option and it didn't report back with any errors, but rerunning the build process ignores this manual attempt. `gcc-4.0 also does not exist, I symlinked it to gcc-4.2.

我可以继续安装Xcode3,然后再安装4,但是我想重新安装我的新安装.

I could go ahead and install Xcode3 and then 4, but I want to muck up my fresh install.

有没有告诉PIL不要为PPC编译?我在整个发行版中做了一个grep,但没有找到PPC的任何提及.有什么想法吗?

Is there anyway to tell PIL to not compile for PPC? I did a grep across the distribution but i did not find a single mention of PPC. Any ideas?

推荐答案

该解决方案与PIL无关,而是设置gcc的ARCHFLAGS:

The solution has nothing to do with PIL but rather setting gcc's ARCHFLAGS:

ARCHFLAGS="-arch i386 -arch x86_64" sudo pip install PIL

这篇关于在带有Xcode4的OS X Snow Leopard上安装PIL(不支持PPC)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆