Bug 918387

Summary: HPLIP 3.15.2 does no longer work with CUPS 1.5.4: hp-toolbox et al. fail with "CUPSEXT could not be loaded" (works with CUPS 1.7.5)
Product: [openSUSE] openSUSE Distribution Reporter: John Hudson <j.r.hudson>
Component: PrintingAssignee: Johannes Meixner <jsmeix>
Status: RESOLVED FIXED QA Contact: Johannes Meixner <jsmeix>
Severity: Normal    
Priority: P5 - None CC: martin, mpluskal, tchvatal
Version: 13.2   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 13.2   
URL: https://bugs.launchpad.net/hplip/+bug/1423220
Whiteboard:
Found By: Community User Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Email from Sanjay Kumar

Description John Hudson 2015-02-18 13:25:13 UTC
hplip 15.2 from Printing fails to install hp-toolbox correctly. Error message says cannot access CUPSEXT, check HPLIP installation.

Downgrading to 14.6 solves the problem.
Comment 1 Johannes Meixner 2015-02-18 14:18:33 UTC
I can reproduce it but I cannot debug it.

Even "hp-toolbox -ldebug" and also "journalctl -r"
and even also "hp-check -t" do not show
any bit more information except the poor
"warning: CUPSEXT could not be loaded. Please check HPLIP installation."

I cannot debug issues in HPLIP without more useful information.

We (i.e. openSUSE) distribute HP's HPLIP software
but we do not develop it.

In case of issues with HPLIP please report them directly to HP via
http://hplipopensource.com/hplip-web/support.html

Preferably post an URL to your upstream issue report here
as reference.
Comment 2 John Hudson 2015-02-18 15:22:00 UTC
Reported at https://bugs.launchpad.net/hplip/+bug/1423220
Comment 3 Johannes Meixner 2015-02-19 09:11:55 UTC
Many thanks for your upstream bug report!
Comment 4 John Hudson 2015-02-19 10:00:17 UTC
Created attachment 623829 [details]
Email from Sanjay Kumar

Attached instructions received from Sanjay Kumar. Did manual installation as advised. Main change was that the installation loaded cups from ~/Printing repo. All other dependencies satisfied by exising installed software.
Comment 5 Johannes Meixner 2015-02-19 11:53:56 UTC
I can confirm that with CUPS 1.7.5 RPMs installed
the HPLIP 3.15.2 packages from
http://download.opensuse.org/repositories/Printing/openSUSE_13.2/x86_64/
work on openSUSE 13.2

This proves that the issue is indeed not in our RPMs but in HPLIP.

Basically it seems HPLIP 3.15.2 does no longer work with CUPS 1.5.4.

This should be no real issue for the next openSUSE version
because the next openSUSE version will have CUPS 2.x, cf.
http://lists.opensuse.org/opensuse-factory/2015-02/msg00122.html

And for users who use HPLIP from the openSUSE build service
development project "Printing" the newest CUPS is also
provided there.

What is missing in our newest HPLIP RPMs is a RPM requirement
for the right minimal CUPS version, cf.
https://bugs.launchpad.net/hplip/+bug/1423220/comments/5
Comment 6 Bernhard Wiedemann 2015-02-19 13:00:07 UTC
This is an autogenerated message for OBS integration:
This bug (918387) was mentioned in
https://build.opensuse.org/request/show/286750 Factory / hplip
Comment 7 Johannes Meixner 2015-02-19 13:42:35 UTC
Tomas Chvatal,

I think there is a typo in your hplip.chnges entry
"- Version bump to 3.15.1:"

----------------------------------------------------------------------
$ osc rdiff -c106 Printing hplip
...
+Wed Feb 11 20:58:47 UTC 2015 - tchvatal@suse.com
+
+- Version bump to 3.15.1:
...
-Version:        3.14.10
+Version:        3.15.2
...
Binary files hplip-3.15.2.tar.gz (revision 106) added
...
Binary files hplip-3.14.10.tar.gz (revision 105) deleted
----------------------------------------------------------------------

I think it should read:

"- Version bump to 3.15.2:"
Comment 8 Tomáš Chvátal 2015-02-19 13:47:36 UTC
Yep, fixed.
Comment 9 Bernhard Wiedemann 2015-02-19 14:00:10 UTC
This is an autogenerated message for OBS integration:
This bug (918387) was mentioned in
https://build.opensuse.org/request/show/286764 Factory / hplip
Comment 10 Johannes Meixner 2015-02-19 14:05:30 UTC
Only optionally FYI regarding
"Add minimal version requirement on cups (currently 1.7)"
and
"Kill sle11 support as per min cups requirement"
see
https://bugs.launchpad.net/hplip/+bug/1423220

I think with a suse_version dependant BuildRequires
it should be possible to keep SLE11 support
and support for for all released openSUSE versions.

