LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-06-2004, 06:09 PM   #1
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Rep: Reputation: 30
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
 
Old 05-09-2005, 12:35 AM   #2
wreckingcru
LQ Newbie
 
Registered: Apr 2005
Posts: 4

Rep: Reputation: 0
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! !!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling as modules: useful always? itzfritz Linux - General 2 11-17-2004 08:57 PM
How to compile individual modules in 2.6 kule Linux - General 0 07-16-2004 07:07 AM
after compiling 2.6.3 modules... c0rderr0y Linux - Newbie 1 02-23-2004 03:48 AM
Modules not Compiling BlakeB395 Linux - Software 0 02-08-2004 04:06 AM
modules don't seem to be compiling thrice Slackware 3 11-20-2003 11:37 PM


All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration