# Ati driver && fglrx module fail to compile

## ott0disk

Hi all,i finally landed here to solve out an issue i'm dealing with,i fail to compile the fglrx module with kernel-gentoo 2.6.34,i 'trying both with 'emerge ati-drivers' and running the script got from the ati's website,i attach the build log of emerge and the install log of fglrx-install and some other useful outputs:

 # cat /var/tmp/portage/x11-drivers/ati-drivers-10.4/temp/build.log 

 * CPV:  x11-drivers/ati-drivers-10.4

 * REPO: gentoo

 * USE:  elibc_glibc kernel_linux modules qt4 userland_GNU x86

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.34-gentoo/build

 * Found sources for kernel version:

 *     2.6.34-gentoo

 * 

 * Please note that this driver supports only graphic cards based on

 * r600 chipset and newer.

 * This represent the ATI Radeon HD series at this moment.

 * 

 * If your card is older then usage of x11-drivers/xf86-video-ati

 * as replacement is highly recommended. Rather than staying with

 * old versions of this driver.

 * For migration informations please reffer to:

 * http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml

 * 

>>> Unpacking source...

>>> Source unpacked in /var/tmp/portage/x11-drivers/ati-drivers-10.4/work

>>> Preparing source in /var/tmp/portage/x11-drivers/ati-drivers-10.4/work ...

 * Applying ati-drivers-2.6.33.patch ...                                  [ ok ]

 * Applying ati-drivers-fix_compilation-bug-297322.patch ...              [ ok ]

 * Applying ati-powermode-opt-path-2.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-10.4/work/extra

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/x11-drivers/ati-drivers-10.4/work ...

>>> Source configured.

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

 * Preparing fglrx module

make -j3 HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= GCC_VER_MAJ=4 KVER=2.6.34-gentoo KDIR=/usr/src/linux kmod_build 

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

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

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

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

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

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

In file included from /var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:451:

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/drm_proc.h: In function 'FGLDRM__vma_info':

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/drm_proc.h:497: warning: format '%08lx' expects type 'long unsigned int', but argument 5 has type 'phys_addr_t'

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

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

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

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_SetPageCache_Array':

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1324: warning: passing argument 1 of 'KCL_ConvertPageToKernelAddress' makes pointer from integer without a cast

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_MapPageToPfn':

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1625: warning: unused variable 'bus_addr'

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

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

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.c: In function 'KCL_WAIT_Add':

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.c:52: error: implicit declaration of function 'kmalloc'

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.c:52: warning: initialization makes pointer from integer without a cast

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.c: In function 'KCL_WAIT_Remove':

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.c:77: error: implicit declaration of function 'kfree'

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.c: In function 'KCL_WAIT_CreateObject':

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.c:94: warning: initialization makes pointer from integer without a cast

make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.o] Error 1

make[2]: *** Waiting for unfinished jobs....

