Gentoo Archives: gentoo-amd64

From: Jason <gentoo@××××××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] emerge --newuse world error
Date: Tue, 31 Oct 2006 16:26:00
Message-Id: 45477849.2010407@lakedaemon.net
In Reply to: Re: [gentoo-amd64] emerge --newuse world error by Daniel Iliev
1 Daniel Iliev wrote:
2 > Sean wrote:
3 >> Mathieu Seigneurin wrote:
4 >>> On Tuesday 31 October 2006 16:23, Daniel Iliev wrote:
5 >>>> Sean wrote:
6 >>>>> Thanks, forgot the -C is clean or remove.
7 >>>>> Followed your steps and on the modprobe line received the following
8 >>>>> 'FATAL: Error inserting nvidia
9 >>>>> (/lib/modules/2.6.16-gentoo-r9/video/nvidia.ko): Invalid module
10 >>>>> format'
11 >>>> That is not supposed to happen. ;-(
12 >>>> Did you get any errors from "emerge nvidia-drivers"?
13 >>>>
14 >>>> Please, re-emege nvidia-drivers again and watch its output. I
15 >>>> suppose it
16 >>>> should say something about your "kernel tree/sources".
17 >>>>
18 >>>> --
19 >>>> Best regards,
20 >>>> Daniel
21 >>> Also look at what dmesg says - you probably have more details about the
22 >>> error there.
23 >>> And make sure you emerge nvidia-drivers with the same version of GCC as
24 >>> you used to build your active kernel.
25 >>>
26 >>> Regards,
27 >>> Mat
28 >> I already had looked at dmesg. Since upgrading gcc many, if not all my
29 >> modules are now having problems. I wanted to try to get X working
30 >> first, then the others.
31 >
32 > I would say that upgrading gcc and the problems with your kernel modules
33 > are not related but if you have such problems, you have to rebuild the
34 > kernel no matter the reason.
35 >
36
37 The above is wrong.
38
39 The kernel (and modules) record what version of GCC they were compiled
40 with. This version is checked at module load. If the kernel's GCC
41 version doesn't match the modules GCC version, the module loading fails.
42 This only becomes an issue with modules that are compiled outside of
43 the kernel tree [1].
44
45 To fix this you have two options. either switch out which version of
46 gcc you are using and recompile modules that are maintained outside of
47 the tree, or recompile your kernel with the current version of gcc.
48
49 First though, you need info:
50
51 # modinfo <modname> | grep vermagic
52
53 # cat /proc/version
54
55 # gcc-config -l
56
57 I would recommend recompiling the kernel, but it's up to you.
58
59 hth,
60
61 Jason
62
63 [1] - The caveat being when the GCC version has changed after the kernel
64 tree was already compiled and installed, and you are recompiling the
65 kernel tree for one module, without cleaning the tree.
66 --
67 gentoo-amd64@g.o mailing list