[PlanetCCRMA] gcc version problem

Fernando Lopez-Lezcano nando@ccrma.Stanford.EDU
Wed Nov 24 10:47:17 2004


On Wed, 2004-11-24 at 07:55, Bill Clark wrote:
> Hi, firstly thanks for providing such a great
> resource, I wonder if anyone could help me? I'm trying
> to learn the environment with a view to eventually
> attempting to get my Roland U-8 working with Ardour
> (once you have used a hardware controller you never
> want to stop!), to this end I've just started working
> through Rubini & Corbett "Linux Device Drivers" and
> have hit the following while trying to insmod the
> first "hello world" example:
> 
> [root@localhost bilbo]# gcc -c ./hello.c
> [root@localhost bilbo]# /sbin/insmod ./hello.o
> ./hello.o: kernel-module version mismatch
>         ./hello.o was compiled for kernel version
> 2.4.20
>         while this kernel is version
> 2.4.26-1.ll.rhfc1.ccrma.
> [root@localhost bilbo]#
> 
> There is obviously something I need to do to get the
> gcc version to match the kernel, can someone point me
> in the right direction?? Many Thanks... btw the same
> thing happens on suse 8.2 also 

It does not look like a gcc compatibility problem. Most probably you
don't have the proper kernel sources installed. For the 2.4.x kernel
series you have to install the kernel-sources package that matches the
kernel you want to compile for. "apt-get install kernel-sources" will
give you what's available, choose the one that matches "uname -r" and
install it. Make sure you are indeed using the proper tree for the
includes. 

-- Fernando