hplip fails to compile

Issues related to software problems.
Post Reply
majun
Posts: 145
Joined: 2010/03/11 11:33:59

hplip fails to compile

Post by majun » 2016/12/22 15:25:17

Hi there,

our print server is still a CentOS 5 machine which for various reasons we cannot update to CentOS 6 or 7 anytime soon. We have a few custom printer scripts and programs running that for one reason or another do not run on anything newer than 5 for the time being. They're actually really old leftovers from our UNIX days and it was already a major PITA to get them running on CentOS in the first place. While we are working on that we need to keep using the CentOS 5 box, and this is where things turned from old to ancient to ugly.

First of all it seems that HP does no longer provide RHEL hplip RPM packages for RHEL/CentOS 5, which I was always able to obtain from http://hplipopensource.com/hplip-web/in ... index.html. The current 3.16.11 is only available for RHEL 6 & 7.

Second, I've tried downloading the tarball and building it myself, following these official instructions found on their website: http://hplipopensource.com/hplip-web/in ... entos.html

The problem is: I can't compile it since make exits with a source code error:
[martin@ebdvct001 hplip-3.16.11]$ make
/bin/sh ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"HP\ Linux\ Imaging\ and\ Printing\" -DPACKAGE_TARNAME=\"hplip\" -DPACKAGE_VERSION=\"3.16.11\" -DPACKAGE_STRING=\"HP\ Linux\ Imaging\ and\ Printing\ 3.16.11\" -DPACKAGE_BUGREPORT=\"3.16.11\" -DPACKAGE_URL=\"\" -DPACKAGE=\"hplip\" -DVERSION=\"3.16.11\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBDL=1 -DHAVE_PTHREAD_H=1 -DHAVE_JPEGLIB_H=1 -DHAVE_UINT32_T=1 -DHAVE_LIBHPIP=1 -DHAVE_LIBHPIP=1 -DHAVE_LIBUSB01=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBNETSNMP=1 -DHAVE_NET_SNMP_NET_SNMP_CONFIG_H=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_USB_H=1 -DHAVE_PYTHON2_4_PYTHON_H=1 -I. -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/ -I/usr/include/python2.4 -Iprotocol -g -O2 -DCONFDIR=\"/etc/hp\" -MT cupsext_la-cupsext.lo -MD -MP -MF .deps/cupsext_la-cupsext.Tpo -c -o cupsext_la-cupsext.lo `test -f 'prnt/cupsext/cupsext.c' || echo './'`prnt/cupsext/cupsext.c
libtool: compile: gcc "-DPACKAGE_NAME=\"HP Linux Imaging and Printing\"" -DPACKAGE_TARNAME=\"hplip\" -DPACKAGE_VERSION=\"3.16.11\" "-DPACKAGE_STRING=\"HP Linux Imaging and Printing 3.16.11\"" -DPACKAGE_BUGREPORT=\"3.16.11\" -DPACKAGE_URL=\"\" -DPACKAGE=\"hplip\" -DVERSION=\"3.16.11\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBDL=1 -DHAVE_PTHREAD_H=1 -DHAVE_JPEGLIB_H=1 -DHAVE_UINT32_T=1 -DHAVE_LIBHPIP=1 -DHAVE_LIBHPIP=1 -DHAVE_LIBUSB01=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBNETSNMP=1 -DHAVE_NET_SNMP_NET_SNMP_CONFIG_H=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_USB_H=1 -DHAVE_PYTHON2_4_PYTHON_H=1 -I. -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/ -I/usr/include/python2.4 -Iprotocol -g -O2 -DCONFDIR=\"/etc/hp\" -MT cupsext_la-cupsext.lo -MD -MP -MF .deps/cupsext_la-cupsext.Tpo -c prnt/cupsext/cupsext.c -fPIC -DPIC -o .libs/cupsext_la-cupsext.o
prnt/cupsext/cupsext.c:228: error: initializer element is not constant
prnt/cupsext/cupsext.c:228: error: (near initialization for 'printer_Type.ob_refcnt')
prnt/cupsext/cupsext.c:228: error: expected '}' before string constant
prnt/cupsext/cupsext.c:516: error: initializer element is not constant
prnt/cupsext/cupsext.c:516: error: (near initialization for 'job_Type.ob_refcnt')
prnt/cupsext/cupsext.c:516: error: expected '}' before string constant
make: *** [cupsext_la-cupsext.lo] Fehler 1
[martin@ebdvct001 hplip-3.16.11]$
I get this error on both, 5.10 and 5.11. Did anyone successfully manage to compile a current hplip on CentOS 5 or is this a lost cause at this point?

Post Reply