プロが教えるわが家の防犯対策術!

SSLやpyAMFなどを

python setup.py install

でインストールしようとしているのですが、
エラーが出てしまいます。

pythonは2.6だとできるようですがどうしても2.5xを使う必要があります。
python25-appleをデフォルトのpythonにしています。


エラーの詳細は次のようになります。

User-no-MacBook-2:PyAMF-0.6.1 user$ python setup.py install



no previously-included directories found matching 'doc/build'
no previously-included directories found matching 'doc/_build'
warning: no previously-included files matching '*.swf' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution




gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c cpyamf/amf0.c -o build/temp.macosx-10.3-i386-2.5/cpyamf/amf0.o
cc1: error: unrecognized command line option "-Wno-long-double"
cc1: error: unrecognized command line option "-Wno-long-double"
lipo: can't figure out the architecture type of: /var/folders/dE/dEVcnZLtFw8U1ZFnQjT42E+++TI/-Tmp-//ccz4QQFi.out
error: command 'gcc' failed with exit status 1


始めはMacOSX10.4u.sdkがないと言われ、インストールしてみると
そのエラーは出なくなりましたが上記のような状態です。

これは使っているgccコンパイラに問題があるということなのでしょうか?

どなたかアドバイスをお願いします。

A 回答 (1件)

gccのフラグにPowerPCのアーキテクチャを指定しているのが原因かもしれません。

(-arch ppcの部分)
$export ARCHFLAGS="-arch i386"
としてフラグを設定してから再度セットアップスクリプトを実行すると良いかもしれません。
    • good
    • 0
この回答へのお礼

ありがとうございます。

試してみましたが、次のようになりだめみたいです;;


User-no-MacBook-2:~ user$ export ARCHFLAGS="-arch i386"


User-no-MacBook-2:ssl-1.15 user$ python setup.py install
looking for /usr/include/openssl/ssl.h
looking for /usr/include/krb5.h
running install
running build
running build_py
running build_ext
building 'ssl._ssl2' extension
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -I./ssl/2.5.1 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c ssl/_ssl2.c -o build/temp.macosx-10.3-i386-2.5/ssl/_ssl2.o
cc1: error: unrecognized command line option "-Wno-long-double"
cc1: error: unrecognized command line option "-Wno-long-double"
lipo: can't figure out the architecture type of: /var/folders/dE/dEVcnZLtFw8U1ZFnQjT42E+++TI/-Tmp-//cclKOV9n.out
error: command 'gcc' failed with exit status 1
User-no-MacBook-2:ssl-1.15 user$

お礼日時:2011/10/13 11:05

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!