Bug 971595 - add "prefix" into shared objects to do not conflict with various v8
add "prefix" into shared objects to do not conflict with various v8
Status: CLOSED ERRATA
Product: Red Hat Software Collections
Classification: Red Hat
Component: v8 (Show other bugs)
ruby193
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 1.1
Assigned To: Tomas Hrcka
Miroslav Hradílek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-06 17:24 EDT by John Matthews
Modified: 2017-02-27 09:42 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Some packages (mongodb,therubyracer) which requires libv8.so.3 could install v8 from different collection or install system library because it provides required shared object. Fix: Shared objects provided by v8 are suffixed with collection name: libv8.so.v8314 libv8.so.v8314-3 libv8.so.v8314-3.14.5 Result: Dependent collections use suffixed shared objects from v8314 scl
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-04 02:46:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Matthews 2013-06-06 17:24:46 EDT
Description of problem:
ruby193-v8 is interfering with RPM's default behavior for resolving a requires on mongodb.

mongodb requires 'libv8.so.3'

$ rpm -q --requires mongodb | grep v8
libv8.so.3()(64bit)  

yet during install of mongodb, RPM is seeing that 'ruby193-v8' provides this requirement, therefore the needed 'v8' package is not installed.



Version-Release number of selected component (if applicable):
ruby193-v8-3.10.8-7.el6_4.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Start from a fresh rhel 6.4 install
2. yum install ruby193-v8
3. yum install mongodb-server
Grab this from EPEL x86_64
or use this brew build https://brewweb.devel.redhat.com/buildinfo?buildID=271978
4. RPM should have resolved the requires on libv8.so.3 to 'v8' which installs this library in the default location for other packages.  

To go further and test mongo 
1. Now start mongodb
 service mongod start
2. Look at /var/log/mongodb/mongodb.log

Actual results:

rpm -qa | grep v8

v8 is not installed

and mongo fails to start

$ cat /var/log/mongodb/mongodb.log 
/usr/bin/mongod: error while loading shared libraries: libv8.so.3: cannot open shared object file: No such file or directory

Expected results:

v8 package is installed
and mongo starts


Additional info:
Comment 2 Marcela Mašláňová 2013-07-08 09:19:00 EDT
Possible solution might be to prefix all libraries by prefix same as the package has, for example postgresql has libpg.so.postgresql92-x.y.z.
I'm not sure if it's wise to prefix all libraries or do it automatically for all libraries in scl tool during build.

Anyway at this point I do not want to see rebuild of whole collections. I guess it's too late for such change of policy.
Comment 3 Marcela Mašláňová 2013-07-08 09:22:58 EDT
In mongodb case it might be fixed by adding Requires: nodejs010-v8. Does is work for you?
Comment 5 Honza Horak 2013-08-09 09:01:30 EDT
(In reply to Marcela Mašláňová from comment #3)
> In mongodb case it might be fixed by adding Requires: nodejs010-v8. Does is
> work for you?

I don't think it will work, since non-SCL mongodb needs non-SCL v8 library, so I'd say something like Requires: nodejs010-v8 is needed. Just my 2 cents, not tested nor deeply analysed.
Comment 6 Honza Horak 2013-08-12 04:57:45 EDT
(In reply to Honza Horak from comment #5)
> I don't think it will work, since non-SCL mongodb needs non-SCL v8 library,
> so I'd say something like Requires: nodejs010-v8 is needed. Just my 2 cents,
> not tested nor deeply analysed.

I wanted to suggest "Requires: v8", the above was the same what Marcela suggested (copy/paste mistake)
Comment 7 Marcela Mašláňová 2013-08-12 05:06:38 EDT
The best approach would be prefix also libraries (#971595).
Comment 8 Honza Horak 2013-08-12 06:02:48 EDT
(In reply to Marcela Mašláňová from comment #7)
> The best approach would be prefix also libraries (#971595).

That should probably be this one: bug #996025
Comment 9 Troy Dawson 2013-08-21 15:30:09 EDT
Until bug #996025 is completed, I have implemented a workaround for mongodb.
All of the SCL v8 packages provide ruby193-v8 or nodejs010-v8.  I have added "Requires: v8" to the mongodb spec file.  This has worked in all my testing using the SCL and non-SCL enviroments.
Comment 10 Marcela Mašláňová 2013-10-24 09:01:20 EDT
We plan to fix this issue by changing version of shared objects. From     libv8.so.3()(64bit) it will be libv8.so.nodejs010-3()(64bit).
Comment 14 errata-xmlrpc 2014-06-04 02:46:04 EDT
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/RHEA-2014-0607.html

Note You need to log in before you can comment on or make changes to this bug.