make[1]: *** [_module_/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2

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

make: *** [kmod_build] Error 2

 * ERROR: x11-drivers/ati-drivers-10.4 failed:

 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS=  GCC_VER_MAJ=4 KVER=2.6.34-gentoo KDIR=/usr/src/linux kmod_build

 * 

 * Call stack:

 *     ebuild.sh, line   54:  Called src_compile

 *   environment, line 3651:  Called linux-mod_src_compile

 *   environment, line 2815:  Called die

 * The specific snippet of code:

 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" 						CROSS_COMPILE=${CHOST}- 						LDFLAGS=\"$(get_abi_LDFLAGS)\" 		${BUILD_FIXES} 						${BUILD_PARAMS} 				${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";

 * 

 * If you need support, post the output of 'emerge --info =x11-drivers/ati-drivers-10.4',

 * the complete build log and the output of 'emerge -pqv =x11-drivers/ati-drivers-10.4'.

 * The complete build log is located at '/var/tmp/portage/x11-drivers/ati-drivers-10.4/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-10.4/temp/environment'.

 * S: '/var/tmp/portage/x11-drivers/ati-drivers-10.4/work'

//

 # emerge --info

Portage 2.1.8.3 (default/linux/x86/10.0/desktop/kde, gcc-4.3.4, glibc-2.11.1-r0, 2.6.32.6 i686)

=================================================================

System uname: Linux-2.6.32.6-i686-AMD_Athlon-tm-X2_DualCore_QL-66-with-gentoo-2.0.1

Timestamp of tree: Thu, 20 May 2010 19:15:01 +0000

app-shells/bash:     4.1_p7

dev-lang/python:     2.6.5-r2

dev-util/cmake:      2.8.1-r1

sys-apps/baselayout: 2.0.1

sys-apps/openrc:     0.6.1-r1

sys-apps/sandbox:    2.2

sys-devel/autoconf:  2.65

sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.3.4, 4.4.3-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.33

ACCEPT_KEYWORDS="x86 ~x86"

ACCEPT_LICENSE="* @EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

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

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo 		http://gentoo.mirror.solnet.ch"

LANG="C"

LC_ALL="C"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

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

USE="3dnow X a52 aac acl acpi alsa bash-completition berkdb branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk hal iconv ipv6 jpeg kde lcms ldap libnotify mad matrox mikmod mng modules mp3 mp4 mpeg mplayer mudflap ncurses nls nptlonly ogg opengl openmp pam pango pcre pdf perl png ppds pppd python qt3support qt4 readline reflection sdl session spell spl ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis x264 x86 xcb xml xorg xulrunner xv xvid 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

//

# eix -e xorg-server

[I] x11-base/xorg-server

     Available versions:  1.6.5-r1 1.7.6 [m](~)1.7.7 [M](~)1.8.0 [M](~)1.8.1-r1 {debug dmx doc hal ipv6 kdrive minimal nptl sdl static-libs tslib +udev xorg}

     Installed versions:  1.7.6(17:09:41 05/24/10)(hal ipv6 sdl xorg -debug -dmx -kdrive -minimal -nptl -tslib)

     Homepage:            http://xorg.freedesktop.org/

     Description:         X.Org X servers

i got ACCEPT_KEYWORDS= ~x86  but  i installed 1.7.6 version of xorg (i put newer xorg's in packages.mask) because 10.4 version does not support xorg=>1.8.0,any help is really appreciated.

----------

## DONAHUE

I have run meld on your build log versus mine.

I think you need to emerge --sync;emerge ati-drivers preferably from a different mirror.

I have 

 *Quote:*   

> * Applying ati-drivers-2.6.33.patch ...
> 
>   [ ok ]
> 
>  * Applying ati-drivers-2.6.34.patch ...
> ...

 

where you have only:

 *Quote:*   

> * Applying ati-drivers-2.6.33.patch ... [ ok ] 
> 
> * Applying ati-drivers-fix_compilation-bug-297322.patch ... [ ok ] 

 

You, I, and your build log are using 2.6.34 kernels but your emerge --info thinks you are using 2.6.32-r6. This may be the problem source if a bum portage is not. My emerge --info agrees with me that we are on 2.6.34.

----------

## ott0disk

thanks for the reply it was useful but does not solve the problem at all,i did emerge-webrsync (my actual connetction does't allow rsync://) and it changed,now emerge applies the patch for 2.6.34 ,and it compile well the 'fglrx' but now it fails in compiling glxgears...i paste the build.log,emerge --info and some other,thanks in advance for all.

# cat /var/tmp/portage/x11-drivers/ati-drivers-10.4/temp/build.log 

 * CPV:  x11-drivers/ati-drivers-10.4

 * REPO: gentoo

 * USE:  elibc_glibc kernel_linux modules qt4 userland_GNU x86

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.34-gentoo/build

 * Found sources for kernel version:

 *     2.6.34-gentoo

 * 

 * Please note that this driver supports only graphic cards based on

 * r600 chipset and newer.

 * This represent the ATI Radeon HD series at this moment.

 * 

 * If your card is older then usage of x11-drivers/xf86-video-ati

 * as replacement is highly recommended. Rather than staying with

 * old versions of this driver.

 * For migration informations please reffer to:

 * http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml

 * 

>>> Unpacking source...

>>> Source unpacked in /var/tmp/portage/x11-drivers/ati-drivers-10.4/work

>>> Preparing source in /var/tmp/portage/x11-drivers/ati-drivers-10.4/work ...

 * Applying ati-drivers-2.6.33.patch ...                                                                                                      [ ok ]

 * Applying ati-drivers-2.6.34.patch ...                                                                                                      [ ok ]

 * Applying ati-drivers-fix_compilation-bug-297322.patch ...                                                                                  [ ok ]

 * Applying ati-powermode-opt-path-2.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-10.4/work/extra

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/x11-drivers/ati-drivers-10.4/work ...

>>> Source configured.

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

 * Preparing fglrx module

make -j3 HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= GCC_VER_MAJ=4 KVER=2.6.34-gentoo KDIR=/usr/src/linux kmod_build 

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

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

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

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

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

In file included from /var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:451:

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/drm_proc.h: In function 'FGLDRM__vma_info':

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/drm_proc.h:497: warning: format '%08lx' expects type 'long unsigned int', but argument 5 has type 'phys_addr_t'

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_SetPageCache_Array':

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1324: warning: passing argument 1 of 'KCL_ConvertPageToKernelAddress' makes pointer from integer without a cast

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_MapPageToPfn':

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1625: warning: unused variable 'bus_addr'

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

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

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

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

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

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

  LD [M]  /var/tmp/portage/x11-drivers/ati-drivers-10.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-10.4/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.mod.o

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

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

 * Building fgl_glxgears ...

In file included from fgl_glxgears.c:81:

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/usr/include/GL/glATI.h:3809:1: warning: "GL_ATI_texture_env_combine3" redefined

In file included from /usr/include/GL/gl.h:2091,

                 from /usr/include/GL/glu.h:38,

                 from fgl_glxgears.c:64:

/usr/include/GL/glext.h:8078:1: warning: this is the location of the previous definition

In file included from fgl_glxgears.c:81:

/var/tmp/portage/x11-drivers/ati-drivers-10.4/work/common/usr/include/GL/glATI.h:5321:1: warning: "GL_PROXY_TEXTURE_2D_MULTISAMPLE" redefined

In file included from /usr/include/GL/gl.h:2091,

                 from /usr/include/GL/glu.h:38,

                 from fgl_glxgears.c:64:

/usr/include/GL/glext.h:1661:1: warning: this is the location of the previous definition

/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: warning: libatiuki.so.1, needed by /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../libGL.so, not found (try using -rpath or -rpath-link)

/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../libGL.so: undefined reference to `ukiOpenOnce'

/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../libGL.so: undefined reference to `ukiGetVersion'

/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../libGL.so: undefined reference to `ukiFreeVersion'

/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../libGL.so: undefined reference to `ukiMap'

/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../libGL.so: undefined reference to `ukiCloseOnce'

/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../libGL.so: undefined reference to `ukiGetMagic'

collect2: ld returned 1 exit status

 * ERROR: x11-drivers/ati-drivers-10.4 failed:

 *   fgl_glxgears build failed

 * 

 * Call stack:

 *     ebuild.sh, line  54:  Called src_compile

 *   environment, line 3663:  Called die

 * The specific snippet of code:

 *       "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed";

 * 

 * If you need support, post the output of 'emerge --info =x11-drivers/ati-drivers-10.4',

 * the complete build log and the output of 'emerge -pqv =x11-drivers/ati-drivers-10.4'.

 * The complete build log is located at '/var/tmp/portage/x11-drivers/ati-drivers-10.4/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-10.4/temp/environment'.

 * S: '/var/tmp/portage/x11-drivers/ati-drivers-10.4/work'

it seems to be an opengl issue but:

# eix opengl

[I] app-admin/eselect-opengl

     Available versions:  1.1.1-r2

     Installed versions:  1.1.1-r2(09:41:14 05/21/10)

     Homepage:            http://www.gentoo.org/

     Description:         Utility to change the OpenGL interface being used

I] virtual/opengl

     Available versions:  7.0

     Installed versions:  7.0(10:04:37 05/21/10)

     Description:         Virtual for OpenGL implementation

and

# locate libGL

/usr/portage/x11-drivers/ati-drivers/files/libGL.la.in

/usr/portage/x11-drivers/nvidia-drivers/files/libGL.la-r2

/usr/portage/media-libs/mesa/files/lib/libGLU.la

/usr/portage/media-libs/mesa/files/lib/libGL.la

/usr/lib/libGLU.so

/usr/lib/libGLU.so.1

/usr/lib/opengl/xorg-x11/lib/libGL.so.1

/usr/lib/opengl/xorg-x11/lib/libGL.so.1.2

/usr/lib/libGL.so

/usr/lib/libGLU.so.1.3.070801

here the emerge infos:

# emerge --info

Portage 2.1.8.3 (default/linux/x86/10.0/desktop/kde, gcc-4.3.4, glibc-2.11.1-r0, 2.6.32.6 i686)

=================================================================

System uname: Linux-2.6.32.6-i686-AMD_Athlon-tm-X2_DualCore_QL-66-with-gentoo-2.0.1

Timestamp of tree: Tue, 25 May 2010 01:45:03 +0000

app-shells/bash:     4.1_p7

dev-lang/python:     2.6.5-r2

dev-util/cmake:      2.8.1-r1

sys-apps/baselayout: 2.0.1

sys-apps/openrc:     0.6.1-r1

sys-apps/sandbox:    2.2

sys-devel/autoconf:  2.65

sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.3.4, 4.4.3-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.33

ACCEPT_KEYWORDS="x86 ~x86"

ACCEPT_LICENSE="* @EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

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

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo 		http://gentoo.mirror.solnet.ch"

LANG="C"

LC_ALL="C"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

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

USE="3dnow X a52 aac acl acpi alsa bash-completition berkdb branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk hal iconv ipv6 jpeg kde lcms ldap libnotify mad matrox mikmod mng modules mp3 mp4 mpeg mplayer mudflap ncurses nls nptlonly ogg opengl openmp pam pango pcre pdf perl png ppds pppd python qt3support qt4 readline reflection sdl session spell spl ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis x264 x86 xcb xml xorg xulrunner xv xvid 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

----------

## DONAHUE

repeat the sync and 

```
emerge -D mesa mesa-progs;emerge -D ati-drivers
```

I would give serious consideration to 

```
emerge -De world
```

 It looks like your portage tree has problems.

```
zcat /proc/config.gz | grep -i "kernel version"

ls -l /usr/src | grep -i "linux ->"

eselect kernel list | grep -i "*"

uname -r

cat /proc/sys/kernel/version

```

In theory (my opinion, that is) all should yield 2.6.34

----------

