在 Python 中使用 Pygsl 和 GCC 4.0

发布于 2024-09-08 02:37:50 字数 3112 浏览 5 评论 0原文

我正在尝试使用最新版本的 GCC 安装 pygsl,即:

$ 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

知道可能是什么原因造成的吗? 谢谢。

I am trying to install pygsl using latest version of GCC, i.e.:

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

I get the error:

$ 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

Any idea what might be causing this?
thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初见终念 2024-09-15 02:37:50

尽管安装了 gcc-4.2,但您会看到构建正在使用 gcc-4.0——令人困惑。
“gcc-4.0”从哪里来?也许是setup.py,
~/.pydistutils.cfg,或export CC-gcc-4.0或...只是猜测,我没有pygsl。
你能把 gcc-4.0 排除掉吗,如中所述
所以 setting-gcc-4 -2-as-the-default-compiler-on-mac-os-x-leopard

Although gcc-4.2 is installed, you see that the build is using gcc-4.0 -- confusing.
Where's the "gcc-4.0" coming from ? Maybe the setup.py,
or ~/.pydistutils.cfg, or export CC-gcc-4.0 or ... just guessing, I don't have pygsl.
Can you get gcc-4.0 out of the way, as described in
SO setting-gcc-4-2-as-the-default-compiler-on-mac-os-x-leopard ?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文