Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 449456

Summary: Make Java shared libraries like libjvm.so available for linking
Product: [Fedora] Fedora Reporter: Felix Schwarz <fschwarz>
Component: java-1.8.0-openjdkAssignee: Andrew John Hughes <ahughes>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: ahughes, dbhole, i, jerboaa, jos, jvanek, k.georgiou, lkundrak, ludovico.cavedon, mail, mizdebsk, mjw, msrb, omajid, orion, ppisar, rruss, sochotni
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 449360, 740897    

Description Felix Schwarz 2008-06-02 18:19:10 UTC
Currently libjvm.so and libjava.so are not mentioned in /etc/ld.so.conf.d.
Therefore it is not possible to write software which has to link against these
libraries without using rpath or dlopen.

This blocks packages like python-jcc from entering Fedora (bug 449360). 

See http://thread.gmane.org/gmane.linux.redhat.fedora.devel/85542 for a
discussion of these topics on fedora-devel.

Comment 2 Christopher Meng 2013-09-26 06:00:35 UTC
Hi, any news here?

It blocks a python module ;)

Comment 3 Deepak Bhole 2013-09-30 19:22:21 UTC
Some alternatives magic may be needed in addition to making it appear in ld.so.conf.d

Assigning to Jiri to investigate.

Comment 4 Omair Majid 2014-03-12 14:25:23 UTC
This is still a problem.

I was just pointed to the `mesos` package. This needs to link against a libjvm.so. Currently it does:

$ readelf --dynamic ./usr/lib64/libmesos-0.18.0.so.0 | grep jvm
 0x0000000000000001 (NEEDED)             Shared library: [libjvm.so]
 0x000000000000000f (RPATH)              Library rpath: [/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.5.0.6.pre02.fc21.x86_64/jre/lib/amd64/server]

So it hardcodes a path that will change on updates. And it will always use openjdk 7.

Also, yum only see the dependency on libjvm.so and selects java-1.8.0-openjdk (!) to provide that dependency. For some reason java-1.7.0-openjdk does not provide 'libjvm.so' (but it does provide 'libjvm.so()(64bits)'.

Comment 5 Mikolaj Izdebski 2014-03-19 15:51:39 UTC
Fedora allows installation of multiple JVMs, which are selectable by various configuration files (/etc/java.conf, ~/.java/java.conf, per-application config files, ...).  Applications shouldn't link directly to default libjvm.so, but rather link dynamically to libjvm.so loaded from configured $JAVA_HOME.  dlopen() is the right way to go.

Comment 6 Petr Pisar 2014-06-27 05:31:02 UTC
The problem is the libjvm.so does not reside in $JAVA_HOME. It lives somewhere deep in the directory tree and the exact location differs for each JDK version and platform.

Comment 7 Andrew John Hughes 2016-05-11 22:39:20 UTC
Moving this to the current version of OpenJDK.

Comment 8 Andrew John Hughes 2016-05-11 22:40:21 UTC
*** Bug 740762 has been marked as a duplicate of this bug. ***