compiling printer driver

Forum: Printers
Topic: compiling printer driver
started by: jpeters

Posted by jpeters on May 05 2006,09:35
In attempting to compile a printer driver, I'm unable to generate the MAKE file, with an error message about needing a Python Interpreter (after running ./configure --prefix=/usr ).
I loaded Gcc as the compiler, and then attempted to install Python. The Python directory loaded in /opt, so it appears to be installed. Any ideas? Thanks.

Posted by clacker on May 05 2006,14:11
jpeters, my guess is that you need to add the python bin directory to your PATH variable.  There are a two way to do this.  The first is to open a shell and type:

export PATH=/opt/python/bin:$PATH

This puts the python/bin directory in your PATH variable which is a list of directories that the system searches in to find a command.  That's your best bet since I'm sure you're running your configure command from an xterminal anyway.  Type the above and then run configure in the same terminal window.

The other way would be to run the command as


but you would need to edit the configure to make that work.

Posted by jpeters on May 05 2006,15:15
Thanks Clacker, that worked. The next error I get is "Checking for usb_init in" "Can't find libusb support."
Any ideas on how to install that?  Thanks

Posted by dtf on May 05 2006,15:48
clacker knows more about this than I do so you might want to wait for his reply.  However, I have gotten this same error when trying to build some product (not sure which now). I googled the source for the library, built and installed the library and that seemed to work for me.
Posted by clacker on May 05 2006,16:03
When I try to build something and I get a missing library error, I usually look at the < debian package search >.  Then when I find the library, I get the package with the -dev on the end because it contains the headers you need.  Ithink you're looking for  "libusb-dev" so load the dsl-dpkg.dsl package and run:

sudo apt-get update
sudo aprt-get install  libusb-dev

Posted by jpeters on May 05 2006,19:43
I did the install, and got some messages noting that not all packages were included, etc.  Running ./configure again, I still got the error about no libusb support. Researching it a little, it looks like cerrain files need to be replaced, permissions granted, it needs to load at runtime in root,etc., etc.  I'll have to do some research in order to make sense out of all of this.  Thanks
Posted by jpeters on May 06 2006,05:26
Well, I got libusb working; it needs to be manually unpacked and compiled. Apt-get install doesn't do it.

 Next problem; it needs CUPS installed to compile, but now CUPS won't load  (it did previously).  I'm getting a message that there's no room left on the device (whatever that means..there's plenty of RAM and swap).

Posted by dtf on May 06 2006,11:30
Are you trying to re-download the module with MyDSL or just trying to restart from the menu?
Posted by jpeters on May 06 2006,17:44
I was attempting to load it using MyDsl.  It worked after rebooting.
In attempting to configure and install a HP printer driver, so far I've had to download and compile libusb, cups-source, net-snmp, and  libjpeg packages.
To compile, of course, it was necessary to load G++ and python, and export the path. I also needed to install lib6 and libc6-dev packages.  ALthough I compiled and installed a libjpeg package, I'm still getting an error message about not finding support for it when attempting to configure the printer driver. I don't know how many more packages I'll need, or if I'll ever be able to get the printer to work even if I get it installed.

I'm just enjoying the challenge; it's probably much easier to just boot up my windows OS when I need to print something out. I guess I'm not ready to give up my windows "habit" yet.   :D

Posted by dtf on May 06 2006,20:39
Good luck. I was able to build the hpijs driver and get it working for my hp printer.  I think I remember also having to build libusb and libjpeg.  However, I did not rebuild cups.  I used the MyDSL extension.  I might of tried but it just had too many depenencies for my limited knowledge.  I needed to install the foomatic-rip and foomatic-gswapper perl scripts from  I also found a missing perl script referenced in foomatic-rip.  End the end I got it to work (maybe I was just lucky).
Posted by jpeters on May 07 2006,05:57
How did you get libjpeg to work? I built both libjpeg-6A and 6B; neither satified the need for libjpeg support when configuring the driver (HPLIP.9.10). This is one needy driver! Maybe I should just FTP it over to a support group (for overly dependent drivers).  

I love the tutorial at < >

One command line should do everything: # apt-get install python-dev libsnmp5-dev libcupsys2-dev python-qt3 lsb libusb-dev

Not with DSL, that's for sure.

Posted by dtf on May 07 2006,12:10
I did try building HPLIP but ran into too many dependencies.  For my printer I only required the HPIJS driver, which if I understand it correctly is one component of HPLIP.  I had some trouble finding the source for HPIJS because every time I clicked on the hpijs link at they only point to HPLIP.  Don't know if that can help you but if it can here is the link.

< >

Again my understanding is that HPLIP provides a broader set of capabilities for all-in-one printers and the HPIJS driver is specificly for printing.

Posted by jpeters on May 07 2006,16:11
I had a wave of hope there....

Trying to configure HPIJS still gets me the same error, "Can't find libjpeg support", which prevents generating the MAKE file.

Posted by dtf on May 07 2006,16:46
jpeters - I sent you email with an attachment containing the driver and some other files.  Did you get it?  When I get a chance I will look at what I did for the libjpeg build.  It is on a different machine which is in use by someone else.
Posted by jpeters on May 07 2006,18:09
I attempted to load your dsl file using the myDsl button, and did not find that it made any difference in recognizing my printer (checked with lpinfo -v).

Note:  The printer driver might work if I had a parallel port (it's listed).  The problem is no device is listed on the USB port (I'm using a Dell laptop).

Posted by dtf on May 07 2006,20:37
My printer was not connected to a laptop but did use a USB port.  I would suggest trying to configure it to see what happens.

Did you check to see that the driver and foomatic scripts were installed?

You should also see this ppd file


If all that seems in place I would attempt to configure it.  
From the DSL menu

MyDSL-->Cups-->Cups Admin

You should see Cups Adminsistration page in your browser

Click Manage Printers

Click On "Add Printer" button

You will be prombted for password.  Enter root and your root password

If it keeps asking then re-enter the root password from superuser terminal

Provide printer Name (your choice) Location and Description

Click Continue

For device pick USB Printer#1

For Make pick HP DeskJet 940C....

Then try printing a test sheet.

Posted by jpeters on May 08 2006,01:38
Already did all that; I think a device needs to be listed on the usb port (lsusb) for it to work:

I haven't found a way to get past the libjpeg support issue when attempting to configure the driver, so there's nothing to install. I've loaded four different versions, along with anything else that seems remotely related...nada..

Posted by dtf on May 08 2006,02:09
Ok.  Thanks for giving the driver a try.  I am afraid I have run out of ideas for now.
Posted by jpeters on May 08 2006,05:22
Thanks for your efforts. I'll post to the linuxPrinting forum, and let you know if I discover a solution to this puzzle.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.