Click to See Complete Forum and Search --> : Another ATI Woe - Kernel Compile Error
Lizard
01-24-2004, 02:26 PM
HI
I have an ATI 9600xt on an NForce 2 mobo Xandros 2.0. AGPGART appears to be present and correct. FGLRXCONFIG has set the configuration. I am attempting to compile the kernel module as per the instructions at www.g-tec.co.at
and I get the follwing error:
linuxpoot:/lib/modules/fglrx/build_mod# ./make.sh
ATI module generator V 2.0
==========================
initializing...
Error:
kernel includes at /lib/modules/2.4.22-x1/build/include do not match current ker nel.
they are versioned as "2.4.22"
instead of "2.4.22-x1".
you might need to adjust your symlinks:
- /usr/include
- /usr/src/linux
I feel there is a simple answer to this but I'm at a loss to find it. Still fairly new to this but absolutely determined to leave Microsoft behind so your advice and guidance would be extremely welcome.
Many thanks
Icarus
01-24-2004, 05:31 PM
Double check your /usr/src/linux link. Looks like it might be pointing towards 2.4.22 instead of 2.4.22-x1
bwkaz
01-24-2004, 08:47 PM
uname -r is printing "2.4.22-x1", right?
The kernel module is using the /lib/modules/2.4.22-x1/build symlink to find the kernel sources (which makes me wonder why in the heck it's talking about /usr/src/linux...), and it's using that directory to find the kernel version.
The problem is, the top-level Makefile in that directory (the one that the build symlink points at) has a version of 2.4.22, not 2.4.22-x1. It's EXTRAVERSION variable was not set when include/linux/version.h got created. Did you run "make dep", then change EXTRAVERSION or apply a patch? If so, you need to probably "make clean", and definitely "make dep" again.
Lizard
01-25-2004, 02:27 AM
Thanks for the replies. I ran make clean and make dep in each dir just in case but no difference I'm afraid. After looking at both dir's I discovered the following:
#define UTS_RELEASE "2.4.22"
#define LINUX_VERSION_CODE 132118
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
from usr/src/linux/include/linux/version.h
#define UTS_RELEASE "2.4.19"
#define LINUX_VERSION_CODE 132115
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
from /usr/include/linux/version.h
I'm not sure what any of this really means. What I do know is that 2.4.22 is the kernel version I want not x1.
Again your advice would be much appreciated.
many thanks :confused:
nabis
01-25-2004, 03:36 AM
1 method:
see in the /boot directory if there is vmlinuz-2.3.22 and 2.3.22/ in /lib/modules. If yes, you could try to boot it (by adding it to lilo/grub boot menu). Search for lilo or grub configuration in this case.
2 method :
su
uname -r
as I understood it is 2.4.22-xi
ls -ld /usr/src/linux
it should point to /usr/src/linux-2.4.22, if not:
ln -sf /usr/src/linux-2.4.22 /usr/src/linux
cd /usr/src/linux
less .config
if there is no .config
cp /boot/config .
cat .config | grep -i agp
it should read CONFIG_AGP=m
if not, edit it manually (vim .config)
less Makefile
see that EXTRAVERSION = xi
same thing, edit it if not
make dep
after this try that make.sh, see what you get
if still you get the same error, do something dangerous:
cd /usr/include
mv /usr/include/linux /usr/include/linux.old
ln -s /usr/src/linux-2.4.22/include/linux /usr/include/linux
^this could screw up the system
try to compile the module now
3 method:
post the make.sh in the attachment, maybe someone could adjust it for you.
bwkaz
01-25-2004, 03:48 PM
Originally posted by nabis
after this try that make.sh, see what you get
if still you get the same error, do something dangerous:
cd /usr/include
mv /usr/include/linux /usr/include/linux.old
ln -s /usr/src/linux-2.4.22/include/linux /usr/include/linux
No, no, NO! :p
Don't EVER replace the contents of /usr/include/linux. Those are NOT your kernel headers, they're the headers of the kernel that your glibc was compiled against. If you change them, two things will happen. One, it won't affect the ATI drivers in the least (again, they're using /lib/modules/$(uname -r)/build/include, not /usr/include/linux, not /usr/src/linux/include, not ANY of those), and two, it'll break the next program that you try to compile that needs information about what glibc is capable of doing.
Your problem is that uname -r is printing 2.4.22-x1, but /lib/modules/2.4.22-x1/build/include/linux/version.h says 2.4.22. Those should ALWAYS match, unless something got screwed with that shouldn't have been screwed with... if you want to change what uname -r is printing, then you'll have to boot to a new kernel. If you want to change version.h, then you have to edit the top-level kernel Makefile (the one in /lib/modules/2.4.22-x1/build/), fix EXTRAVERSION so that it's -x1, and then rerun "make dep".