# ATI radeon (x700) drivers emerging failure.

## DMoL

Hello everybody.

 I have done all kernel configurations as described in 'ATI Radeon Gentoo FAQ' (as I think), but I can't compile stable ati-drivers. Here is the output:

emerge ati-drivers

Calculating dependencies ...done!

>>> emerge (1 of 1) x11-drivers/ati-drivers-8.18.8-r2 to /

....

/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.c: In function `_

_ke_no_iommu':

/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.c:2078: error: `n

o_iommu' undeclared (first use in this function)

/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.c:2078: error: (E

ach undeclared identifier is reported only once

/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.c:2078: error: fo

r each function it appears in.)

/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.c: In function `r

egister_ioctl32_conversion':

/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.c:2241: warning:

ISO C90 forbids mixed declarations and code

/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.c: In function `d

o_vm_kmap_nopage':

/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.c:2537: warning:

assignment makes pointer from integer without a cast

/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.c: In function `r

egister_ioctl32_conversion':

/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.c:2240: warning:

statement with no effect

make[1]: *** [/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod/firegl_public.o]

Error 1

make: *** [_module_/var/tmp/portage/ati-drivers-8.18.8-r2/work/common/lib/modules/fglrx/build_mod] Error 2

make: Leaving directory `/usr/src/linux-2.6.16-gentoo-r9'

 * DRM module not built

>>> Test phase [not enabled]: x11-drivers/ati-drivers-8.18.8-r2

>>> Install ati-drivers-8.18.8-r2 into /var/tmp/portage/ati-drivers-8.18.8-r2/image/ category x11-drivers

 * Installing fglrx module

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

!!! ERROR: x11-drivers/ati-drivers-8.18.8-r2 failed.

!!! Function linux-mod_src_install, Line 544, Exitcode 1

!!! doins fglrx.ko failed

!!! If you need support, post the topmost build error, NOT this status message.

What should I do?

Thanks for help.

----------

## alienjon

The kernel didn't make the .ko file, it looks like. Did you select the correct motherboard chipset for agpGart? (and were there any comilation problems?)

----------

## DMoL

 *alienjon wrote:*   

> The kernel didn't make the .ko file, it looks like. Did you select the correct motherboard chipset for agpGart? (and were there any comilation problems?)

 

I am amd-64 user - agpgart is include implicitly.  And I do not see my chipset in list (nVidia nForce4)... ?

----------

## alienjon

Do you have /dev/agpgard enabled then (or as a module?) I'm not an amd64 user (... yet  :Smile:  ) but I believe that the error means that the drivers cannot find a file that the kernel is supposed to build, hence I had mentioned it.

----------

## DMoL

 *alienjon wrote:*   

> Do you have /dev/agpgard enabled then (or as a module?) I'm not an amd64 user (... yet  ) but I believe that the error means that the drivers cannot find a file that the kernel is supposed to build, hence I had mentioned it.

 

Ok, look at this "screenshoot" of my configuration:

  │ │ [ ] Non-standard serial port support

  │ │     Serial drivers  ---> 

  │ │ [*] Legacy (BSD) PTY support                                           

  │ │ (256) Maximum number of legacy PTY in use

  │ │     IPMI  ---> 

  │ │     Watchdog Cards  ---> 

  │ │ <*> Intel/AMD/VIA HW Random Number Generator support

  │ │ <*> /dev/nvram support 

  │ │ <*> Enhanced Real Time Clock Support   

  │ │ < > Double Talk PC internal speech card support 

  │ │ < > Siemens R3964 line discipline 

  │ │ < > Applicom intelligent fieldbus card support

  │ │     Ftape, the floppy tape device driver  --->  

  │ │ --- /dev/agpgart (AGP Support) 

  │ │ < >   Intel 440LX/BX/GX, I8xx and E7x05 chipset support 

  │ │ < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) 

  │ │ < > ACP Modem (Mwave) support

  │ │ < > RAW driver (/dev/raw/rawN) (OBSOLETE)  

  │ │ [*] HPET - High Precision Event Timer

  │ │ [*]   Allow mmap of HPET       

  │ │ < > Hangcheck timer

  │ │     TPM devices  --->    

  │ │ < > Telecom clock driver for MPBL0010 ATCA SBC  

