PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : gcc updaten



oszi
26.07.05, 21:09
hallo alle zusammen,
ich hab neulich versucht mysql zu kompilieren doch leider ohne ervolg.
anscheinen findet er die confdefs.h nicht.
also hab ich beschlossen mein gcc zu erneuern da noch auf version 3.x.x
ich hab mir also version 4.0.1 gesaugt configure --prefix=\usr\doc\gcc-4.0.1
und dann make;make install

das hat dann erstmal genauert und schien ervolgreich.
das problem gcc -v liefert mir immernoch die alte version... wie mach ich ihm klar dass er die neue nehmen soll?

Ich arbeite über ssh und auf dem rechner läuft slackware.

Thx for help

traffic
26.07.05, 21:23
Das ist auch logisch, die neuen Binaires sind doch gar nicht im PATH, wie soll er die finden? Eine Lösung könnte so aussehen:

export CC=/pfad/zum/neuen/gcc
export CXX=/pfad/zum/neuen/g++
export CPP=/pfad/zum/neuen/cpp
./configure
Ein paar Fragen hätte in trotzdem noch:

- Bist Du sicher, dass /usr/doc/gcc-4.0.1 ein gutes Installationsverzeichnis für einen Compiler ist? /usr/doc ist für Dokumentation.
- Bist Du sicher, dass ein neuer GCC Deine Probleme lösen wird? GCC 4 kann nicht etwa mehr Programme kompilieren als GCC 3, sondern weniger!

Falls Du den gcc von Hand aufrufen willst, erstelle einen Shell-Wrapper an der Stelle, wo der alte gcc war oder füg das Verzeichnis mit den Binaries zum PATH hinzu oder verwende absolute Pfade.

oszi
26.07.05, 21:47
hm ich mus zugeben dass ich noch recht wenig ahnung habe und einfach mal drauf los ausprobier.

der ausgangspinkt war folgende fehlermeldung bei der installatin von mysql:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.


daraufhin hab ich in die config.log geschaut


ausschnitt



configure:3083: test -z
|| test ! -s conftest.err
configure:3086: $? = 0
configure:3089: test -s conftest.o
configure:3092: $? = 0
configure:3110: result: none needed
configure:3128: gcc -c conftest.c >&5
conftest.c:2: error: parse error before "me"
configure:3134: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
onfigure:3279: checking for style of include used by make
configure:3307: result: GNU
configure:3335: checking dependency style of gcc
configure:3420: result: gcc3
configure:3489: checking for g++
configure:3518: result: no
configure:3489: checking for c++
configure:3518: result: no
configure:3489: checking for gpp
configure:3518: result: no
configure:3489: checking for aCC
configure:3518: result: no
configure:3489: checking for CC
configure:3518: result: no
configure:3489: checking for cxx
configure:3518: result: no
configure:3489: checking for cc++
configure:3518: result: no
configure:3489: checking for cl
configure:3518: result: no
configure:3489: checking for FCC
configure:3518: result: no
configure:3489: checking for KCC
configure:3518: result: no
configure:3489: checking for RCC
configure:3518: result: no
configure:3489: checking for xlC_r
configure:3518: result: no
configure:3489: checking for xlC
configure:3518: result: no
onfigure:3531: checking for C++ compiler version
configure:3534: g++ --version </dev/null >&5
./configure: line 1: g++: command not found
configure:3537: $? = 127
configure:3539: g++ -v </dev/null >&5
./configure: line 1: g++: command not found
configure:3542: $? = 127
configure:3544: g++ -V </dev/null >&5
./configure: line 1: g++: command not found
configure:3547: $? = 127
configure:3550: checking whether we are using the GNU C++ compiler
configure:3574: g++ -c conftest.cc >&5
./configure: line 1: g++: command not found
configure:3580: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "mysql"
| #define VERSION "4.0.25"
| #define PROTOCOL_VERSION 10
| #define DOT_FRM_VERSION 6
| #define SYSTEM_TYPE "pc-linux-gnu"
| #define MACHINE_TYPE "i586"
| /* end confdefs.h. */

