# [Risolto]Ati-drivers e gcc

## Sephirot

Salve, dopo aver installato xorg-7.2 su un portatile con scheda video radeon sto cercando di installare i driver ati, ma quando do' emerge -pv ati-drivers trovo tra le dipendenze anche una vecchia versione di gcc: [ebuild  NS   ] sys-devel/gcc-3.3.6-r1.

E' cosi' necessaria visto che io sul mio sistema ho gia' gcc-4.1.2? Tra l'altro quando prova a emergere gcc-3.3.6 ho anche questo errore di compilazione:

```

cc1: error: bad value (pentium-m) for -march= switch

cc1: error: bad value (pentium-m) for -mcpu= switch

make[2]: *** [gengenrtl.o] Error 1

make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-3.3.6-r1/work/build/gcc'

make[1]: *** [stage2_build] Error 2

make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-3.3.6-r1/work/build/gcc'

make: *** [bootstrap-lean] Error 2

!!! ERROR: sys-devel/gcc-3.3.6-r1 failed.

Call stack:

ebuild.sh, line 1638:   Called dyn_compile

ebuild.sh, line 985:   Called qa_call 'src_compile'

ebuild.sh, line 44:   Called src_compile

ebuild.sh, line 1328:   Called toolchain_src_compile

toolchain.eclass, line 26:   Called gcc_src_compile

toolchain.eclass, line 1546:   Called gcc_do_make

toolchain.eclass, line 1420:   Called die

!!! emake failed with bootstrap-lean

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/tmp/portage/sys-devel/gcc-3.3.6-r1/temp/build.log'.

```

Succede anche se provo a installare i driver instabili.

Queste sono altre info sul mio sistema:

```
sephi@cognac-cluster ~ $ vi errore-ati

sys-devel/automake:  1.6.3, 1.7.9-r1, 1.10

sys-devel/binutils:  2.17

sys-devel/gcc-config: 1.3.16

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.21

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-march=pentium-m -O2 -fomit-frame-pointer -pipe -mfpmath=sse -mmmx -msse -msse2 -fforce-addr  -fprefetch-loop-arrays"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb"

CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo"

CXXFLAGS="-march=pentium-m -O2 -fomit-frame-pointer -pipe -mfpmath=sse -mmmx -msse -msse2 -fforce-addr  -fprefetch-loop-arrays"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LINGUAS="it"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X acpi alsa apm bash-completion bitmap-fonts cli cracklib dri dvd dvdr eds emboss encode foomaticdb gdbm gif gpm gstreamer

gtk gtk2 iconv imlib isdnlog jpeg libwww mad midi mikmod mmx mmx2 motif mp3 mpeg mudflap ogg opengl openmp oss pam pcre perl png pppd python qt3 qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl tcpd truetype truetype-fonts type1-fonts vorbis x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk

hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="radeon"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

Thanks!

----------

## Tigerwalk

ciao,

se provi a mascherare le sys-devel/gcc-3.3.6-r1?

----------

## djinnZ

emerge -1 sys-libs/libstdc++-v3 ; revdep-rebuild

dimenticavo: l'errore è perchè il gcc 3.x non supporta -march=pentium-m cambiala in pentium2 o che altro se proprio vuoi installarlo (ma non ti serve)

----------

## Sephirot

grazie djinnZ! risolto!

ora però ho un problema con i driver ati:

```
 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found sources for kernel version:

 *     2.6.22-gentoo-r5-sephi

>>> Unpacking source...

 * Applying ati-powermode-opt-path.patch ...                                                                              [ ok ] * Converting 2.6.x/Makefile to use M= instead of SUBDIRS= ...                                                            [ ok ]>>> Unpacking ./../common/usr/src/ati/fglrx_sample_source.tgz to /var/tmp/portage/x11-drivers/ati-drivers-8.40.4/work/extra

 * Applying ati-drivers-8.40.4-warnings.patch ...                                                                         [ ok ]>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/x11-drivers/ati-drivers-8.40.4/work ...

 * Preparing fglrx module

make -C /usr/src/linux M=/var/tmp/portage/x11-drivers/ati-drivers-8.40.4/work/common/lib/modules/fglrx/build_mod/2.6.x modules

make[1]: Entering directory `/usr/src/linux-2.6.22-gentoo-r5'

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.40.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o

/var/tmp/portage/x11-drivers/ati-drivers-8.40.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:484: warning: 'firegl_smp_func_parameter_wrap' defined but not used

  LD [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.40.4/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.o

  Building modules, stage 2.

  MODPOST 1 modules

  CC      /var/tmp/portage/x11-drivers/ati-drivers-8.40.4/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.mod.o

  LD [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.40.4/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko

make[1]: Leaving directory `/usr/src/linux-2.6.22-gentoo-r5'

 * Building fgl_glxgears

/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lGL

collect2: ld returned 1 exit status

!!! ERROR: x11-drivers/ati-drivers-8.40.4 failed.

Call stack:

  ebuild.sh, line 1638:   Called dyn_compile

  ebuild.sh, line 985:   Called qa_call 'src_compile'

  ebuild.sh, line 44:   Called src_compile

  ati-drivers-8.40.4.ebuild, line 189:   Called die

!!! fgl_glxgears build failed

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.40.4/temp/build.log'.

```

ho fatto un ricerca sul forum è sembra molto "gettonato" come problema, sto provando con i drivers instabili ma niente da fare, eppure ho seguito esattamente le varie guide... ma non riesce a creare sto modulo fgl_glxgears...

----------

## djinnZ

```
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lGL
```

cerca libGL probabile che sia un banale errore di path (bug?)

prova anche a togliere "-mfpmath=sse -mmmx -msse -msse2" e soprattutto "-fforce-addr  -fprefetch-loop-arrays"

----------

## Sephirot

Infatti: libGL viene da mesa (media-libs/mesa) mi è bastato ri-emergere questo pacchetto e la compilazione dei drivers è andata a buon fine. 

Grazie per il supporto!

----------

