LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   compiling individual modules (https://www.linuxquestions.org/questions/linux-newbie-8/compiling-individual-modules-132175/)

irvken 01-06-2004 06:09 PM

compiling individual modules
 
In the README for the driver I've downloaded it says

Quote:

2. Build the driver usblan.o as a loadable module for the running kernel:

cd src
make
I assume the cd src means enter the directory where I've unpacked usblan.c to, does it matter where this is, because I', getting a load of errors when I run the make part.

make
gcc -DMODULE -D__KERNEL__ -DDBG=0 -Wall -Wstrict-prototypes -O6 -I/usr/src/linux/include -c -o usblan.o usblan.c
In file included from /usr/include/asm/smp.h:18,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/sched.h:23,
from /usr/include/linux/module.h:10,
from usblan.c:23:
/usr/include/asm/mpspec.h:6:25: mach_mpspec.h: No such file or directory
In file included from /usr/include/asm/smp.h:18,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/sched.h:23,
from /usr/include/linux/module.h:10,
from usblan.c:23:
/usr/include/asm/mpspec.h:8: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:9: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:10: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:12: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:19: error: `MAX_APICS' undeclared here (not in a function)
/usr/include/asm/mpspec.h:20: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:20: error: conflicting types for `mp_bus_id_to_type'
/usr/include/asm/mpspec.h:8: error: previous declaration of `mp_bus_id_to_type'
/usr/include/asm/mpspec.h:22: error: `MAX_IRQ_SOURCES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:24: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:24: error: conflicting types for `mp_bus_id_to_pci_bus'
/usr/include/asm/mpspec.h:12: error: previous declaration of `mp_bus_id_to_pci_bus'
/usr/include/asm/mpspec.h:54: error: `MAX_APICS' undeclared here (not in a function)
In file included from /usr/include/asm/smp.h:20,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/sched.h:23,
from /usr/include/linux/module.h:10,
from usblan.c:23:
/usr/include/asm/io_apic.h:120: error: `MAX_IRQ_SOURCES' undeclared here (not in a function)
/usr/include/asm/io_apic.h:120: error: conflicting types for `mp_irqs'
/usr/include/asm/mpspec.h:22: error: previous declaration of `mp_irqs'
In file included from /usr/include/linux/smp.h:17,
from /usr/include/linux/sched.h:23,
from /usr/include/linux/module.h:10,
from usblan.c:23:
/usr/include/asm/smp.h:73:26: mach_apicdef.h: No such file or directory
In file included from /usr/include/linux/irq.h:20,
from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:11,
from /usr/include/linux/netdevice.h:489,
from usblan.c:32:
/usr/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
In file included from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:11,
from /usr/include/linux/netdevice.h:489,
from usblan.c:32:
/usr/include/linux/irq.h:70: error: `NR_IRQS' undeclared here (not in a function)
In file included from /usr/include/linux/irq.h:72,
from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:11,
from /usr/include/linux/netdevice.h:489,
from usblan.c:32:
/usr/include/asm/hw_irq.h:28: error: `NR_IRQS' undeclared here (not in a function)
/usr/include/asm/hw_irq.h:31: error: `NR_IRQS' undeclared here (not in a function)
usblan.c:140: error: field `crc_task' has incomplete type
usblan.c:141: error: field `ctrl_task' has incomplete type
usblan.c:142: error: field `reset_task' has incomplete type
usblan.c:143: error: field `unlink_task' has incomplete type
usblan.c: In function `wait_for_sync':
usblan.c:411: error: dereferencing pointer to incomplete type
usblan.c:415: error: dereferencing pointer to incomplete type
usblan.c:417: error: dereferencing pointer to incomplete type
usblan.c: In function `net_hard_start_xmit':
usblan.c:687: error: too few arguments to function `usb_alloc_urb'
usblan.c:736: warning: implicit declaration of function `FILL_BULK_URB'
usblan.c:739: error: `USB_QUEUE_BULK' undeclared (first use in this function)
usblan.c:739: error: (Each undeclared identifier is reported only once
usblan.c:739: error: for each function it appears in.)
usblan.c:739: error: `USB_ASYNC_UNLINK' undeclared (first use in this function)
usblan.c:739: error: `USB_NO_FSBR' undeclared (first use in this function)
usblan.c:747: error: too few arguments to function `usb_submit_urb'
usblan.c: In function `rx_submit':
usblan.c:804: error: `USB_QUEUE_BULK' undeclared (first use in this function)
usblan.c:811: error: too few arguments to function `usb_submit_urb'
usblan.c: In function `urb_rx_complete':
usblan.c:898: warning: implicit declaration of function `schedule_task'
usblan.c: In function `urb_tx_complete':
usblan.c:1068: error: `USB_ST_STALL' undeclared (first use in this function)
usblan.c: In function `unlink_urbs':
usblan.c:1176: error: `USB_ASYNC_UNLINK' undeclared (first use in this function)
usblan.c: In function `bh':
usblan.c:1297: error: too few arguments to function `usb_alloc_urb'
usblan.c: In function `find_interface_comm':
usblan.c:1439: warning: assignment from incompatible pointer type
usblan.c:1456: error: structure has no member named `endpoint'
usblan.c: In function `find_interface_data':
usblan.c:1495: warning: assignment from incompatible pointer type
usblan.c:1519: error: structure has no member named `endpoint'
usblan.c: In function `find_interface_nodata':
usblan.c:1565: warning: assignment from incompatible pointer type
usblan.c: In function `find_interface_mdlm':
usblan.c:1614: warning: assignment from incompatible pointer type
usblan.c:1636: error: structure has no member named `endpoint'
usblan.c: In function `find_valid_configuration':
usblan.c:1858: warning: initialization from incompatible pointer type
usblan.c:1885: error: structure has no member named `interface'
usblan.c:1886: error: structure has no member named `interface'
usblan.c:1918: error: structure has no member named `interface'
usblan.c:1922: error: structure has no member named `interface'
usblan.c: In function `verify_no_claimed_interfaces':
usblan.c:1965: error: structure has no member named `interface'
usblan.c: In function `probe':
usblan.c:1991: warning: passing arg 1 of `verify_no_claimed_interfaces' from incompatible pointer type
usblan.c:2057: warning: passing arg 2 of `usb_driver_claim_interface' from incompatible pointer type
usblan.c:2067: warning: passing arg 2 of `usb_driver_claim_interface' from incompatible pointer type
usblan.c:2118: warning: implicit declaration of function `usb_inc_dev_use'
usblan.c: In function `disconnect':
usblan.c:2167: warning: passing arg 2 of `usb_driver_release_interface' from incompatible pointer type
usblan.c:2175: warning: passing arg 2 of `usb_driver_release_interface' from incompatible pointer type
usblan.c:2182: warning: implicit declaration of function `usb_dec_dev_use'
usblan.c: At top level:
usblan.c:2191: warning: initialization from incompatible pointer type
usblan.c:2192: warning: initialization from incompatible pointer type
usblan.c:1082: warning: `urb_dead_complete' defined but not used
usblan.c:1336: warning: `crc_task' defined but not used
usblan.c:1764: warning: `verify_blan_interface' defined but not used
make: *** [usblan.o] Error 1

wreckingcru 05-09-2005 12:35 AM

I have the same problem with the same usblan driver....

I'm not sure how to build it as per the requirements....

I used gcc ____.c ...didn't work..



PLEASE HELP! !!!!


All times are GMT -5. The time now is 12:28 PM.