Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Weird version magic after gcc upgrade [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jrgns
n00b
n00b


Joined: 15 Feb 2005
Posts: 28
Location: Johannesburg, SA

PostPosted: Tue Oct 17, 2006 5:56 pm    Post subject: Weird version magic after gcc upgrade [SOLVED] Reply with quote

Hey...

I inadvertantly upgraded my gcc to 4.1, and now have trouble installing some modules (alsa-driver and a custom module (ibdrivers)).

I followed the gcc upgrade guide, upto the emerge -eav system part, seeing that the ibdrivers module i'm trying to install is needed for my inet connection...

After that I recompiled both my kernel, and all of the modules, but when I try to insert any of the modules, I get an error in dmesg telling me that the version magic is wrong, gcc3 was used instead of gcc4.

A few questions.
1. Any quick fixes for this?
2. How can I determine with what compiler version the kernel and modules were compiled?
3. It seems that make (for the custom kernel) still uses the old gcc, altough I used gcc-config to use gcc4. How can I ensure that make uses gcc 4? (I added a gcc -v command to the Makefile for the custom module, and it uses gcc3?)

I don't have any specific output or error messages at the moment, I have to post this from windoze. If anything is unclear, just ask, and I'll post the specific output later...

gcc-config --list-profiles shows that the gcc4 profile is used
gcc -v in the Makefile for the custom module show that it's using gcc 3
the command to compile the custom module is something like $(MAKE) ... ...
I recompiled both my kernel and modules, and reemerged alsa-driver


Last edited by jrgns on Wed Oct 18, 2006 2:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Tue Oct 17, 2006 6:19 pm    Post subject: Re: Weird version magic after gcc upgrade Reply with quote

jrgns wrote:
1. Any quick fixes for this?
Possibly...
jrgns wrote:
2. How can I determine with what compiler version the kernel and modules were compiled?
Kernel:
Code:
cat /proc/version
Modules:
Code:
/sbin/modinfo /lib/modules/$(uname -r)/path/to/module.ko
and look at the vermagic line. Substitute path/to/module.ko with one of your troublesome ALSA modules, of course.
jrgns wrote:
3. It seems that make (for the custom kernel) still uses the old gcc, altough I used gcc-config to use gcc4. How can I ensure that make uses gcc 4? (I added a gcc -v command to the Makefile for the custom module, and it uses gcc3?)
gcc-config to the gcc4 profile again, run env-update for good measure, and make sure to reboot your system once, or alternatively make sure you have logged out of any and all login shells and you have restarted X (if you're using X). Then login again and run[code]gcc -v[code]to confirm gcc 4.1.1. Save your .config for the custom kernel somewhere, run make distclean or (better yet) untar and patch your kernel again, then place the saved .config back and retry.
Please make sure that the kernel image you've placed into /boot actually ends up on the right file system there (i.e. mount /boot if you're using a separate /boot file system, otherwise it'll end up on the root file system and the bootloader won't see it) and has the right file name. I've had a lot of "errors" that turned out to be simply booting with the wrong kernel image while mistakenly believing that it's the right one...
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
jrgns
n00b
n00b


Joined: 15 Feb 2005
Posts: 28
Location: Johannesburg, SA

PostPosted: Wed Oct 18, 2006 2:34 pm    Post subject: Reply with quote

Kewl...

By using modinfo I found out that the make install we're installing the modules to a different path than the previous version of the module did, and so didn't overwrite the modules compiled with gcc3...

Problem solved :)
Thnx!
_________________
Eish!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum