[tulip] Error building Tulip driver on Mandrake 9 : 'tulip.c:3249: `NETIF_MSG_RXFILTER' undeclared (first use in this function)'

Peter McClure mcclurep@yahoo.com
Thu Nov 28 10:02:00 2002


I moved the new sources into /usr/src/RPM/SOURCES and I now get a clean
compile from

cd /usr/src/RPM
rpm -bb SPECS/netd*spec


 !!!   This is great   !!!

However, when I try to load the module, I get 'unresolved symbol' errors.


After compiling the sources, I ran :-

/etc/init.d/network stop
modprobe -r tulip  	(to get rid of the Mandrake tulip driver)
cd RPM/BUILD
cp tulip.o /lib/modules/`uname -r`/kernel/drivers/net
cp pci-scan.o /lib/modules/`uname -r`/kernel/drivers/net
mv /lib/modules/`uname -r`/kernel/drivers/net/tulip/tulip.o.gz
/lib/modules/`uname -r`/kernel/drivers/net/tulip.o.gz.REAL
depmod -a
modprobe tulip


The output of this was :-

/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol pci_write_config_byte
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol pci_find_capability
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol kmalloc
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol pci_find_class
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol __check_region
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol pci_read_config_byte
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol pm_unregister_all
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol pci_read_config_dword
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol __ioremap
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol pci_read_config_word
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
sym
bol pm_register
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
symbol kfree
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
symbol pci_set_master
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
symbol pci_write_confi
g_dword
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
symbol pci_write_confi
g_word
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
symbol printk
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz: unresolved
symbol ioport_resource
modprobe: insmod
/lib/modules/2.4.19-16mdksecure/kernel/drivers/net/pci-scan.o.gz failed
modprobe: insmod tulip failed


Now, when I check these unresolved symbols against the output of 'ksyms -a',
I find that _all_ of the symbols are in the kernel and are being exported.

Any suggestions ?



TIA
Peter
PS (for those reading this from the archives) :

to get back to a running tulip driver, run :-

mv /lib/modules/`uname -r`/kernel/drivers/net/tulip/tulip.o.gz.REAL
/lib/modules/`uname -r`/kernel/drivers/net/tulip.o.gz
depmod -a
modprobe tulip
/etc/init.d/network start




> -----Original Message-----
> From: Donald Becker [mailto:becker@scyld.com]
> Sent: 27 November 2002 19:45
> To: Peter McClure
> Cc: tulip@scyld.com
> Subject: Re: [tulip] Error building Tulip driver on Mandrake 9 :
> 'tulip.c:3249: `NETIF_MSG_RXFILTER' undeclared (first use in this
> function)'
>
>
> On Wed, 27 Nov 2002, Peter McClure wrote:
>
> > More debugging of the source code.  It never occurred to me
> (until now) that
> > there might be #if in the header files.  Dumb.
> >
> > >From kern_compat.h
> ..
> > OK.  So Mandrake claim to have NETIF_MSG and do - except for
> the one that we
> > need.  I added
> >
> > enum {
> >         NETIF_MSG_RXFILTER      = 0x10000
> > };
>
> Version 1.13 and later of kern_compat.h has the following to work around
> this problem:
>
> #if !defined(NETIF_MSG_MAX) || NETIF_MSG_MAX < 0x8000
> #define NETIF_MSG_MISC 0x8000
> #endif
> #if !defined(NETIF_MSG_MAX) || NETIF_MSG_MAX < 0x10000
> #define NETIF_MSG_RXFILTER 0x10000
> #endif
>
> > I then tried to rebuild the module and I get :-
> >
> > [root@lin133 netdrivers-3.1]# make tulip.o
> > gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6
> -I/lib/modules/2.4.1
> > 9-16mdksecure/build/include -pipe -fno-strength-reduce
> -DMODVERSIONS   -c -o
> > tulip.o tulip.c
> > tulip.c: In function `set_rx_mode':
> > tulip.c:3291: warning: operation on `setup_frm' may be undefined
>
> These are bogus warnings from the compiler.
> We are filling with duplicate values and don't care which order the
> assignment is done.  Still, the v0.95g version of tulip.c changes the
> code to avoid the warning.
>
> Both updates are now at
>
>     ftp://ftp.scyld.com/pub/network/netdrivers.tgz
>
> --
> Donald Becker				becker@scyld.com
> Scyld Computing Corporation		http://www.scyld.com
> 410 Severn Ave. Suite 210		Scyld Beowulf cluster system
> Annapolis MD 21403			410-990-9993