Up to openSUSE 13.2 we officially provide CUPS 1.5.4
so that a minimal version requirement for CUPS 1.7
means to drop support for all released openSUSE versions.
Comment 11 John Hudson 2015-02-19 17:13:36 UTC
Just to clarify one possible misunderstanding, I always have the ~/Printing repo in my list of repos. So I received the upgrade to hplip 3.15.2 as a result of this, not of any conscious decision to upgrade to 3.15.2.

The question is: why did I not receive the cups upgrade as well as I am permanently subscribed to this repo?
Comment 12 Johannes Meixner 2015-02-23 07:43:30 UTC
*** Bug 918828 has been marked as a duplicate of this bug. ***
Comment 13 Johannes Meixner 2015-02-23 14:55:43 UTC
Only an addendum FYI regarding
"why did I not receive the cups upgrade":

I don't know.

On my openSUSE 13.2 system it seems to work
(long lines are shown wrapped here):
----------------------------------------------------------------------------
# zypper ar
 http://download.opensuse.org/repositories/Printing/openSUSE_13.2/ Printing

# zypper -v update -r Printing -D --details
...
The following ... packages are going to be upgraded:
...
cups      1.5.4-165.1 -> 2.0.2-169.1 x86_64 Printing
 obs://build.opensuse.org/Printing
cups-client 1.5.4-165.1 -> 2.0.2-169.1 x86_64 Printing
 obs://build.opensuse.org/Printing
cups-libs 1.5.4-165.1 -> 2.0.2-169.1 x86_64 Printing
 obs://build.opensuse.org/Printing
----------------------------------------------------------------------------

I cannot answer questions regarding repositories, zypper,
or whatever else belongs to such things.
Comment 14 Johannes Meixner 2015-02-27 13:02:00 UTC
Via OBS submitrequest 288078 I tried to make HPLIP again build
correctly for released openSUSE versions and for SLE11.

The basic idea behind is to ensure also
in the Printing project what I wrote in
https://bugs.launchpad.net/hplip/+bug/1423220/comments/7
(excerpt)
--------------------------------------------------------------
ensures that the packages are built with the
CUPS version that is also provided in openSUSE.
--------------------------------------------------------------

The basic change in hplip.spec is
--------------------------------------------------------------------------
# HPLIP's Python module cupsext.so has a build-time
# dependancy on the CUPS version:
# It needs symbols (like ippFirstAttribute, ippNextAttribute,
# ippSetOperation etc)
# that are defined only in libcups.so version > 1.5.
# For backward compatibility
# cupsext.c has a macro (CUPS_VERSION_1_6) which defines
# those undefined function names
# if CUPS version is <= 1.5. To check the CUPS version
# the CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR
# macros from cups/cups.h are used which means it depends
# on the CUPS version during build-time
# whether or not cupsext will work with CUPS <= 1.5 at run-time.
# See https://bugs.launchpad.net/hplip/+bug/1423220
# and https://bugzilla.opensuse.org/show_bug.cgi?id=918387
# Therefore it BuildRequires the CUPS version as provided
# in the openSUSE/SLE versions.
# Up to openSUSE 13.2 and SLE11 CUPS < 1.6 is provided
# (from CUPS 1.3.9 for SLE11 up to CUPS 1.5.4 for openSUSE 13.2).
# For SLE12 by default CUPS 1.7.5 is provided and alternatively
# CUPS 1.5.4 is provided in the "legacy" module.
# After openSUSE 13.2 (i.e. for current openSUSE Factory)
# CUPS 2.0 is provided.
# Up to openSUSE 13.2 and SLE12 it BuildRequires CUPS < 1.6
# to ensure it even works on SLE12 with CUPS 1.5.4.
# When it was built with CUPS > 1.5 it must also require
# CUPS > 1.5 during run-time.
# In contrast when it was built with CUPS < 1.6 there
# must not be a run-time requirement
# for a CUPS version to ensure it works on SLE12 both
# with CUPS 1.7.5 and CUPS 1.5.4.
# For suse_version values see
# https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
%if 0%{?suse_version} > 1320
BuildRequires:  cups > 1.5
BuildRequires:  cups-devel > 1.5
Requires:       cups > 1.5
%else
BuildRequires:  cups < 1.6
BuildRequires:  cups-devel < 1.6
Requires:       cups
%endif
--------------------------------------------------------------------------
Comment 15 Johannes Meixner 2015-02-27 13:10:24 UTC
FYI regarding
"build correctly for released openSUSE versions and for SLE":

I enhanced and updated the description of the OBS "Printing" project
in particular I added (excerpt)
-----------------------------------------------------------------------
The main intent of the "Printing" project is to
provide the newest kind of base-printing software
for the newest openSUSE and Suse Linux Enterprise
versions and at the same time with same priority
to provide the same newest base-printing software
also for as many older/released openSUSE and
Suse Linux Enterprise versions as possible with
reasonable effort.
.
.
.
In the end all software in the "Printing" project
are only applications.
Your system shouldn't explode when you upgrade
with packages from the "Printing" project.
If a newer version does not work it should usually
help to downgrade to get it working again.
If there are issues with the packages in the
"Printing" project we appreciate issue reports.
In this case see "How to Report a Printing Issue" at
https://en.opensuse.org/SDB:How_to_Report_a_Printing_Issue
-----------------------------------------------------------------------
Comment 16 Johannes Meixner 2015-03-02 11:32:31 UTC
Only FYI:

