g++ 4.7.1 Zusammenstellung error : conflicting types for 'strsignal'
Ich versuche zu kompilieren g++ 4.7.1 aus dem Quellcode auf Ubuntu 12.04 32-bit.
Für den moment habe ich genau das getan : https://askubuntu.com/questions/168947/how-to-upgrade-g-to-4-7-1
Außer kurz vor der Zusammenstellung des g++ 4.7.1 aufgefordert, mich "unset " LIBRARY_PATH" (so habe ich das gemacht).
Also die Zusammenstellung beginnt, und nach einer Weile habe ich die folgende Fehlermeldung :
In file included from ../.././gcc/c-lang.c:24:0:
../.././gcc/system.h:499:20: erreur: conflicting types for ‘strsignal’
/usr/include/string.h:566:14: note: previous declaration of ‘strsignal’ was here
In file included from ./tm.h:19:0,
from ../.././gcc/c-lang.c:26:
./options.h:3738:2: erreur: #error too many masks for ix86_isa_flags
In file included from ../.././gcc/input.h:25:0,
from ../.././gcc/tree.h:27,
from ../.././gcc/c-lang.c:27:
../.././gcc/../libcpp/include/line-map.h:208:38: erreur: ‘CHAR_BIT’ undeclared here (not in a function)
../.././gcc/../libcpp/include/line-map.h:208:3: erreur: bit-field ‘reason’ width not an integer constant
../.././gcc/../libcpp/include/line-map.h:208:3: attention : ‘reason’ is narrower than values of its type [enabled by default]
In file included from ../.././gcc/tree.h:32:0,
from ../.././gcc/c-lang.c:27:
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/hwint.h:17:39: erreur: division par zéro dans #if
../.././gcc/real.h:105:9: erreur: #error "REAL_WIDTH > 6 not supported"
In file included from ../.././gcc/c-family/c-common.h:26:0,
from ../.././gcc/c-tree.h:25,
from ../.././gcc/c-lang.c:28:
../.././gcc/../libcpp/include/cpplib.h:225:3: erreur: bit-field ‘type’ width not an integer constant
../.././gcc/../libcpp/include/cpplib.h:225:3: attention : ‘type’ is narrower than values of its type [enabled by default]
../.././gcc/../libcpp/include/cpplib.h:267:3: erreur: #error "Cannot find a least-32-bit signed integer type"
../.././gcc/../libcpp/include/cpplib.h:269:35: erreur: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cppchar_t’
../.././gcc/../libcpp/include/cpplib.h:270:1: erreur: unknown type name ‘CPPCHAR_SIGNED_T’
../.././gcc/../libcpp/include/cpplib.h:768:1: erreur: unknown type name ‘cppchar_t’
../.././gcc/../libcpp/include/cpplib.h:779:1: erreur: unknown type name ‘cppchar_t’
../.././gcc/../libcpp/include/cpplib.h:779:58: erreur: unknown type name ‘cppchar_t’
../.././gcc/../libcpp/include/cpplib.h:954:1: erreur: unknown type name ‘cppchar_t’
(sorry, einige Fehler-Nachrichten sind in Französisch : erreur -> error
und division par zéro dans #if -> division by zero in #if
).
Was ist das problem und wie es zu lösen ?
(eine andere kleine Frage : was ist der Unterschied zwischen ./configure
und ./configure -v
?)
EDIT : die Zeilen strsignal im system.h
/* If the system doesn't provide strsignal, we get it defined in
libiberty but no declaration is supplied. */
#if !defined (HAVE_STRSIGNAL) \
|| (defined (HAVE_DECL_STRSIGNAL) && !HAVE_DECL_STRSIGNAL)
# ifndef strsignal
extern const char *strsignal (int);
# endif
#endif
- Ich habe vor kurzem gebaut gcc 4.7.1 von der Quelle - vielleicht sind meine Hinweise helfen: steve-lorimer.blogspot.com.au/2012/08/building-gcc.html
Du musst angemeldet sein, um einen Kommentar abzugeben.
Ich hatte das gleiche problem. In meinem Fall, ich löste es durch das entfernen der bash-Variablen CPATH, LIBRARY_PATH und C_INCLUDE_PATH. Nach, dass, das bauen ging gut.
Ich verwendet
Da ich nicht über root-Zugriff auf diese Maschine, und so habe ich angehängt, um eine Menge von diesen Variablen.
Anderen Lösungen haben bei mir nicht funktioniert, weil ich die env-Variablen zu-Punkt-gcc einige seiner Abhängigkeiten. Auch
unset
ting variit klingt nicht wie eine sehr präzise Korrektur 🙂Stellt sich heraus, das problem ist, ich hatte einige nachgestellte
:
in meinem env vars Erklärungen, etwa so:Das Ergebnis ist, dass
LIBRARY_PATH
immer das aktuelle Verzeichnis zu. Die Einstellung des env-Variablen richtig, mit keine nachgestellten:
, das problem gelöst.