Re: kernel_version needed, but can't be found

From: Jon Bright (jon@sircus.demon.co.uk)
Date: Sat Jan 22 2000 - 12:28:56 EST


Du Jinsong wrote:

> Keith Owens wrote:
> > #include <module.h>, no need for versions.h. Modules *must* be
> > compiled with -DMODULE to expand kernel_version and __this_module. I
> > suspect that your compile line is wrong, check how other modules are
> > compiled.
>
> Thanks a lot for your reply, but I've already included <linux/module.h>
> and compiled with -DMODULE. So I guess there may be other things that
> cause the problem.

Do other modules compile/insmod OK? If they do, as Keith says, you need to
check how you're compiling. If not, this could be the same as the weird
problem I had once, caused by not having (at the root cause), /etc/localtime
set correctly. This caused 'date' to output a string far longer than normal,
which in turn caused UTS_VERSION in include/linux/compile.h to be too long,
which, in its turn, caused module versions not to get set correctly, resulting
in this message. An easy way to check for this would be to try 'uname -a'.
If it gives something like:

Linux bespin 2.2.14 #5 SMP Mon Jan 17 17:29:03 GMT 2000 i686 unknown

then I've wasted your time :-( If it gives

Linux bespin 2.2.14 #5 SMP Mon Jan 17 17:29:03 <rubbish from here on>

then this is the problem.

I'm guessing there should really be a check made at compile-time for this
problem.

--
Jon Bright
Lead Programmer, Silicon Circus Ltd.
http://www.siliconcircus.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:27 EST