# New ATI drivers expect null ( "" ) kernel version

## revelashon

When merging ati-drivers-8.8.25, the procedure fails due to the following error: 

```

Error:

kernel includes at /usr/src/linux/include do not match current kernel.

they are versioned as "2.4.28-gentoo-r5"

instead of "".

you might need to adjust your symlinks:

- /usr/include

- /usr/src/linux

```

I'm curious about why my version should be "" as opposed to the real version.

----------

## Untouchable

Just check if "uname -r" returns the same version (2.4.28-gentoo-r5), and make /usr/src/linux point to the right place. 

It's probably only a problem in the message.

----------

## wedin8

I have this exact same problem. With the slight difference that I run "2.4.26-gentoo-r14"

My /usr/src/linux points to "2.4.26-gentoo-r14"

and "uname -r says "2.4.26-gentoo-r14"

What is the right place for it to point to?

I tried to point /usr/src/linux to a different directory with another version of kernel, but then it complained about not finding a valid config file.

I am really new to this and would be really greatful for aid. That said, I am not stopping research on my own.

----------

## mattjgalloway

I'm getting the exact same thing with 2.4.27.

```
mjg91 X11 # uname -r

2.4.27
```

```
mjg91 X11 # ACCEPT_KEYWORDS="~x86" emerge ati-drivers

Calculating dependencies ...done!

>>> emerge (1 of 1) media-video/ati-drivers-8.8.25 to /

>>> md5 src_uri ;-) fglrx_6_8_0-8.8.25-1.i386.rpm

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found sources for kernel version:

 *     2.4.27

 * Using KV_OBJ=o

 * X11 implementation is xorg-x11.

>>> Unpacking source...

>>> Unpacking fglrx_6_8_0-8.8.25-1.i386.rpm

>>> Source unpacked.

 * Building the DRM module...

ATI module generator V 2.0

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

initializing...

Error:

kernel includes at /usr/src/linux/include do not match current kernel.

they are versioned as "2.4.27"

instead of "".

you might need to adjust your symlinks:

- /usr/include

- /usr/src/linux
```

Anyone got a fix for this, it's annoying not having a fix :-S

----------

## mattjgalloway

Mmm I've been looking at the sources for the new drivers and in the make.log I see:

```
uname -a =Linux mjg91 2.4.27 #1 Thu Dec 2 19:29:16 GMT 2004 i686 AMD Athlon(tm) XP 2000+ Authent$uname -s =Linux

uname -m =i686

uname -r =

uname -v =#1 Thu Dec 2 19:29:16 GMT 2004
```

Check out that uname -r. It's not getting it correctly.

I looked inside make.sh and it has these lines to get the above strings:

```
uname_r=${KV_FULL}

uname_v=`uname -v`

uname_s=`uname -s`

uname_m=`uname -m`

uname_a=`uname -a`
```

What is the KV_FULL thing??

----------

## mattjgalloway

Ok this seems to fix it - DEV PLEASE SORT THIS ONE OUT!

Go to the ati-drivers-8.8.25.ebuild file in /usr/portage. Then search for this section:

```
                sed -e 's:`id -u`:0:' \

                        -e 's:`uname -r`:${KV_FULL}:' \

                        -i make.sh
```

And comment out the -e 's:`uname -r`:${KV_FULL}:' \ so it looks like:

```
                sed -e 's:`id -u`:0:' \

#                       -e 's:`uname -r`:${KV_FULL}:' \

                        -i make.sh
```

Mine is compiling now, so it looks good. But could a dev please sort out what's going on here, it's a bit annoying as when I emerge sync it's going to go back again surely?

----------

## revelashon

uname -r

```
2.4.28-gentoo-r5

```

uname -a

```
Linux shaolin 2.4.28-gentoo-r5 #5 Sun Jan 16 00:27:45 UTC 2005 i686 AMD Athlon(tm) XP 2800+ AuthenticAMD GNU/Linux

```

The symlinks are pointing to the right directory. If you read the error message you'll notice that the kernel version is detected fine. It's what it expects that is messed up. It expects "" (as in null, no kernel version). So I don't see the symlinks or my kernel as a problem.

EDIT: That post above was written while I was posting. Nice work around: if it wants a null kernel version give it to it. Now to figure out why the vernel version is null.

----------

## mattjgalloway

