# problem compiling ati-drivers [SOLVED]

## machinelou

SOLVED:  The problem was that I had two Modules sections in xorg.conf! DOH!

Doh!  What should I do?

```
>>> Emerging (1 of 1) x11-drivers/ati-drivers-8.27.10-r1 to /

 * ati-driver-installer-8.27.10-x86_64.run MD5 ;-) ...                                       [ ok ]

 * ati-driver-installer-8.27.10-x86_64.run RMD160 ;-) ...                                    [ ok ]

 * ati-driver-installer-8.27.10-x86_64.run SHA1 ;-) ...                                      [ ok ]

 * ati-driver-installer-8.27.10-x86_64.run SHA256 ;-) ...                                    [ ok ]

 * ati-driver-installer-8.27.10-x86_64.run size ;-) ...                                      [ ok ]

 * checking ebuild checksums ;-) ...                                                         [ ok ]

 * checking auxfile checksums ;-) ...                                                        [ ok ]

 * checking miscfile checksums ;-) ...                                                       [ ok ]

 * checking ati-driver-installer-8.27.10-x86_64.run ;-) ...                                  [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.18.3/build

 * Found sources for kernel version:

 *     2.6.18.3

 * Checking for MTRR support enabled ...                                                     [ ok ]

 * Checking for AGP support enabled ...                                                      [ ok ]

 * Checking for DRM support disabled ...                                                     [ ok ]

 * X11 implementation is xorg-x11.

>>> Unpacking source...

 * Unpacking Ati drivers ...                                                                 [ ok ]

 * Applying ati-powermode.sh.patch ...                                                       [ ok ]

>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/ati-drivers-8.27.10-r1 ...

 * Building the DRM module...

make: Entering directory `/usr/src/vanilla-2.6.18.3-suspend2'

  CC [M]  /var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_pu

blic.o

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:233

: error: 'UTS_RELEASE' undeclared here (not in a function)

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c: In

 function 'firegl_stub_open':

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:559

: warning: assignment discards qualifiers from pointer target type

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c: In

 function 'firegl_put_user_ptr':

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:131

9: warning: cast from pointer to integer of different size

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:131

9: warning: cast from pointer to integer of different size

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:131

9: warning: cast from pointer to integer of different size

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:131

9: warning: cast from pointer to integer of different size

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c: In

 function '__ke_unregister_ioctl32_conversion':

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:249

9: warning: 'return' with a value, in function returning void

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c: In

 function '__ke_vm_map':

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:315

9: error: 'VM_SHM' undeclared (first use in this function)

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:315

9: error: (Each undeclared identifier is reported only once

/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:315

9: error: for each function it appears in.)

make[1]: *** [/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod/fireg

l_public.o] Error 1

make: *** [_module_/var/tmp/portage/ati-drivers-8.27.10-r1/work/common/lib/modules/fglrx/build_mod]

 Error 2

make: Leaving directory `/usr/src/vanilla-2.6.18.3-suspend2'

 * DRM module not built

>>> Source compiled.

>>> Test phase [not enabled]: x11-drivers/ati-drivers-8.27.10-r1

>>> Install ati-drivers-8.27.10-r1 into /var/tmp/portage/ati-drivers-8.27.10-r1/image/ category x11

-drivers

 * Installing fglrx module

install: cannot stat `fglrx.ko': No such file or directory

!!! ERROR: x11-drivers/ati-drivers-8.27.10-r1 failed.

Call stack:

  ebuild.sh, line 1546:   Called dyn_install

  ebuild.sh, line 1020:   Called src_install

  ati-drivers-8.27.10-r1.ebuild, line 205:   Called linux-mod_src_install

  linux-mod.eclass, line 540:   Called die

!!! doins fglrx.ko failed

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

localhost Download # 
```

Last edited by machinelou on Sat Jan 20, 2007 12:56 am; edited 2 times in total

----------

## Roman_Gruber

i would suggest to use the newest one, i use the latest one.

You have to unmask them.

----------

## machinelou

Ok. I'm stuck.  I can't get the ati-drivers to work.  I'm trying to follow the guides but for the past week I haven't been able to get glxinfo to report anything other than errors:

```
name of display: :0.0

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Error: couldn't find RGB GLX visual

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav

 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat

----------------------------------------------------------------------

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

0x21 24 tc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

