Bug 1085420

Summary: [fix available] LO incorrectly provides liblcms2.so.2
Product: Red Hat Enterprise Linux 6 Reporter: Patrick Bervoets <patrick.bervoets>
Component: libreofficeAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5CC: andreas.bierfert, contribs, dan, dtardon, gbenson, jkoten, jrzagar, patrick.bervoets, rdieter, sebastian, tpelka
Target Milestone: beta   
Target Release: 6.6   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 04:50:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Patrick Bervoets 2014-04-08 14:43:54 UTC
Description of problem:
Starting scribus gives error 
scribus: error while loading shared libraries: liblcms2.so.2: cannot open shared object file: No such file or directory

Version-Release number of selected component (if applicable):
Installed Packages
Name        : scribus
Arch        : x86_64
Version     : 1.4.3
Release     : 1.el6

How reproducible:
always

Steps to Reproduce:
1. yum install scribus --enablerepo=epel
2. scribus
3.

Actual results:
scribus: error while loading shared libraries: liblcms2.so.2: cannot open shared object file: No such file or directory

Expected results:
well... scribus opening

Additional info:
# whereis liblcms2.so.2
liblcms2.so:
# locate liblcms2.so.2
/usr/lib64/libreoffice/program/liblcms2.so.2
# ln -s /usr/lib64/libreoffice/program/liblcms2.so.2 /usr/lib64/liblcms2.so.2

After that scribus starts
and
# whereis liblcms2.so.2
liblcms2.so: /usr/lib64/liblcms2.so.2

So either the scribus rpm could make that softlink or there is a bug in libreoffice

Comment 1 François Cami 2014-04-08 14:54:56 UTC
hi Patrick,

I fail to understand what the cause of this could be, since scribus requires lcms2 which installs /usr/lib64/liblcms2.so.2 correctly.

Could you please send us the output of:
# rpm -q lcms2

And if the lcms2 package is not present, could you install it and report?

Comment 2 Patrick Bervoets 2014-04-08 17:02:23 UTC
François,

# rpm -q lcms2
package lcms2 is not installed

So this is the problem. But the yum install scribus --enablerepo=epel never asked for lcms2.
I guess because libreoffice installed liblcms2.so.2 (although in a different location) How does yum decides lcms2 is (not) needed?

As a sidenote: I always install with yum; even if I have to install rpm's (like OracleClient).
 
I even did a yum reinstall scribus to be sure before attempting the softlink-trick.

yum is using priorities and the epel-repo is not enabled by default.

Comment 3 Dan Horák 2014-04-08 17:13:42 UTC
Sounds this the same problem as in bug 1062007 and you are providing more insight into the problem. Very likely the libreoffice package didn't properly filtered its list of Provides and the libcms2 dependency for scribus is satisfied by the LO internal one.

Comment 4 Dan Horák 2014-04-08 17:15:29 UTC
Can you run rpm -qf /usr/lib64/libreoffice/program/liblcms2.so.2
so we can what owns the file?

Comment 5 Dan Horák 2014-04-08 17:17:44 UTC
*** Bug 1062007 has been marked as a duplicate of this bug. ***

Comment 6 Patrick Bervoets 2014-04-08 17:42:01 UTC
# rpm -qf /usr/lib64/libreoffice/program/liblcms2.so.2
libreoffice-core-4.0.4.2-9.el6.x86_64

Comment 7 Dan Horák 2014-04-08 17:57:56 UTC
Thanks, I can confirm the same problem is in RHEL-6.

Comment 8 Rex Dieter 2014-04-08 17:59:30 UTC
OK, definitely a rhel6/libreoffice bug then.  It is bundling a copy of liblcms2 and erroneously exposing it as a provided dependency (it needs to filter it from Provides).

Comment 9 Dan Horák 2014-04-08 18:01:17 UTC
LO doesn't filter Provides for private copies of various libraries causing broken deps in other packages.

Comment 10 Dan Horák 2014-04-08 18:24:49 UTC
something like 

%filter_provides_in %{_libdir}/libreoffice/program
%filter_setup

is required in the spec file

Comment 11 Dan Horák 2014-04-08 18:26:29 UTC
(In reply to Patrick Bervoets from comment #2)
> François,
> 
> # rpm -q lcms2
> package lcms2 is not installed

The workaround is to manually install the lcms2 package. Or uninstall LO :-)

Comment 12 Patrick Bervoets 2014-04-08 18:32:53 UTC
OK, I'll take the first option.
Thank you very much.

Comment 13 RHEL Program Management 2014-04-10 16:51:04 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 14 David Tardon 2014-04-12 18:16:22 UTC
(In reply to Dan Horák from comment #10)
> something like 
> 
> %filter_provides_in %{_libdir}/libreoffice/program
> %filter_setup
> 
> is required in the spec file

Nice idea, but it does not work. It takes care of the provides, but it leaves requires in place, so the resulting rpms are broken. And filtering the requires too removes all requires, including these for system libs.

I will have to do that on file-by-file basis, if possible. Or rename the libraries, like we have already done for bundled redland.

Comment 16 David Tardon 2014-04-13 10:16:46 UTC
Fortunately most of the bundled libs are built statically, so the only ones that must be fixed are lcms2, clucene and firebird. We already add a suffix to redland, raptor and rasqal libs (bug 809466), so these are not a problem.

Comment 17 David Tardon 2014-04-13 14:50:39 UTC
%filter_from_provides combined with %filter_from_requires does the trick

Comment 19 Dan Horák 2014-05-01 12:15:17 UTC
*** Bug 1093328 has been marked as a duplicate of this bug. ***

Comment 21 errata-xmlrpc 2014-10-14 04:50:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1423.html