# Zerschossener gcc

## Romses

Hallo

Ich habe mir irgendwie meinen gcc zerschossen...

Wie benomme ich mein System, was ansonsten sehr gut funktioniert, soweit

wieder flott, dass ich wieder emergen kann?

kann ich einfach eine stage<1|2|3> Installation über mein bestehenden System legen,

ohne dass bereits installierte Programme (X, KDE usw...)

in Mitleidenschaft gezogen werden?

Gruß Romses

----------

## Realmaker

Du kannst dir ja einen Binär-gcc installieren von gcc.gnu.org

----------

## moocha

1. Downloade eins von den GCC-Paketen von hier: http://dev.gentoo.org/~avenj/bins/

2. cd ins Verzeichnis, in dem du das Paket gespeichert hast.

3. 

```
tar -xjpf gcc-3.3.3.tbz2 -C /
```

 (im Fall in dem du gcc-3.3.3.tbz2 heruntergeladen hast, natuerlich - sonst verwende den entsprechended Dateinamen).

4. emerge deine vorherige GCC-Version, damit portage seine Liste von installierten Paketen richtigstellt.

Edit: Mist, hab's aus Gewohnheit auf English gepostet  :Smile: 

----------

## Romses

Mein Problem scheint ernsthafterer Natur zu sein...

Nachdem ich den gcc tntpackt habe, wollte ich ein emerge gcc machen, und das hier kam dabei raus...

```
root@minime romses # emerge gcc

Calculating dependencies ...done!

>>> emerge (1 of 1) sys-devel/gcc-3.3.2-r5 to /

>>> md5 src_uri ;-) gcc-3.3.2.tar.bz2

>>> md5 src_uri ;-) gcc-3.3.2-patches-1.0.tar.bz2

>>> md5 src_uri ;-) gcc-3.3.2-branch-update-20031218.patch.bz2

>>> md5 src_uri ;-) protector-3.3-7.tar.gz

>>> md5 src_uri ;-) gcc-3.3.2-manpages.tar.bz2

>>> Unpacking source...

>>> Unpacking gcc-3.3.2.tar.bz2 to /var/tmp/portage/gcc-3.3.2-r5/work

>>> Unpacking gcc-3.3.2-patches-1.0.tar.bz2 to /var/tmp/portage/gcc-3.3.2-r5/work

>>> Unpacking protector-3.3-7.tar.gz to /var/tmp/portage/gcc-3.3.2-r5/work

 * Patching ${S}/ltmain.sh...

 *   Applying portage-1.4.1.patch...

 *   Applying relink-1.4.0a-GCC3.0-2.patch...

 *   Applying sed-1.4.3.patch...

 *   Applying tmp-1.3.5.patch...

 * Applying gcc-3.3.2-branch-update-20031218.patch.bz2...                 [ ok ]

 * Applying various patches (bugfixes/updates)...

 *   02_all_gcc33-ice-hack.patch.bz2...                                   [ ok ]

 *   15_all_gcc33-multi-os-directory.patch.bz2...                         [ ok ]

 *   16_all_gcc33-c99-double-inline.patch.bz2...                          [ ok ]

 *   17_all_gcc33-c99-numbers.patch.bz2...                                [ ok ]

 *   23_all_gcc33-c++-decl2.patch.bz2...                                  [ ok ]

 *   25_all_gcc33-libstdc++-pic.patch.bz2...                              [ ok ]

 *   26_all_gcc33-m68k-const.patch.bz2...                                 [ ok ]

 *   27_all_gcc33-m68k-java-build.patch.bz2...                            [ ok ]

 *   28_all_gcc33-m68k-loop.patch.bz2...                                  [ ok ]

 *   29_all_gcc33-m68k-subreg.patch.bz2...                                [ ok ]

 *   31_all_gcc331-pr495.patch.bz2...                                     [ ok ]

 *   32_all_gcc331-pr1823.patch.bz2...                                    [ ok ]

 *   34_all_gcc331-pr8967.patch.bz2...                                    [ ok ]

 *   35_all_gcc33-pr9929.patch.bz2...                                     [ ok ]

 *   40_all_gcc33-regmove-fix.patch.bz2...                                [ ok ]

 *   41_all_gcc331-sched-ebb-cselib.patch.bz2...                          [ ok ]

 *   50_all_gcc33-coreutils-compat.patch.bz2...                           [ ok ]

 * Done with patching

 * Applying gcc331-pp-fixup.patch...                                      [ ok ]

 * Applying protector.dif...                                              [ ok ]

 * Applying gcc332-gentoo-branding.patch...                               [ ok ]

 * This sys-libs/glibc has __guard object and __stack_smash_handler functions

 * scanning the system for binaries with __guard - this may take 5-10 minutes

 * Please do not press ctrl-C or ctrl-Z during this period - it will continue

 * Scanning system for __guard@GCC symbols...

 *  Scanning 01 of 26 /lib...

 *  Scanning 02 of 26 /usr/lib...

 *  Scanning 03 of 26 /opt/sun-jdk-1.4.2.04/jre/lib...

 *  Scanning 04 of 26 /opt/XnView/lib...

 *  Scanning 05 of 26 /usr/games/lib...

 *  Scanning 06 of 26 /usr/kde/3.2/lib...

 *  Scanning 07 of 26 /usr/local/lib...

 *  Scanning 08 of 26 /usr/qt/3/lib...

 *  Scanning 09 of 26 /usr/X11R6/lib...

 *  Scanning 10 of 26 /bin...

 *  Scanning 11 of 26 /opt/Acrobat5...

 *  Scanning 12 of 26 /opt/XnView...

 *  Scanning 13 of 26 /opt/bin...

 *  Scanning 14 of 26 /opt/sun-jdk-1.4.2.04/bin...

 *  Scanning 15 of 26 /opt/sun-jdk-1.4.2.04/jre/bin...

 *  Scanning 16 of 26 /opt/sun-jdk-1.4.2.04/jre/javaws...

 *  Scanning 17 of 26 /sbin...

 *  Scanning 18 of 26 /usr/X11R6/bin...

 *  Scanning 19 of 26 /usr/bin...

 *  Scanning 20 of 26 /usr/i686-pc-linux-gnu/gcc-bin/3.3...

 *  Scanning 21 of 26 /usr/kde/3.2/bin...

 *  Scanning 22 of 26 /usr/kde/3.2/sbin...

 *  Scanning 23 of 26 /usr/local/bin...

 *  Scanning 24 of 26 /usr/qt/3/bin...

 *  Scanning 25 of 26 /usr/sbin...

 *  Scanning 26 of 26 /usr/share/karamba/bin...

 * No binaries with suspicious libgcc __guard@GCC dependencies detected

>>> Source unpacked.

 * CFLAGS=" -march=i686-pc-linux-gnu -O2"

 * CXXFLAGS=" -march=i686-pc-linux-gnu -O2"

 * GCJFLAGS=""

 * Configuring GCC...

*** This configuration is not supported in the following subdirectories:

     target-libffi target-boehm-gc target-zlib target-libjava zlib fastjar

    (Any other directories should still work fine.)

Created "Makefile" in /var/tmp/portage/gcc-3.3.2-r5/work/build using "mt-frag"

cc1: error: bad value (i686-pc-linux-gnu) for -march= switch

cc1: error: bad value (i686-pc-linux-gnu) for -mcpu= switch

*** The command 'gcc -o conftest  -march=i686-pc-linux-gnu -O2   conftest.c' failed.

*** You must set the environment variable CC to a working compiler.

!!! ERROR: sys-devel/gcc-3.3.2-r5 failed.

!!! Function src_compile, Line 405, Exitcode 1

!!! (no error message)

```

