尝试在Cygwin中从源构建Python时出错

时间:2014-07-19 18:44:35

标签: python cygwin

从我读过的所有内容中,我得到的印象是,在Cygwin中从源(相对来说)构建起来非常容易。但是,当我与gcc一起安装基础包并尝试从源代码构建Python 2.7.8时,我在运行./configure时遇到以下错误:

checking whether we are cross compiling... configure: error: in `/cygdrive/h/Python-2.7.8':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

打开config.log后,我看到了:

configure:3978: checking whether we are cross compiling
configure:3986: gcc -o conftest.exe    conftest.c  >&5
configure:3990: $? = 0
configure:3997: ./conftest.exe
./configure: line 3999: ./conftest.exe: Permission denied
configure:4001: $? = 126
configure:4008: error: in `/cygdrive/h/Python-2.7.8':
configure:4010: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

我不确定我究竟是什么问题。它似乎试图将conftest.c编译成conftest.exe(看起来有效吗?),然后尝试运行可执行文件但是在允许的基础上被拒绝。

有关从哪里开始的任何想法或见解?

1 个答案:

答案 0 :(得分:0)

原来我无意中安装了错误的GCC包。回滚所有开发包安装并只安装GNU GCC 4.8.3解决了上述问题。