我一直在尝试compile/make'gcc 4.8.3'** on cygwin。我已经安装的cygwin的版本是** cygwin x86_64。我也预安装了gcc,它是5.4.0版本。Cygwin gcc 4.8.3版本无法制作
为什么我要的GCC这个特殊的版本是因为,我需要安装Python3.5.2,让我可以反过来,在Cygwin上安装tensorflow。我试图使用Pyenv来安装Python3.5.2,但我的猜测是Python 3.5.2的库预编译为gcc 4.8.x版本,因为我遇到Pyenv无法运行C编译程序的问题。另外,我认为,这个问题可能是因为版本。我正在使用64位的windos 10。
gcc的配置成功发生,但在运行make文件时遇到问题。这是错误消息:
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[2]: *** [Makefile:4763: configure-stage1-gmp] Error 1
make[2]: Leaving directory
'/cygdrive/c/softwares/cygwin64/lib/gcc_4_8_3'
make[1]: *** [Makefile:20946: stage1-bubble] Error 2
make[1]: Leaving directory
'/cygdrive/c/softwares/cygwin64/lib/gcc_4_8_3'
make: *** [Makefile:890: all] Error 2
我检查的config.log,这就是我发现:
/usr/include/sys/cdefs.h:45:20: fatal error: stddef.h: No such
file or directory
#include <stddef.h>
^
compilation terminated.
configure:12120 $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| #define PROTOTYPES 1
| #define __PROTOTYPES 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_STRING_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:12114: g++ -E -DNO_ASM conftest.cpp
In file included from /usr/include/features.h:12:0,
from /usr/include/limits.h:11,
from conftest.cpp:27:
我也包括到/ lib/CPP DLL在windows环境下的文件路径。尽管如此,它并没有改变任何东西。
我认为这个问题是由于缺少文件。在哪个目录下我可以找到这个文件?
还有没有其他机制可以编译gcc。我不想使用预安装的gcc版本,因为我打算在cygwin上安装Python 3.5.2和tensorflow。
任何类型的帮助将是伟大的。
谢谢。
$ cygcheck -l gcc-core | grep stddef.h /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/include/stddef.h – matzeri