ich sehe mich schon neuinstallieren  :Sad: 

----------

## ian!

Och ne, Leute! Was empfehlt ihr denn da für Sachen?

Wie wäre es damit gewesen erstmal nach dem Fehler zu fragen? Sicherlich ist bei ihm nur der Update des GCC etwas auf die Nase gefallen, was sich normalerweise mit einigen wenigen Befehlen hätte beheben lassen können.

...

Zum Problem:

So wie es aussieht stimmen deine CFLAGS nicht so ganz. Ein i686-pc-linux-gnu hat in den CFLAGS nichts verloren.

----------

## Romses

Ian, ich danke dir...

Ich hatte tatsächlich ein 

```
i686-pc-linux-gnu
```

 in meinen CFLAGS...

nachdem ich das in pentium3 geändert habe, funktioniert wieder alles

Gruß Romses

----------

## moocha

Whoopschie  :Smile: 

----------

## NoiZe_DJ

Ich habe das gleiche Problem, nur ich habe nix an den CFLAGS geändert. Mit den Einstellungen funzte bis gestern ja auch alles noch. CC ist auch auf /usr/bin/gcc, also soweit so gut. Woran kann das nur liegen?

```
Calculating dependencies ...done!

>>> emerge (1 of 1) sys-devel/gcc-3.3.3-r3 to /

>>> md5 src_uri ;-) gcc-3.3.3.tar.bz2

>>> md5 src_uri ;-) gcc-3.3.3-patches-1.2.tar.bz2

>>> md5 src_uri ;-) gcc-3.3.3-branch-update-20040412.patch.bz2

>>> md5 src_uri ;-) protector-3.3-7.tar.gz

>>> md5 src_uri ;-) gcc-3.3.3-manpages.tar.bz2

>>> md5 src_uri ;-) gcc-3.3.3-v8.5.3-nodefault-pie-ssp.patch

>>> md5 src_uri ;-) gcc-3.3.3-v8.5.3-gcc-exclusion.patch

>>> Unpacking source...

>>> Unpacking gcc-3.3.3.tar.bz2 to /var/tmp/portage/gcc-3.3.3-r3/work

>>> Unpacking gcc-3.3.3-patches-1.2.tar.bz2 to /var/tmp/portage/gcc-3.3.3-r3/work

>>> Unpacking protector-3.3-7.tar.gz to /var/tmp/portage/gcc-3.3.3-r3/work

 * Patching ${S}/ltmain.sh...

 *   Applying portage-1.4.1.patch...

 *   Applying relink-1.4.0a-GCC3.0-2.patch...

 *   Applying sed-1.4.3.patch...

 *   Applying tmp-1.3.5.patch...

 * Applying gcc-3.3.3-branch-update-20040412.patch.bz2...                 [ ok ]

mv: Aufruf von stat für ,,/var/tmp/portage/gcc-3.3.3-r3/work/patch/41*" nicht möglich: Datei oder Verzeichnis nicht gefunden

 * Applying various patches (bugfixes/updates)...

 *   02_all_gcc33-ice-hack.patch.bz2...                                   [ ok ]

 *   15_all_gcc33-multi-os-directory.patch.bz2...                         [ ok ]

 *   16_all_gcc33-c99-double-inline.patch.bz2...                          [ ok ]

 *   17_all_gcc33-c99-numbers.patch.bz2...                                [ ok ]

 *   23_all_gcc33-c++-decl2.patch.bz2...                                  [ ok ]

 *   25_all_gcc33-libstdc++-pic.patch.bz2...                              [ ok ]

 *   26_all_gcc33-m68k-const.patch.bz2...                                 [ ok ]

 *   27_all_gcc33-m68k-java-build.patch.bz2...                            [ ok ]

 *   28_all_gcc33-m68k-loop.patch.bz2...                                  [ ok ]

 *   29_all_gcc33-m68k-subreg.patch.bz2...                                [ ok ]

 *   31_all_gcc331-pr495.patch.bz2...                                     [ ok ]

 *   32_all_gcc331-pr1823.patch.bz2...                                    [ ok ]

 *   34_all_gcc331-pr8967.patch.bz2...                                    [ ok ]

 *   35_all_gcc33-pr9929.patch.bz2...                                     [ ok ]

 *   40_all_gcc33-regmove-fix.patch.bz2...                                [ ok ]

 *   50_all_gcc33-coreutils-compat.patch.bz2...                           [ ok ]

 *   70_all_gcc33-47915-s390-june2003-stream.patch.bz2...                 [ ok ]

 * Done with patching

 * Applying gcc331-pp-fixup.patch...                                      [ ok ]

 * Applying gcc333-ssp-3.3_7-fixup.patch...                               [ ok ]

 * Applying protector.dif...                                              [ ok ]

 * Updating gcc to use SSP from glibc...

 * Applying gcc-3.3.3-v8.5.3-nodefault-pie-ssp.patch...                   [ ok ]

 * Applying gcc-3.3.3-v8.5.3-gcc-exclusion.patch...                       [ ok ]

 * Applying gcc333-gentoo-branding.patch...                               [ ok ]

>>> Source unpacked.

java

nls

 * CFLAGS=" -march=athlon-xp -O2"

 * CXXFLAGS=" -march=athlon-xp -O2"

 * GCJFLAGS=""

 * Configuring GCC...

*** This configuration is not supported in the following subdirectories:

     target-libf2c target-libffi target-boehm-gc target-zlib target-libjava zlib fastjar target-libobjc

    (Any other directories should still work fine.)

Created "Makefile" in /var/tmp/portage/gcc-3.3.3-r3/work/build using "mt-frag"

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: unrecognized option '--as-needed'

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: use the --help option for usage information

collect2: ld returned 1 exit status

*** The command '/usr/bin/gcc -o conftest  -march=athlon-xp -O2   conftest.c' failed.

*** You must set the environment variable CC to a working compiler.

!!! ERROR: sys-devel/gcc-3.3.3-r3 failed.

!!! Function src_compile, Line 496, Exitcode 1

!!! (no error message)

```

----------

## malachay

Hi,

habe das selbe Problem, das triitt wohl nur auf wenn der gcc updadet wurde, dann die binutils, dann die binutils wieder downgradet.

Hier ein Thread den ich gefunden habe

https://forums.gentoo.org/viewtopic.php?t=169906&highlight=binary

Edit:

P.S

Es hat gereicht ein "rescue-gcc" von http://dev.gentoo.org/~avenj/bins/ runterzuladen und mittels 

```
tar -xvjf packet.tbz2 -C /
```

 zu entpacken, dann wieder gcc emergen.

----------

