использование Pygsl с GCC 4.0 в Python - PullRequest
0 голосов
/ 03 июля 2010

Я пытаюсь установить pygsl, используя последнюю версию GCC, а именно:

$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659)

Я получаю сообщение об ошибке:

$ sudo python setup.py build
numpy
Building testing ufuncs!
running build
running build_py
running build_ext
building 'errno' extension
C compiler: gcc-4.0 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3

compile options: '-DSWIG_COBJECT_TYPES=1 -DGSL_RANGE_CHECK=1 -DDEBUG=1 -DNUMERIC=0 -DPYGSL_GSL_MAJOR_VERSION=1 -DPYGSL_GSL_MINOR_VERSION=9 -UNDEBUG -I/usr/local/include -IInclude -I. -I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-2.0.0.dev-py2.6-macosx-10.6-universal.egg/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c'
gcc-4.0: src/init/errorno.c
In file included from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobject.h:4,
   from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
                 from src/init/errorno.c:5:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
In file included from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobject.h:4,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
                 from src/init/errorno.c:5:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccMNNq87.out
In file included from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobject.h:4,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
                 from src/init/errorno.c:5:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
In file included from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobject.h:4,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
                 from src/init/errorno.c:5:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccMNNq87.out
error: Command "gcc-4.0 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -DSWIG_COBJECT_TYPES=1 -DGSL_RANGE_CHECK=1 -DDEBUG=1 -DNUMERIC=0 -DPYGSL_GSL_MAJOR_VERSION=1 -DPYGSL_GSL_MINOR_VERSION=9 -UNDEBUG -I/usr/local/include -IInclude -I. -I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-2.0.0.dev-py2.6-macosx-10.6-universal.egg/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/init/errorno.c -o build/temp.macosx-10.3-fat-2.6/src/init/errorno.o" failed with exit status 1

Есть идеи, что может быть причиной этого?спасибо.

1 Ответ

1 голос
/ 05 июля 2010

Хотя gcc-4.2 установлен, вы видите, что сборка использует gcc-4.0 - сбивает с толку.Откуда взялся "gcc-4.0"?Может быть, setup.py, или ~/.pydistutils.cfg, или export CC-gcc-4.0, или ... просто угадаю, у меня нет pygsl.
Можете ли вы получить gcc-4.0, как описано в SO настройка gcc-4-2-as-the-default-compiler-on-mac-os-x-leopard ?

...