0x22 24 dc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None

vision@localhost ~ $ 

```

I've got the fglrx driver to load and I ran ati-config on my xorg.conf but I still can't figure this out. None of the guides I've found cover this problem.  Please help

I also tried following this thread to no avail: https://forums.gentoo.org/viewtopic-t-527268-highlight-extension+glx+missing.html

----------

## Roman_Gruber

glx is in the xeffects overlay

use layman, but glx is not supported by gentoo!!

----------

## kraix

open up your xorg.conf file and find the line that says LOAD  " GLX" and remove the # from in front of it.

Do the same with the line two lines lower, it should be LOAD "DRI"

----------

## machinelou

 *kraix wrote:*   

> open up your xorg.conf file and find the line that says LOAD  " GLX" and remove the # from in front of it.
> 
> Do the same with the line two lines lower, it should be LOAD "DRI"

 

If only it were so simple.  Here's that section from my xorg.conf:

```
Section "Module"

        SubSection "extmod"

                Option      "omit xfree86-dga"   # don't initialise the DGA ext$

        EndSubSection

        Load  "freetype"

        Load  "dbe"     # Double buffer extension

        Load  "glx"

        Load  "dri"

        Load  "drm"

EndSection

```

----------

## Roman_Gruber

You could also try to use the open source drivers, if the closed source does not work for you.

Also you can use vesa!

Your make.conf must look something like this, otherwise it would not function.

```
notebook roman # cat /etc/make.conf

# These settings were set by the catalyst build script that automatically built this stage

# Please consult /etc/make.conf.example for a more detailed example

CHOST="x86_64-pc-linux-gnu"

# Fuer einen Turion 64 Bit; http://gentoo-wiki.com/Safe_Cflags#Opteron.2FAthlon64_.28AMD.29

CFLAGS="-march=athlon64 -O2 -pipe -msse2 -msse3 -fomit-frame-pointer"

CXXFLAGS="${CFLAGS}"

#NEU

MAKEOPTS="-j2"

USE="3dnow 3dnowext 7zip a52 aac aalib ace acpi aiglx amd amr apm ares asf

     audiofile bash-completion bidi bindist binfilter bittorrent bl boost

     bzip2 calendar caps cdparanoia cdrom chardet connectionstatus

     cpudetection css curl cyrus daap de_tvtoday dga dhcp divx dnotify dts

     dvdread emacs enca evo exif extrafilters fame fat fbcon ffmpeg flac flood

     ftp fuse gaim gcc64 gd ggi gimp glitz glut gmail gnome-print gnutls gs

     gtkhtml gzip h323 hdaps hddtemp howl-compat html http ibam id3 idea

     imagemagick imap imlib jack jack-tmpfs java javascript jpeg2k lcd libcaca

     libgda libnotify libwww lite live logrotate lzo maildir matroska

     maya-shaderlibrary mbox md5sum memlimit metalink mime mng mod mods

     moznocompose moznoirc moznomail moznopango moznoroaming mp4 mp4live mpeg2

     mplayer mule musepack musicbrainz mythtv nautilus neXt network new-login

     nntp no-htdocs no-old-linux nodrm noqmax ntfs openal osc pcmcia pdf

     physfs pmu pop portaudio qmail rar realmedia recode sasl sdl-sound

     sndfile sockets speex subtitles svg tcl tga theora thunar-vfs tiff

     timidity tk toolbar transcode tv_check tv_pick_cgi usb utempter v4l2 vcd

     vlm widescreen wifi wireshark wma wmf wmp wxwindows x264 xanim xatrix

     xext xforms xine xinerama xmlreader xmlwriter xosd xpm xterm xvid xvmc

     xvnc yaepg yv12 zip zvbi -arts -berkdb -bitmap-fonts -cli -dlloader

     -emboss -encode -gdbm -ipv6 -isdnlog -kde -nls -sdl -spell -spl -tcpd

     -truetype -truetype-fonts"

#VIDEO_CARDS="radeon"

#da ich ja die closed source ATI driver verwende, muss ich das leer machen, sonst wird alles reingenommen

VIDEO_CARDS="fglrx"

#aiglx spielwiese

#VIDEO_CARDS="ati"

#ALSA_CARDS="atiixp atiixp-modem"

#fuer die Sprachen im openoffice und acrobat reader

