HP Logo
HP Logo
Tux
    Home
    About
  • Features
  • Screenshots
  • FAQs
  • About HPLIP
  • Setup and Installation
  • Download HPLIP
  • Installation Instructions
  • System Requirements
  • Supported Devices
  • Usage and Support
  • Mailing Lists
  • How-Tos
  • Troubleshooting
  • Release Notes
  • Resources
  • Technical Documentation
  • Sourceforge Project Page
  • Software License
  • Other Support Information
  • Contacts
Home > Technical Documentation > Portablity Reference

Technical Documentation: Portablity Reference

HPLIP uses GNU Autotools for building and installing. GNU Autotools simplify most portability issues automatically, but some customization may be desirable. This section documents different configuration options that are available and some caveats for building HPLIP on different distributions and platforms.

This information is useful for package maintainers and users who want to build and install HPLIP from the source tar ball. Most users don't not need to build from source code and should get the latest HPLIP package from their distribution.

This section assumes all System Requirements have been met and any pre-existing HPLIP install uses the same "./configure --prefix=/usr" parameters. For more detailed install instructions see Installation Instructions .

There are two major install configurations - foomatic-xml-install and foomatic-ppd-install. The default is the foomatic-xml-install. The foomatic-xml-install will install all necessary files for dynamic PPD file creation at runtime. Since the foomatic db builds HPIJS PPD files, only HPIJS PPD files are built-on-the-fly. HP postscript PPD files are always pre-built. The foomatic-ppd-install will install pre-built HPIJS PPD files and HP postscript PPD files.

The foomatic-xml-install works with CUPS systems that use dynamic PPD file creation. Generally CUPS 1.2 uses dynamic PPD file creation. Use foomatic-ppd-install with CUPS 1.1.x. The following command displays the CUPS version.

cups-config --version

The following example is a foomatic-xml-install which is the default.

tar xzvf hplip-2.7.x.tar.gz
cd hplip-2.7.x
./configure --prefix=/usr
make
make install

Use this example for a foomatic-ppd-install.

tar xzvf hplip-2.7.x.tar.gz
cd hplip-2.7.x
./configure --prefix=/usr --disable-xml-install --enable-foomatic-ppd-install --with-hpppddir=/usr/share/cups/model
make
make install

If HPLIP built and installs correctly you now need to check device access privileges. HPLIP installs a udev rule /etc/udev/rules.d/55-hpmud.rules. This file assigns all HP devices to the "lp" group. This means by default all hotplug USB and parallel port HP devices belong to "lp" group. A user must be a member of the "lp" group in order to access the device.

You can use the "groups" command along with "cat /etc/group" to see what groups you belong to. If you are not a member of the "lp" group you must add yourself to the "lp" group. Then logoff/login and verify your change by re-running the "groups" command.

If your HP device was already pluged in and this was the first time 55-hpmud.rules was installed. Your device may not be a memember of the "lp" group yet. If this is the case you must unplug/plug your device so that the hotplug system assigns your device to the "lp" group.

The following commands can be used to verify a USB device belongs to the "lp" group with proper access privileges.

$ lsusb
Bus 003 Device 003: ID 03f0:5c11 Hewlett-Packard
$ ls -l /dev/bus/usb/003/003
crw-rw---- 1 root lp 189, 258 May 22 17:04 /dev/bus/usb/003/003

This example can be used to verify a parallel device belongs to the "lp" group with proper access privileges.

$ ls -l /dev/parport0
crw-rw-rw- 1 root lp 99, 0 May 22 11:26 /dev/parport0

Note in the above examples the permissions for the "lp" group must set to "rw" otherwise HPLIP will not find the device. If device permissions are not correct you will have to modify the udev rule that sets the device permissions (ie: MODE="0660"). For example with Fedora the usb_device rule in /etc/udev/rules.d/50-udev.rules should look like the following.

ACTION=="add", SUBSYSTEM=="usb_device",
     PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'",
     NAME="%c", MODE="0660"

Now you should be able to use your HP device with HPLIP.

Caveats

  1. Network support requires libsnmp. HPLIP can be build without network support. At configure time use the following command.
./configure --prefix=/usr --disable-network-build
  1. In order to get HPLIP to compile with libsnmp on SUSE 9.1 you need add the following symlink for libcrypto.
ln -s /usr/lib/libcrypto.so.0.9.7 /usr/lib/libcrypto.so
  1. For distribution package managers the following ./configure options are available. This allows the package manager to configure these options.
--enable-doc-build              enable documentation build (default=yes)
--enable-hpijs-only-build       enable hpijs only build (default=no)
--enable-network-build          enable network build (default=yes)
--enable-pp-build               enable parallel port build (default=yes)
--enable-scan-build             enable scanner build (default=yes)
--enable-gui-build              enable gui build (default=yes)
--enable-fax-build              enable fax build (default=yes)
--enable-cups11-build           enable cups 1.1.x build (default=no)
--enable-shadow-build           enable shadow build (default=no)
--enable-foomatic-ppd-install   enable foomatic ppd install, uses hpppddir (default=no)
--enable-foomatic-xml-install   enable foomatic xml install, uses foomaticdir (default=yes)
--with-cupsbackenddir=DIR       set cups backend install directory (default=/usr/lib/cups/backend)
--with-icondir=DIR              set icon install directory (default=/usr/share/applications)
--with-hpppddir=DIR             set hp ppd install directory (default=datadir/ppd/HP)
--with-foomaticdir=DIR          set foomatic db install directory (default=datadir/foomatic)
  1. For Mandrake be sure to include the net-snmp-mibs package for network support.
  2. In order to run the HP Device Manager, PyQt needs to be installed. Also Fedora C3 requires the "sip" module, see the following Fedora C3 instructions.
yum install PyQt
yum install sip
  1. In SUSE 9.2 and above PyQt is now part of kdebindings3-python.
  2. In order to run HPLIP with Fedora C4 you must disable SELinux protection. Under "Security Level Configuration", select SELinux tab, un-click "Enforcing Current:Permissive". The default SELinux policies will conflict with HPLIP I/O. If you want to run with SELinux enabled install the FC4 HPLIP rpm available at RH.
  3. HPLIP can be uninstalled with the "make uninstall" command.
  4. With FC4 64-bit systems use must use "./configure --prefix=/usr --libdir=/usr/lib64" in order to get libsane-hpaio installed correctly.

HPIJS Portability Reference

The previous section installed the complete HPLIP package which includes HPIJS. HPIJS predates HPLIP and some distributions package HPIJS separately. In order to support HPIJS only solution, HPIJS can be built and installed without HPLIP support. HPIJS has it's own configuration option --enable-hpijs-only-build.

With the HPLIP master Makefile a standalone version of HPIJS can be compiled and installed using the following instructions.

tar xzvf hpip-0.9.x.tar.gz
cd hplip-0.9.x/prnt/hpijs
./configiure --prefix=/usr --enable-hpijs-only-build
make
make install

If you are running CUPS 1.1.x restart cupsd in order to cause the CUPS daemon to re-read all the PPD files in the PPD directory. You can skip this step if your are running CUPS 1.2 or higher.

/etc/init.d/cups restart

You can verify HPIJS was build and installed correctly with the following command.

hpijs -h
Hewlett-Packard Co. Inkjet Server 2.x
Copyright (c) 2001-2006, Hewlett-Packard Co.

Caveats

  1. For distribution package managers the following ./configure options are available for HPIJS.
--enable-foomatic-ppd-install   enable foomatic ppd install, uses hpppddir (default=no)
--enable-foomatic-xml-install   enable foomatic xml install, uses foomaticdir (default=yes)
--with-hpppddir=DIR             set hp ppd install directory (default=datadir/ppd/HP)
--with-foomaticdir=DIR          set foomatic db install directory (default=datadir/foomatic)

Foomatic-ppd-install will (1) copy HPIJS PPD files to $(hpppddir) (2) copy HP postscript PPD files to $(hpppddir) (3) gzip all PPD files.

Foomatic-xml-install will (1) copy HPIJS xml files to $(foomaticdir)/... (2) copy HP postscript PPD files to $(foomaticdir)/db/source/PPD/HP
(3) gzip all postscript PPD files.
  1. If you are building Ghostscript from scratch and gs gets a missing font error message, try the following symbolic link. Ghostscript looks for fonts in hardcoded directories, see GS_LIB_DEFAULT in the Ghostscript Makefile. For Red Hat the following symbolic link will allow Ghostscript to find fonts with out modifying the makefile. Other distributions may have different font directories.
ln -s /usr/share/fonts/default/Type1 /usr/share/ghostscript/fonts

Page last updated: Thu May 24 16:32:53 2007; HPLIP Version: 2.7.7

Legal Notices Copyright © 2003-2007, Hewlett-Packard Development Company, L.P. Contact Site Maintainer