I verified that now HPLIP is built in "Printing"
with the CUPS version that is by default available
in the particular openSUSE and SLE version:
----------------------------------------------------------------------------
$ for r in openSUSE_Tumbleweed openSUSE_Factory openSUSE_13.2 \
 openSUSE_13.1 SLE_11_SP3 ; do for a in i586 x86_64 ; do \
 echo $r $a ; osc rbl Printing hplip $r $a \
 | egrep -o 'cumulate cups.*|installing cups.*' ; done ; done
openSUSE_Tumbleweed i586
cumulate cups-libs-2.0.2-169.3
cumulate cups-devel-2.0.2-169.3
cumulate cups-client-2.0.2-169.3
cumulate cups-filters-ghostscript-1.0.58-38.3
cumulate cups-filters-foomatic-rip-1.0.58-38.3
cumulate cups-2.0.2-169.3
openSUSE_Tumbleweed x86_64
cumulate cups-libs-2.0.2-169.3
cumulate cups-devel-2.0.2-169.3
cumulate cups-client-2.0.2-169.3
cumulate cups-filters-ghostscript-1.0.58-38.3
cumulate cups-filters-foomatic-rip-1.0.58-38.3
cumulate cups-2.0.2-169.3
openSUSE_Factory i586
cumulate cups-libs-2.0.2-169.3
cumulate cups-devel-2.0.2-169.3
cumulate cups-client-2.0.2-169.3
cumulate cups-filters-ghostscript-1.0.58-38.3
cumulate cups-filters-foomatic-rip-1.0.58-38.3
cumulate cups-2.0.2-169.3
openSUSE_Factory x86_64
cumulate cups-libs-2.0.2-169.3
cumulate cups-devel-2.0.2-169.3
cumulate cups-client-2.0.2-169.3
cumulate cups-filters-ghostscript-1.0.58-38.3
cumulate cups-filters-foomatic-rip-1.0.58-38.3
cumulate cups-2.0.2-169.3
openSUSE_13.2 i586
cumulate cups-libs-1.5.4-21.3.1
cumulate cups-client-1.5.4-21.3.1
cumulate cups-devel-1.5.4-21.3.1
cumulate cups-filters-ghostscript-1.0.58-38.2
cumulate cups-filters-foomatic-rip-1.0.58-38.2
cumulate cups-1.5.4-21.3.1
openSUSE_13.2 x86_64
cumulate cups-libs-1.5.4-21.3.1
cumulate cups-client-1.5.4-21.3.1
cumulate cups-devel-1.5.4-21.3.1
cumulate cups-filters-ghostscript-1.0.58-38.2
cumulate cups-filters-foomatic-rip-1.0.58-38.2
cumulate cups-1.5.4-21.3.1
openSUSE_13.1 i586
cumulate cups-libs-1.5.4-12.1.3
cumulate cups-client-1.5.4-12.1.3
cumulate cups-devel-1.5.4-12.1.3
cumulate cups-1.5.4-12.1.3
openSUSE_13.1 x86_64
cumulate cups-libs-1.5.4-12.1.3
cumulate cups-client-1.5.4-12.1.3
cumulate cups-devel-1.5.4-12.1.3
cumulate cups-1.5.4-12.1.3
SLE_11_SP3 i586
installing cups-libs-1.3.9-8.46.46.1
installing cups-client-1.3.9-8.46.46.1
installing cups-devel-1.3.9-8.46.46.1
installing cups-1.3.9-8.46.46.1
SLE_11_SP3 x86_64
installing cups-libs-1.3.9-8.46.46.1
installing cups-client-1.3.9-8.46.46.1
installing cups-devel-1.3.9-8.46.46.1
installing cups-1.3.9-8.46.46.1
----------------------------------------------------------------------------

I also verified that for HPLIP 1.15.2 from "Printing"
on my openSUSE 13.2 system with its default CUPS 1.5.4
"python import cupsext" works:
----------------------------------------------------------------------------
# rpm -qi cups | grep '^Ve'
Version     : 1.5.4
Vendor      : openSUSE

# rpm -qi hplip | grep '^Ve'
Version     : 3.15.2
Vendor      : obs://build.opensuse.org/Printing

# python
Python 2.7.8 (default, Sep 30 2014, 15:34:38) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cupsext
>>> quit()
# 
----------------------------------------------------------------------------
(cf. https://bugs.launchpad.net/hplip/+bug/1423220)

Currently HPLIP does not build for SLE12 because
----------------------------------------------------------------------------
$ osc results -v -r SLE_12 Printing hplip              
SLE_12  x86_64  unresolvable: nothing provides cups-devel < 1.6
----------------------------------------------------------------------------
Currently SLE12 is not urgent - as time permits I will
work on it to also make it build correctly on SLE12...