| int
| main ()
| {
| #ifndef __GNUC__
| choke me
| #endif
|
| ;
| return 0;
| }
configure:3606: result: no
configure:3612: checking whether g++ accepts -g
configure:3633: g++ -c -g conftest.cc >&5
./configure: line 1: g++: command not found
configure:3639: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "mysql"
| #define VERSION "4.0.25"
| #define PROTOCOL_VERSION 10
| #define DOT_FRM_VERSION 6
| #define SYSTEM_TYPE "pc-linux-gnu"
| #define MACHINE_TYPE "i586"
| /* end confdefs.h. */
int
| main ()
| {
| exit (42);
| ;
| return 0;
| }
configure:3706: g++ -c conftest.cc >&5
./configure: line 1: g++: command not found
configure:3712: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "mysql"
| #define VERSION "4.0.25"
| #define PROTOCOL_VERSION 10
| #define DOT_FRM_VERSION 6
| #define SYSTEM_TYPE "pc-linux-gnu"
| #define MACHINE_TYPE "i586"
| /* end confdefs.h. */
| #include <stdlib.h>
| extern "C" void std::exit (int) throw (); using std::exit;
| int
| main ()
| {
| exit (42);
| ;
| return 0;
| }
configure:3706: g++ -c conftest.cc >&5
./configure: line 1: g++: command not found
configure:3712: $? = 127
configure: failed program was:
| /* confdefs.h. */
#define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "mysql"
| #define VERSION "4.0.25"
| #define PROTOCOL_VERSION 10
| #define DOT_FRM_VERSION 6
| #define SYSTEM_TYPE "pc-linux-gnu"
| #define MACHINE_TYPE "i586"
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:4143: checking "C Compiler version"
configure:4145: result: "gcc gcc (GCC) 3.3.4"
configure:4160: checking "C++ compiler version"
configure:4162: result: "g++ "
configure:4268: checking for ranlib
configure:4284: found /usr/bin/ranlib
configure:4295: result: ranlib
configure:4381: checking for a sed that does not truncate output
configure:4435: result: /usr/bin/sed
configure:4438: checking for egrep
configure:4448: result: grep -E
configure:4464: checking for ld used by gcc
configure:4531: result: /usr/i486-slackware-linux/bin/ld
configure:4540: checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld
configure:4555: result: yes
configure:4560: checking for /usr/i486-slackware-linux/bin/ld option to reload object files
configure:4567: result: -r
configure:4576: checking for BSD-compatible nm
configure:4618: result: /usr/bin/nm -B
configure:4622: checking whether ln -s works
configure:4626: result: yes
configure:4633: checking how to recognise dependent libraries
configure:4816: result: pass_all
configure:5026: checking for ANSI C header files
configure:5051: gcc -c conftest.c >&5
configure:5057: $? = 0
configure:5061: test -z
|| test ! -s conftest.err
configure:5064: $? = 0
configure:5067: test -s conftest.o
configure:5070: $? = 0
configure:5156: gcc -o conftest conftest.c >&5
configure:5159: $? = 0
configure:5161: ./conftest
configure:5164: $? = 0
configure:5179: result: yes
configure:5203: checking for sys/types.h
configure:5219: gcc -c conftest.c >&5
configure:5225: $? = 0
configure:5229: test -z
|| test ! -s conftest.err
configure:5232: $? = 0
configure:5235: test -s conftest.o
configure:5238: $? = 0
configure:5249: result: yes
configure:5203: checking for sys/stat.h
configure:5219: gcc -c conftest.c >&5
configure:5225: $? = 0
configure:5229: test -z
...
...
onfigure:5300: $? = 0
configure:5303: test -s conftest.o
configure:5306: $? = 0
configure:5316: result: yes
configure:5320: checking dlfcn.h presence
configure:5330: gcc -E conftest.c
configure:5336: $? = 0
configure:5356: result: yes
configure:5391: checking for dlfcn.h
configure:5398: result: yes
configure:5416: checking how to run the C++ preprocessor
configure:5447: g++ -E conftest.cc
./configure: line 1: g++: command not found
configure:5453: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "mysql"
| #define VERSION "4.0.25"
| #define PROTOCOL_VERSION 10
| #define DOT_FRM_VERSION 6
| #define SYSTEM_TYPE "pc-linux-gnu"
| #define MACHINE_TYPE "i586"
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| #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_DLFCN_H 1
| /* end confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "mysql"
| #define VERSION "4.0.25"
| #define PROTOCOL_VERSION 10
| #define DOT_FRM_VERSION 6
| #define SYSTEM_TYPE "pc-linux-gnu"
| #define MACHINE_TYPE "i586"
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| #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_DLFCN_H 1
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:5447: /lib/cpp conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:5453: $? = 1
configure: failed program was:
| /* confdefs.h. */
#define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "mysql"
| #define VERSION "4.0.25"
| #define PROTOCOL_VERSION 10
| #define DOT_FRM_VERSION 6
| #define SYSTEM_TYPE "pc-linux-gnu"
| #define MACHINE_TYPE "i586"
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| #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_DLFCN_H 1
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:5447: /lib/cpp conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:5453: $? = 1
configure: failed program was:
| /* confdefs.h. */
...
...
...

| Syntax error
configure:5530: result: /lib/cpp
configure:5554: /lib/cpp conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:5560: $? = 1
configure: failed program was:
| /* confdefs.h. */
...
...
...

configure: exit 1



ich hoffe jemand fällt was ein

hp_tux
26.07.05, 22:03
Hallo,


./configure: line 1: g++: command not found
hmm, da wird der C++-Compiler nicht gefunden. Schau doch bitte mal nach, ob der überhaupt installiert ist.

Gruß

hp_tux

derguteweka
26.07.05, 22:07
Moin,

1.) Die Toolchain (gcc, binutils) und die glibc sollten nur dann upgedated werden, wenn es einen ganz klaren, guten, offensichtlichen Grund dafuer gibt. Keinesfalls einfach so, weil man gehoert hat, es gaebe eine neue Version.

2.) Es sieht so aus, als ob du lediglich einen C Compiler installiert hast und keinen C++. Da tipp' ich mal als Fehlerursache drauf. Also installier dir einen passenden C++ Compiler, und zwar die zu deiner Distribution passenden binaries, nicht den source; dann sollte configure auch ein bisschen weiterkommen.

3.) Nur, um die Frage zu vermeiden: Nein, cpp ist nicht der c++ compiler, sondern der Praeprozessor.


Gruss
WK

plueschinger
26.07.05, 22:23
Hallo

Bei RPM-Distributionen gehoert /usr/bin/g++ zum Paket
gcc-c++

Gruesse
Plueschinger
( erros são chato e também chatos são chato )

oszi
28.07.05, 07:49
Danke für eure zahlreichen ratschläge nur weiß ich nicht wie das c++ modul installieren soll.
Außerdem kann ich nicht fetstellen wo mein gc installiert ist.

hp_tux
28.07.05, 08:17
Hallo,


Danke für eure zahlreichen ratschläge nur weiß ich nicht wie das c++ modul installieren soll.
Außerdem kann ich nicht fetstellen wo mein gc installiert ist.
nun, wenn Du so tief in das System vordringen willst, brauchst Du einiges an Grundlagenwissen. Etliche nützliche Links findest Du hier im Forum.

Merke: Besser als viel lesen ist - noch viel mehr lesen. ;)

Gruß

hp_tux