Mmm ok, but doing this doesn't actually seem to work :-S It just hangs on "Building DRM Module..."

----------

## wedin8

As posted a few times already this is an excerpt of what the original error looks like:

```
>>> Unpacking fglrx_6_8_0-8.8.25-1.i386.rpm

>>> Source unpacked.

 * Building the DRM module...

ATI module generator V 2.0

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

initializing...

Error:

kernel includes at /usr/src/linux/include do not match current kernel.

they are versioned as "2.4.26-gentoo-r14"

instead of "".

you might need to adjust your symlinks:

- /usr/include

- /usr/src/linux

```

I was really happy if it would be as easy to get around as just commenting out a line. So I did.

But now all it says is:

```
>>> Unpacking fglrx_6_8_0-8.8.25-1.i386.rpm

>>> Source unpacked.

 * Building the DRM module...

```

And there the cursor just blinks. top shows no effort at all given this task.

Edit: my post is a bit redundant due to the previous post ...

----------

## revelashon

I noticed that. Quick question: where is make.sh located? In the ebuild it before it runs make.sh is switched directories to - 

```
 cd ${WORKDIR}/lib/modules/fglrx/build_mod

```

 However, I thought ${WORKDIR} was ~ (home), which in this case would be /root. I'm most definitely wrong since all the ati ebuilds use this notation and this is the first one to fail. I really want to have a look at make.sh and any other file the ebuild needs to function.

----------

## revelashon

I got it.

Change this:

```
                sed -e 's:`id -u`:0:' \

                        -e 's:`uname -r`:${KV_FULL}:' \

                        -i make.sh

```

To this:

```
                sed -e 's:`id -u`:0:' \

                        -e 's:`uname -r`:${KV}:' \

                        -i make.sh

```

KV_FULL was changed to KV. I don't know what effect this will have on the drivers but I got this far:

```
 * To switch to ATI OpenGL, run "opengl-update ati"

 * To change your XF86Config you can use the bundled "fglrxconfig"

 * ***

 * If you are experiencing problems with memory allocation try to add

 * this line to in your X11 configuration file:

 *              Option "KernelModuleParm"  "agplock=0"

 * That should solve the hangups you could have with Neverwinter Nights

 * ***

>>> Regenerating /etc/ld.so.cache...

 * Caching service dependencies...

>>> media-video/ati-drivers-8.8.25 merged.

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.

```

I assume this is a good thing.   :Wink: 

----------

## Wedge_

File a bug report, that needs fixing.

----------

## wedin8

FYI

Now it worked for me and I am happy.

So, back to gnutls and libsoup problem.

Thanks loads!!

Wedin

----------

## revelashon

I reported the bug along with an outline of the fix. Moreover, I pleased to report that everything works as expected now. One last thing, if you are using xorg and used fglrxconfig to make XFreeConfig-4 (or whatever the filename is) then copied it to xorg.conf, X will not start. You must change the keyboard driver from "Keyboard" to "kbd". I ran into this problem. If you didn't touch your config files you should be fine.

EDIT: Bug #78870

----------

## mattjgalloway

Yes or just keyboard - i.e. lowercase K at the front.

So you can emerge ati-drivers-8.8.25 now?

EDIT: Ok I've done it with your fix - DEV please put this into the rsync tree!

----------

## Untouchable

Interesting... It seems everybody that faced this bug is running a 2.4 kernel. Why would it affect only 2.4?

----------

## Wedge_

It's because of the differences in building modules for 2.4 and 2.6 kernels. The make.sh script does the work for 2.4 kernels, but for 2.6 kernels it's simpler for the ebuild to call the module's makefile directly. If you take a look at the ebuild, you should see that the statement that was causing the problems is inside an if-statement like this: 

```
if using a 2.6 kernel

         do something

else

         do something else <-- problem was here

fi
```

So since most people here are running 2.6 kernels by now, it didn't affect them.

----------

## mattjgalloway

Nah the problem was it wasn't getting the kernel version properly. It was getting it as "" when it should have been "2.4.27" or something. This was because in the ebuild it had ${KV_FULL} instead of ${KV}

----------

## Wedge_

Yes, that was the actual problem, but Untouchable was asking why it only affected 2.4 kernel users...

----------

## Untouchable

Yes, it explains everything, thanks.

----------