#falls man nicht setzt fehlen die Sprachen wird nichts installiert

#LINGUAS="de en_GB en" 

LINGUAS="en en_GB"

#neu, laedt bei emerge command alles parallel herunter im hintergrund

FEATURES="parallel-fetch"

#English is the best

LANG="en_GB en"

#layman portage overlay, according to http://wiki.gentoo-xeffects.org/Overlay

PORTDIR_OVERLAY="/usr/local/layman/xeffects"

#source /usr/portage/local/layman/make.conf

#according to i set my ALSA CARDS

#http://www.alsa-project.org/alsa-doc/index.php?vendor=vendor-ATI#matrix

#http://gentoo-wiki.com/HOWTO_ALSA_sound_mixer_aka_dmix

ALSA_CARDS="atiixp atiixp-modem"

notebook roman # 

notebook roman # 

```

----------

## machinelou

I thought the open source drivers didn't allow for 3d acceleration?  Does vesa?

----------

## kraix

It does depend on the card. Anything less than the radeon 9250 gets direct rendering from the r200 radeon driver, the non experimental one. The experimental ones can get through all the way up to the x850. The second set is an experimental driver so watch out, it might not work.

check here.

Note: I checked the driver page of the radeon driver, so if you wish to disagree with this, check there 

As to vesa, No it doesn't for the most case.

----------

## machinelou

I can't get DRI to work with either the closed or open source drivers.  The opensource drivers result in a single line in dmesg about DRM being initialized but it doesn't mention the card.  The closed source drivers don't produce any drm output in dmesg.

----------

## Roman_Gruber

May you post emerge --info, please

----------

## machinelou

```
Portage 2.1.1-r2 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.19-suspend2-r1 x86_64)

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

System uname: 2.6.19-suspend2-r1 x86_64 AMD Turion(tm) 64 Mobile Technology ML-34

Gentoo Base System version 1.12.6

Last Sync: Wed, 10 Jan 2007 22:31:01 +0000

app-admin/eselect-compiler: [Not Present]

dev-java/java-config: 1.3.7, 2.0.30

dev-lang/python:     2.4.3-r4

dev-python/pycrypto: 2.0.1-r5

dev-util/ccache:     [Not Present]

dev-util/confcache:  [Not Present]

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.61

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.14

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.11-r2

ACCEPT_KEYWORDS="amd64"

AUTOCLEAN="yes"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=athlon64 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"

CXXFLAGS="-march=athlon64 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"

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

MAKEOPTS=""

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'"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/xeffects"

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

USE="X a52 aac acpi aim alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol amd64 arts avi berkdb bitmap-fonts bluetooth cairo cdr cli cracklib crypt cups dbus dlloader dri dvd dvdr eds elibc_glibc emboss encode esd fam firefox fortran gdbm gif gpm gstreamer gtk gtk2 hal iconv input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog jpeg kde kernel_linux ldap libg++ mad mikmod mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre pdflib perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_fglrx video_cards_radeon vorbis wmf xml xorg xosd xpm xv zlib"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

```

----------

## xeinsane

What card do you have? 

Did unmasking the latest drivers help?

If you have an older card, [s]it seems you might be out of luck[/s].  Although someone mentioned applying a kernel patch from the 8.28.8 ati-drivers to fix the issue, I'm not sure how to do this myself without emerging the newer drivers, let alone applying the patch with genkernel once extracted.

I'm having the same initial error, since I'm using the 8.27.10-r1 ati-drivers, unfortunately, since I have a radeon 8500 the newer drivers don't support me,

[s]so I'm stuck. Time to try the open source drivers.[/s]

EDIT:  My problem is solved here.  (Running old ati-drivers on newer kernels.)

https://forums.gentoo.org/viewtopic-t-527397.html

----------

## machinelou

It's a radeon xpress 200m 5955.  I found a bug report or post somewhere where someone with the same card got it working by using an older driver.  However, when I try to emerge the older driver, the emerge fails similar to the first post in this thread. I've tried the open source drivers and essentially run into the same problem: glxinfo reports the same error and I can't get DRI loaded.  You say I might be out of luck if I have an older card.  Does that mean I'm in luck if I have a newer card?  I'll check out your thread...

Ahh, I see that thread has some discussion on compiling older versions of the ati driver.  I'll try it out. ty

----------

