Comment puis-je comprendre ces erreurs terribles lors de la construction de gcc-4.8.2?

J’essaie d’installer le compilateur gcc-4.8.2 sur un système Debian 7 distant, auquel je n’ai pas de privilèges root , mais uniquement un access ssh . J’ai compris que le moyen le plus simple serait de comstackr le compilateur à partir des sources.

Je suis ce manuel d’installation court de la page Web de GCC.

Fondamentalement, j’ai fait l’ installation la plus simple , qui est résumée au bas de la page:

tar xzf gcc-4.8.2.tar.gz cd gcc-4.8.2 ./consortingb/download_prerequirejsites cd .. mkdir objdir cd objdir $PWD/../gcc-4.8.2/configure --prefix=$HOME/gcc-4.8.2 --enable-languages=c++ make 

avec la petite exception que je n’ai pas exécuté le script ./consortingb/download_prerequirejsites sur la machine distante en raison de ressortingctions de pare-feu. Au lieu de cela, je l’ai exécuté sur ma machine locale, puis j’ai compressé le dossier entier dans gcc-4.8.2.tar.gz et l’ gcc-4.8.2.tar.gz sur la machine distante. Là, j’ai recréé les liens symboliques vers les bibliothèques prérequirejses (gmp, …) et lancé make . Après quelques secondes, je reçois des erreurs incroyables:

 In file included from ./tm.h:19:0, from ../../gcc-4.8.2/gcc/c/c-lang.c:24: ./options.h:4078:2: error: #error too many masks for ix86_isa_flags In file included from ../../gcc-4.8.2/gcc/tree.h:26:0, from ../../gcc-4.8.2/gcc/c/c-lang.c:25: ../../gcc-4.8.2/gcc/statistics.h:25:2: error: #error GATHER_STATISTICS must be defined In file included from ../../gcc-4.8.2/gcc/system.h:268:0, from ../../gcc-4.8.2/gcc/c/c-lang.c:22: ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if ../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if In file included from ../../gcc-4.8.2/gcc/tree.h:29:0, from ../../gcc-4.8.2/gcc/c/c-lang.c:25: ../../gcc-4.8.2/gcc/real.h:103:9: error: #error "REAL_WIDTH > 6 not supported" In file included from ../../gcc-4.8.2/gcc/c-family/c-common.h:24:0, from ../../gcc-4.8.2/gcc/c/c-tree.h:23, from ../../gcc-4.8.2/gcc/c/c-lang.c:26: ../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:265:3: error: #error "Cannot find a least-32-bit signed integer type" In file included from ../../gcc-4.8.2/gcc/c/c-lang.c:22:0: ../../gcc-4.8.2/gcc/system.h:500:34: error: declaration of C function 'const char* strsignal(int)' conflicts with In file included from /usr/include/c++/4.7/cssortingng:44:0, from ../../gcc-4.8.2/gcc/system.h:205, from ../../gcc-4.8.2/gcc/c/c-lang.c:22: /usr/include/ssortingng.h:566:14: error: previous declaration 'char* strsignal(int)' here In file included from ../../gcc-4.8.2/gcc/system.h:645:0, from ../../gcc-4.8.2/gcc/c/c-lang.c:22: ../../gcc-4.8.2/gcc/../include/libiberty.h:110:36: error: new declaration 'char* basename(const char*)' In file included from /usr/include/c++/4.7/cssortingng:44:0, from ../../gcc-4.8.2/gcc/system.h:205, from ../../gcc-4.8.2/gcc/c/c-lang.c:22: /usr/include/ssortingng.h:603:28: error: ambiguates old declaration 'const char* basename(const char*)' In file included from ../../gcc-4.8.2/gcc/tree.h:27:0, from ../../gcc-4.8.2/gcc/c/c-lang.c:25: ../../gcc-4.8.2/gcc/vec.h: In static member function 'static void va_heap::reserve(vec*&, unsigned int, bool)': ../../gcc-4.8.2/gcc/vec.h:295:7: error: 'GATHER_STATISTICS' was not declared in this scope ../../gcc-4.8.2/gcc/vec.h:303:7: error: 'GATHER_STATISTICS' was not declared in this scope ../../gcc-4.8.2/gcc/vec.h: In static member function 'static void va_heap::release(vec*&)': ../../gcc-4.8.2/gcc/vec.h:317:7: error: 'GATHER_STATISTICS' was not declared in this scope In file included from ../../gcc-4.8.2/gcc/tree.h:29:0, from ../../gcc-4.8.2/gcc/c/c-lang.c:25: ../../gcc-4.8.2/gcc/real.h: At global scope: ../../gcc-4.8.2/gcc/real.h:51:21: error: 'SIZEOF_LONG' was not declared in this scope ../../gcc-4.8.2/gcc/real.h:51:21: error: 'SIZEOF_LONG' was not declared in this scope ../../gcc-4.8.2/gcc/real.h:76:31: error: 'SIZEOF_LONG' was not declared in this scope ../../gcc-4.8.2/gcc/real.h:76:31: error: 'SIZEOF_LONG' was not declared in this scope ../../gcc-4.8.2/gcc/real.h:76:31: error: 'SIZEOF_LONG' was not declared in this scope ../../gcc-4.8.2/gcc/real.h:76:31: error: 'SIZEOF_LONG' was not declared in this scope In file included from ../../gcc-4.8.2/gcc/c-family/c-common.h:24:0, from ../../gcc-4.8.2/gcc/c/c-tree.h:23, from ../../gcc-4.8.2/gcc/c/c-lang.c:26: ../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:267:35: error: expected initializer before 'cppchar_t' ../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:268:9: error: 'CPPCHAR_SIGNED_T' does not name a type ../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:777:8: error: 'cppchar_t' does not name a type ../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:788:8: error: 'cppchar_t' does not name a type ../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:966:8: error: 'cppchar_t' does not name a type make[3]: *** [c/c-lang.o] Error 1 make[3]: Leaving directory `/home/mdrozdik/gccbuild/gcc' make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory `/home/mdrozdik/gccbuild' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/home/mdrozdik/gccbuild' make: *** [all] Error 2 

Je comstack avec gcc 4.7.2-5 sur Debian .

Sur la machine locale, il y a Ubuntu 13.10 avec gcc 4.7.3 et la construction semble bien aller (toujours en cours).

S’il vous plaît, quelle pourrait être la cause de ces erreurs?

MODIFIER:

J’ai vérifié le fichier /home/mdrozdik/gccbuild/libcpp/config.log . C’est très long mais à deux endroits il y a ces erreurs:

 configure:3086: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. configure:3097: $? = 4 configure:3086: gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion' gcc: fatal error: no input files compilation terminated. configure:3097: $? = 4 

Mais le journal continue cependant pour plusieurs pages.

J’ai eu un problème similaire (gcc 4.8.3) et ceci l’a résolu: g ++ 4.7.1 erreur de compilation: types contradictoires pour ‘strsignal’

La solution consistait à supprimer un certain nombre de drapeaux du compilateur C (CPATH, etc.)

https://stackoverflow.com/users/1224886/tsbertalan a rapporté que cela a fonctionné pour lui (et c’est ce que j’ai utilisé):

 unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE