【发布时间】:2010-08-17 08:31:32
【问题描述】:
我正在尝试安装一个需要运行 gcc 4.2 的 Python 包。我的 gcc 正确指向 gcc-4.2,即
$ gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~38/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)
但是,我的 python 是使用 gcc 4.0 构建的,即
$ python
Python 2.5.4 (r254:67917, Dec 23 2008, 15:47:06)
[GCC 4.0.1 (Apple Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
有什么方法可以在 GCC 4.2 上重新构建 Python 而不必重新安装我所有的 Python 包?
我的操作系统是 Mac OS 10.6。
注意:将 gcc 指向 gcc-4.0 对我没有帮助——我需要使用 gcc-4.2。
【问题讨论】:
-
它是什么包?包中的 C 源代码取决于系统的编译器,而不是编译 python 可执行文件的内容。听起来像是可以修补的软件包中的错误检查。
-
对不起,太累了,我迟到了。问题在于 distutils,而不是正在构建的包。