Operating System - Linux
1824937 Members
3823 Online
109678 Solutions
New Discussion юеВ

module build value "vermagic", how is it determined?

 
Masaki Birchmier
Frequent Advisor

module build value "vermagic", how is it determined?

I have a Redhat WS3 system where the kernel was built with gcc3.3 (located at /usr/local/bin/gcc). When I build new modules, the vermagic value is gcc3.2 (from /usr/bin/gcc). The modules will not load unless I force it because vermagic values for gcc does not match between the kernel and module. This module must load at boot so I need to get around this vermagic mismatch problem.

If I modify my PATH to put /usr/local/bin in front of /usr/bin it still builds the module with the /usr/bin/gcc (version 3.2).

Does anyone understand how vermagic is calculated when building modules?

Any clever workarounds to my problem?

I've tried upgrading /usr/bin/gcc to version 3.3 but don't have access to Redhat network and haven't been able to find a yum depository for WS3.

Thanks for any help,
Masaki
4 REPLIES 4
Gopi Sekar
Honored Contributor

Re: module build value "vermagic", how is it determined?


if you are talking about kernel modules version number, then it is nothing got to do with gcc value.

the kernel version number is taken from the current running kernel. so if you have built the module from another system, better rebuilt it again on the current running kernel.

if you have downloaded only the binary module, download the source and recompile it otherwise you may have to live with module forcing.

Hope this helps,
Gopi
Never Never Never Giveup
Masaki Birchmier
Frequent Advisor

Re: module build value "vermagic", how is it determined?

The module was built with the the current kernel source.

The error messages is...
qla2xxx_: version magic '2.6.8-1.nosmp PENTIUM4 gcc-3.2' should be '2.6.8-1.nosmp PENTIUM4 gcc-3.3'
Gopi Sekar
Honored Contributor

Re: module build value "vermagic", how is it determined?


looks to be that qla driver does some extra checking by adding gcc version.

try this method: mv /usr/bin/gcc to some other location which is not in path, compile qla driver again, this it should use /usr/local/bin/gcc which is 3.3 and then the module loading should work fine.

But warning: I can not give any guarantee that this will work fine and will not cause any other problems, you are on you own. I did not even try this on my system.

Hope this helps,
Gopi
Never Never Never Giveup
Masaki Birchmier
Frequent Advisor

Re: module build value "vermagic", how is it determined?

still don't know how vermagic is determined, but I was able to solve my problem by manually chasing the dependencies and updating gcc to the same version the kernel was built with. The module built and installed just fine.