LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-31-2005, 02:25 AM   #1
Mondus
Member
 
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31

Rep: Reputation: 15
Lexmark X5250 install on Debian


Aaarrrggghhh... Another hardware component irritating me... Ok.. I need some help here... This is what the README file says about the install (the file can be found here: http://www.lexmark.com/US/products/i...nux/index.html)

Quote:

BASIC INSTALLATION

==================



Lexmark USB scanner device driver package includes the following files:



- lxkscanner.c

- lxkscanner.h

- lxkscanner_load

- Makefile

- README



In general, to install Lexmark USB scanner device driver, follow

the steps below:



1) tar xvfz LEXUSB-SCANNER-1.0-1.TAR.GZ

2) cd LEXUSB-SCANNER-1.0-1

3) Depending on the distribution, run one of the following:

(Note that this still depends on the kernel version installed in the system)

- make (for Red Hat 8.0 & 9.0)

- make INCLUDE=/usr/src/linux-2.4.19.SuSE/include (for SuSE 8.1)

- make INCLUDE=/usr/src/linux-2.4.20.SuSE/include (for SuSE 8.2)

- make INCLUDE=/usr/src/linux-2.4.21-99-include/default/include (for SuSE 9.0)

- make INCLUDE=/usr/src/linux-2.4.19-16mdk/include (for Mandrake 9.0)

- make INCLUDE=/usr/src/linux-2.4.21-0.13mdk/include (for Mandrake 9.1)

- make INCLUDE=/usr/src/linux-2.4.22-10mdk/include (for Mandrake 9.2)

4) make install



Note: This device driver was tested and verified in the following

distributions:



- Red Hat 8.0

- Red Hat 9.0



- Mandrake 9.0

- Mandrake 9.1

- Mandrake 9.2



- SuSE 8.1

- SuSE 8.2

- SuSE 9.0

What do you think I should do seeing as though I'm using Debian?


EDIT: The README file also mentions the requirement of Kernel Development Libraries.. Now I tried looking this up in Aptitude.. But nothing.. what is the package name for the Kernel Development Libraries?
 
Old 07-31-2005, 09:55 AM   #2
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
At least you need the header files that were used to compile your kernel. If you unpack a kernel source they are in subdirectory include/linux. That's what all the INCLUDE= stuff is there for. If you are using a debian kernel there should be a matching package with these files (package kernel-headers-<more stuff dep. on your kernel>). Install this and point the 'INCLUDE=' option at it as in the examples you quoted.

If you compiled your own kernel - well, you know where the source code is

I'm not sure either what they mean by kernel development libraries. Can't hurt to just run 'make' and find out what's missing that way.
 
Old 07-31-2005, 04:40 PM   #3
Mondus
Member
 
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
Thanks... But what if I used a precompiled kernel with the help of apt? Then I don't really have the source.. .or do I?
 
Old 07-31-2005, 05:22 PM   #4
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
There should be a matching package called kernel-headers-<something>, where the <something> matches the kernel version. You should apt-get install it and check where it dumps its files. That will give you the 'INCLUDE' directory to use with 'make'.
 
Old 09-04-2005, 05:42 AM   #5
Mondus
Member
 
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
Ok.. I've compiled my own kernel.. and I tried typing the following (I also included the error):

