[realtek] insmod problem
Donald Becker
becker@scyld.com
Sat Jan 5 08:39:00 2002
On Sat, 5 Jan 2002, Jason Bond wrote:
> I have downloaded the files pci-scan.h, pci-scan.c, kern_compat.h, rtl8139.c
> I have gcc'd pci-scan.c and rtl8139.c successfully with the following
> commands as per the lines at the end of the source files.
>
> gcc -DMODULE -Wall -Wstrict-prototypes -O6 -c rtl8139.c
> gcc -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -Wall -Wstrict-prototypes -O6 -c
> pci-scan.c
...
> the insmod command with both pci-scan.o and rtl8139.o gives me unresolved
> symbol errors.
...
> /lib/modules/2.2.18pre21/net/pci-scan.o: unresolved symbol
> pci_write_config_byte
> /lib/modules/2.2.18pre21/net/pci-scan.o: unresolved symbol
> apm_register_callback
> /lib/modules/2.2.18pre21/net/pci-scan.o: unresolved symbol kfree
You have compiled against the wrong header files, or perhaps against the
correct header files with the wrong options. Use the suggestions in
http://www.scyld.com/network/updates.html
Likely adding
-I/usr/src/linux-2.2.18pre21/include
to the compile line will be enough to fix the problem.
> going through the realtek archives reveals that this not many people have
> this exact problem. If anyone can shed some light on this problem I would be
> eternally grateful.
This is caused by every distribution (Red Hat, Debian) doing something
different with kernel header files. Even updates within a single
release number have changed the location of the header files and how
they should be accessed.
[[ For the record, I protested against the glibc-related header file
changes that caused this problem. A change was needed, but the hacked
"fix" is worse than the original problem.]]
Donald Becker becker@scyld.com
Scyld Computing Corporation http://www.scyld.com
410 Severn Ave. Suite 210 Second Generation Beowulf Clusters
Annapolis MD 21403 410-990-9993