2017-06-22 34 views
0

我一直在嘗試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。

任何類型的幫助將是偉大的。

謝謝。

+0

$ cygcheck -l gcc-core | grep stddef.h /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/include/stddef.h – matzeri

回答

0

STDDEF.H是gcc編譯

$ cygcheck -l gcc-core |grep stddef.h 
/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/include/stddef.h 
0

我已經找到了我的問題的修補程序的一部分。

我已經用apt-cyg卸載了cygwin Python,現在,python的windows版本工作正常。