And, please note, that I have PCIe-video card. I don't know, where I can select my chipset... From FAQ:

NOTE 2: if you have a PCIe card, the AGP settings should be irrelevant. If you encounter problems, make sure you're using a recent kernel and the latest driver version. Some people have also reported that they had to enable AGP for their PCIe cards to work.

...

If you're running a 64-bit kernel, then the /dev/agpgart support and AMD Opteron/Athlon64 on-CPU GART support will usually be enabled automatically. Again, if you don't have an AGP card, it should be safe to disable these options.

----------

## ZmjbS

Sorry to butt in here guys, but I'm having the same problem. The odd thing is that I don't think I've changed my settings recently and this is the first time 'ati-drivers' has failed to compile. I'm running an x86 machine and chose the driver to be loaded as a module.

 *alienjon wrote:*   

> The kernel didn't make the .ko file, it looks like. Did you select the correct motherboard chipset for agpGart? (and were there any comilation problems?)

 

Thanks for your help here, alienjon.

I have the ATI Mobility RADEON M6C-16h.

```

  Location:

     -> Device Drivers

       -> Character devices

          <M> /dev/agpgart (AGP Support)

          < >   ALI chipset support

          <M>   ATI chipset support

          < >   AMD Irongate, 761, and 762 chipset support

          < >   AMD Opteron/Athlon64 on-CPU GART support

          <M>   Intel 440LX/BX/GX, I8xx and E7x05 chipset support

  Location:

    -> Device Drivers

      -> Graphics support

        -> Support for frame buffer devices (FB [=m])

          <M>   ATI Radeon display support

          [*]     DDC/I2C for ATI Radeon support

          [*]     Lots of debug output from Radeon driver
```

The way I understood it, fglrx is the ATI Radeon driver, right? However, when I run 'make modules_install' after compiling the kernel, it doesn't get installed:

```

  INSTALL drivers/block/pktcdvd.ko

  INSTALL drivers/char/agp/agpgart.ko

  INSTALL drivers/char/agp/ati-agp.ko

  INSTALL drivers/char/agp/intel-agp.ko

  INSTALL drivers/i2c/busses/i2c-i801.ko
```

I can't see what I'm missing here...

Any pointers?

----------

## glassbear

I had the same compilation error emerging the "stable" version, 8.21.7-r1, of the ati-drivers on my machine (x86, Radeon X600).  Unmasking the "unstable" branch (8.26.18-r1) solved the problem -- the drivers compiled successfully and the aticonfig command generated a working xorg.conf file for me.   :Very Happy: 

```
echo "x11-drivers/ati-drivers ~x86" >>/etc/portage/package.keywords
```

----------

## ZmjbS

 *glassbear wrote:*   

> Unmasking the "unstable" branch (8.26.18-r1) solved the problem

 

Confirmed.

```
>>> /lib/modules/2.6.17-ck1/video/fglrx.ko
```

I guess the driver is now in the ati-drivers package...

----------

## alienjon

DMoL: I'm currently at work right now (non-gentoo environment) so I'm going off of memory for right now, but the following seems a little weird to me:

```

 │ │ --- /dev/agpgart (AGP Support)

```

I remember that in my kernel I had the option to build in agpgart (or add it as a module, I believe), but this doesn't look like you have either option. What sources are you using? (Not even seeing the nforce / nforce 2 support seems weird as that is something else I remember seeing.) I'll try to remember to double check this when I get back in front of my gentoo environment later.

ZmjbS & glassbear: I think that the reason that the module did not come up was because you hadn't run a 'make clean' before trying to re-compile the modules. If make determines that the files are the same size, I think it avoids re-doing much of the compiling in order to save time (since it thinks that nothing has changed) Which is why updating to new "unstable" drivers fixed the problem, because there was now new code (different md5 sum or something like that, I think) Needless to say, if you have the problem again try a 'make clean' in the linux kernel source directory (mine is /usr/src/linux)

----------

