Compiling problem on SMP system

Donald Becker becker@cesdis.gsfc.nasa.gov
Tue Jan 11 16:28:27 2000


On Tue, 11 Jan 2000, shawn a. wrote:

> > [root@bigbird tmp]# insmod tulip
> > ./tulip.o: kernel-module version mismatch
> >         ./tulip.o was compiled for kernel version 2.2.5-15
> >         while this kernel is version 2.2.5-15smp.
> > 
> > Is there an option that i need to give at compile time to let the
> > compiler know to use SMP ???  Below is the compile command I used.
> > 
> > [root@bigbird tmp]# gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net -Wall
> > -Wstrict-prototypes -O6 -c tulip.c `[ /usr/include/linux/modversions.h ]
> > && echo -DMODVERSIONS`
> > 
> 
> This same thing happened to a linuxppc user. He tried compiling for a 
> kernel called 2.2.6-15apmac, so this leads me to believe it has more 
> to do with the name of your kernel than SMP. I am no expert tho.

Correct.  It's a simple kernel naming problem caused by RedHat's unique
include file setup.

You should be passing the -D__SMP__ flag, but you haven't encountered that
problem yet.  I've recently put the following lines in newer driver versions
#include <config.h>
#if defined(CONFIG_SMP)  &&  ! defined(__SMP__)
#define __SMP__
#endif

This should have been put in a header file, instead of each driver.

> you could try forcing it, 'insmod -f tulip.o' :-)

Yes.

Donald Becker
Scyld Computing Corporation, and
USRA-CESDIS,   becker@cesdis.gsfc.nasa.gov

-------------------------------------------------------------------
To unsubscribe send a message body containing "unsubscribe"
to linux-tulip-request@beowulf.org