Michael:/home/mondus/LEXUSB-SCANNER-1.0-1# make INCLUDE=/usr/src/linux-2.6.12.5/include/
gcc -DMODULE -D__KERNEL__ -I/usr/src/linux-2.6.12.5/include/ -include /usr/src/linux-2.6.12.5/include//linux/modversions.h -c lxkscanner.c
cc1: error: /usr/src/linux-2.6.12.5/include//linux/modversions.h: Ingen sådan fil eller filkatalog
In file included from /usr/src/linux-2.6.12.5/include/asm/smp.h:18,
from /usr/src/linux-2.6.12.5/include/linux/smp.h:19,
from /usr/src/linux-2.6.12.5/include/linux/sched.h:26,
from /usr/src/linux-2.6.12.5/include/linux/module.h:10,
from lxkscanner.h:31,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/asm/mpspec.h:6:25: error: mach_mpspec.h: Ingen sådan fil eller filkatalog
In file included from /usr/src/linux-2.6.12.5/include/asm/smp.h:18,
from /usr/src/linux-2.6.12.5/include/linux/smp.h:19,
from /usr/src/linux-2.6.12.5/include/linux/sched.h:26,
from /usr/src/linux-2.6.12.5/include/linux/module.h:10,
from lxkscanner.h:31,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/asm/mpspec.h:8: error: 'MAX_MP_BUSSES' undeclared here (not in a function)
/usr/src/linux-2.6.12.5/include/asm/mpspec.h:22: error: 'MAX_IRQ_SOURCES' undeclared here (not in a function)
In file included from /usr/src/linux-2.6.12.5/include/linux/smp.h:19,
from /usr/src/linux-2.6.12.5/include/linux/sched.h:26,
from /usr/src/linux-2.6.12.5/include/linux/module.h:10,
from lxkscanner.h:31,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/asm/smp.h:71:26: error: mach_apicdef.h: Ingen sådan fil eller filkatalog
In file included from /usr/src/linux-2.6.12.5/include/linux/irq.h:21,
from /usr/src/linux-2.6.12.5/include/asm/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/interrupt.h:11,
from /usr/src/linux-2.6.12.5/include/linux/usb.h:15,
from lxkscanner.h:54,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/asm/irq.h:16:25: error: irq_vectors.h: Ingen sådan fil eller filkatalog
In file included from /usr/src/linux-2.6.12.5/include/asm/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/interrupt.h:11,
from /usr/src/linux-2.6.12.5/include/linux/usb.h:15,
from lxkscanner.h:54,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/linux/irq.h:72: error: 'NR_IRQS' undeclared here (not in a function)
In file included from /usr/src/linux-2.6.12.5/include/linux/irq.h:74,
from /usr/src/linux-2.6.12.5/include/asm/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/interrupt.h:11,
from /usr/src/linux-2.6.12.5/include/linux/usb.h:15,
from lxkscanner.h:54,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/asm/hw_irq.h:28: error: 'NR_IRQ_VECTORS' undeclared here (not in a function)
In file included from lxkscanner.c:358:
lxkscanner.h:129: error: syntax error before 'devfs_handle_t'
lxkscanner.h:129: warning: no semicolon at end of struct or union
lxkscanner.h:132: error: syntax error before 'scn_minor'
lxkscanner.h:132: warning: data definition has no type or storage class
lxkscanner.h:141: error: syntax error before '}' token
lxkscanner.h:143: error: syntax error before 'usb_devfs_handle'
lxkscanner.h:143: warning: data definition has no type or storage class
lxkscanner.h:155: warning: 'packed' attribute ignored
lxkscanner.c: In function 'irq_scanner':
lxkscanner.c:373: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'open_scanner':
lxkscanner.c:391: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:391: error: (Each undeclared identifier is reported only once
lxkscanner.c:391: error: for each function it appears in.)
lxkscanner.c:391: error: syntax error before 'scn_minor'
lxkscanner.c:395: error: 'MOD_INC_USE_COUNT' undeclared (first use in this function)
lxkscanner.c:405: error: 'MOD_DEC_USE_COUNT' undeclared (first use in this function)
lxkscanner.c:412: error: dereferencing pointer to incomplete type
lxkscanner.c:414: error: dereferencing pointer to incomplete type
lxkscanner.c:424: error: dereferencing pointer to incomplete type
lxkscanner.c:430: error: dereferencing pointer to incomplete type
lxkscanner.c:436: error: dereferencing pointer to incomplete type
lxkscanner.c:438: error: dereferencing pointer to incomplete type
lxkscanner.c:445: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'close_scanner':
lxkscanner.c:458: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:458: error: syntax error before 'scn_minor'
lxkscanner.c:472: error: dereferencing pointer to incomplete type
lxkscanner.c:473: error: dereferencing pointer to incomplete type
lxkscanner.c:478: error: dereferencing pointer to incomplete type
lxkscanner.c:480: error: 'MOD_DEC_USE_COUNT' undeclared (first use in this function)
lxkscanner.c: In function 'write_scanner':
lxkscanner.c:495: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:495: error: syntax error before 'scn_minor'
lxkscanner.c:505: error: dereferencing pointer to incomplete type
lxkscanner.c:507: error: dereferencing pointer to incomplete type
lxkscanner.c:509: error: dereferencing pointer to incomplete type
lxkscanner.c:511: error: dereferencing pointer to incomplete type
lxkscanner.c:524: error: dereferencing pointer to incomplete type
lxkscanner.c:529: error: dereferencing pointer to incomplete type
lxkscanner.c:567: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'read_scanner':
lxkscanner.c:582: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:582: error: syntax error before 'scn_minor'
lxkscanner.c:593: error: dereferencing pointer to incomplete type
lxkscanner.c:595: error: dereferencing pointer to incomplete type
lxkscanner.c:597: error: dereferencing pointer to incomplete type
lxkscanner.c:599: error: dereferencing pointer to incomplete type
lxkscanner.c:616: error: dereferencing pointer to incomplete type
lxkscanner.c:616: error: dereferencing pointer to incomplete type
lxkscanner.c:640: error: dereferencing pointer to incomplete type
lxkscanner.c:640: error: dereferencing pointer to incomplete type
lxkscanner.c:649: error: dereferencing pointer to incomplete type
lxkscanner.c:654: error: 'USB_ST_DATAUNDERRUN' undeclared (first use in this function)
lxkscanner.c:687: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'ioctl_scanner':
lxkscanner.c:697: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:697: error: syntax error before 'scn_minor'
lxkscanner.c:706: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'probe_scanner':
lxkscanner.c:837: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:837: error: syntax error before 'scn_minor'
lxkscanner.c:905: error: request for member 'altsetting' in something not a structure or union
lxkscanner.c:913: error: 'struct usb_interface_descriptor' has no member named 'endpoint'
lxkscanner.c:1059: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1066: error: dereferencing pointer to incomplete type
lxkscanner.c:1073: error: dereferencing pointer to incomplete type
lxkscanner.c:1075: error: dereferencing pointer to incomplete type
lxkscanner.c:1079: error: dereferencing pointer to incomplete type
lxkscanner.c:1079: error: too few arguments to function 'usb_submit_urb'
lxkscanner.c:1089: error: dereferencing pointer to incomplete type
lxkscanner.c:1097: error: dereferencing pointer to incomplete type
lxkscanner.c:1099: error: dereferencing pointer to incomplete type
lxkscanner.c:1109: error: dereferencing pointer to incomplete type
lxkscanner.c:1114: error: dereferencing pointer to incomplete type
lxkscanner.c:1116: error: dereferencing pointer to incomplete type
lxkscanner.c:1122: error: dereferencing pointer to incomplete type
lxkscanner.c:1126: error: dereferencing pointer to incomplete type
lxkscanner.c:1127: error: dereferencing pointer to incomplete type
lxkscanner.c:1130: error: dereferencing pointer to incomplete type
lxkscanner.c:1131: error: dereferencing pointer to incomplete type
lxkscanner.c:1133: error: dereferencing pointer to incomplete type
lxkscanner.c:1134: error: dereferencing pointer to incomplete type
lxkscanner.c:1135: error: dereferencing pointer to incomplete type
lxkscanner.c:1136: error: dereferencing pointer to incomplete type
lxkscanner.c:1137: error: dereferencing pointer to incomplete type
lxkscanner.c:1139: error: dereferencing pointer to incomplete type
lxkscanner.c:1141: error: dereferencing pointer to incomplete type
lxkscanner.c:1142: error: 'DEVFS_FL_DEFAULT' undeclared (first use in this function)
lxkscanner.c:1143: error: dereferencing pointer to incomplete type
lxkscanner.c:1146: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'disconnect_scanner':
lxkscanner.c:1162: error: dereferencing pointer to incomplete type
lxkscanner.c:1164: error: dereferencing pointer to incomplete type
lxkscanner.c:1166: error: dereferencing pointer to incomplete type
lxkscanner.c:1169: error: dereferencing pointer to incomplete type
lxkscanner.c:1169: error: dereferencing pointer to incomplete type
lxkscanner.c:1171: error: dereferencing pointer to incomplete type
lxkscanner.c:1172: error: dereferencing pointer to incomplete type
lxkscanner.c:1175: error: dereferencing pointer to incomplete type
lxkscanner.c:1176: error: dereferencing pointer to incomplete type
lxkscanner.c:1177: error: dereferencing pointer to incomplete type
lxkscanner.c: At top level:
lxkscanner.c:1185: warning: initialization from incompatible pointer type
lxkscanner.c:1186: warning: initialization from incompatible pointer type
lxkscanner.c:1187: error: unknown field 'fops' specified in initializer
lxkscanner.c:1187: warning: initialization from incompatible pointer type
lxkscanner.c:1188: error: unknown field 'minor' specified in initializer
lxkscanner.c:1188: warning: initialization makes pointer from integer without a cast
make: *** [lxkscanner.o] Fejl 1




I've tried with include/linux instead.. but that just gives me even more errors!
 
Old 09-07-2005, 10:02 PM   #6
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
It appears that the code you are trying to compile is specific to a 2.4 kernel. The missing file modversions.h is present in the 2.4 kernel code but not the 2.6 code.
 
  


Reply



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
Lexmark (All-in-One) X5250 printer jvanhennik Linux - Hardware 5 01-06-2006 01:44 AM
LexMark X5250 USB arjanhs Linux - Hardware 0 01-13-2005 02:25 AM
Debian & Lexmark Z605 kurrupt Debian 0 01-12-2005 07:17 PM
Does Lexmark Z605 works on Debian? kesara3k Debian 5 08-16-2004 10:09 AM
I need Lexmark drivers for my Debian Farquar210 Linux - Newbie 2 05-23-2004 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:24 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
Open Source Consulting | Domain Registration