Bug 449360

Summary: Review Request: python-jcc - C++ code generator for calling Java from C++/Python
Product: [Fedora] Fedora Reporter: Felix Schwarz <fschwarz>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, jos, k.georgiou, ludovico.cavedon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-27 06:35:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 449456    
Bug Blocks:    

Description Felix Schwarz 2008-06-02 12:19:14 UTC
Spec URL:
http://www.felix-schwarz.name/files/misc/2008/python-jcc/1.9-4/python-jcc.spec

SRPM URL: http://www.felix-schwarz.name/files/misc/2008/python-jcc/1.9-4/python-jcc-1.9-4.fc9.src.rpm

Description: 
JCC is a C++ code generator for producing the glue code necessary to call
into Java classes from CPython via Java's Native Invocation Interface (JNI).

JCC generates C++ wrapper classes that hide all the gory details of JNI
access as well Java memory and object reference management.

JCC generates CPython types that make these C++ classes accessible from a
Python interpreter. JCC attempts to make these Python types pythonic by
detecting iterators and property accessors. Iterators and mappings may also
be declared to JCC.


Special notes:
This package is not perfect yet but I need some input from other developers.

The main problem is that it uses rpath. This is because java-1.6.0-openjdk does add libjvm.so and libjava.so to the general linker config in /etc/ld.so.conf.d/.  What should we do in this case?

Comment 1 Felix Schwarz 2014-06-27 06:35:21 UTC
It doesn't make sense to keep this bug open when Fedora's OpenJDK package does not have the necessary capabilities. The bug is more than 6 years old so the spec file is of course completely out of date.

Comment 2 Jos Vos 2018-10-26 11:58:38 UTC
Is this still representing the actual status?

I just did a "pip install jcc" in a F29 beta Python3 virtualenv with java-1.8.0-openjdk-devel installed and that seems to work (I only did some simple tests).

I had to do a "export JCC_JDK=/usr/lib/jvm/java-1.8.0-openjdk", which might be a problem as it might tie the jcc to the specific libjava.so and libjvm.so, but I didn't dig into the details.

Comment 3 Felix Schwarz 2018-10-26 12:29:58 UTC
> Is this still representing the actual status?

I don't really know as I stopped using python-jcc years ago (now using plain ElasticSearch).

However I had a quick look into JCC-3.3: setup.py uses "rpath" and (on F28) neither libjvm nor libjava are available via /etc/ld.so.conf.d.

Please note that this is only a limitation for proper Fedora packaging (using "rpath" is forbidden) and for binary wheels (where you create the wheel e.g. on Fedora and want to use it in another Linux distro like Ubuntu).

If you compile the tar.gz directly on the target machine (or you carefully ensure that the machine has exactly the same versions available as the build host) everything will probably work fine.