Bug 1865294

Summary: python-javabridge: FTBFS in Fedora rawhide/f33
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: python-javabridgeAssignee: Raphael Groner <projects.rg>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: cstratak, projects.rg
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-javabridge-1.0.19-1.fc34, python-javabridge-1.0.19-1.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-08 20:22:44 UTC 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: 1785415, 1803234    
Attachments:
Description Flags
build.log none

Description Fedora Release Engineering 2020-08-03 20:50:24 UTC
python-javabridge failed to build from source in Fedora rawhide/f33

https://koji.fedoraproject.org/koji/taskinfo?taskID=48350842


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Please fix python-javabridge at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
python-javabridge will be orphaned. Before branching of Fedora 34,
python-javabridge will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://fedoraproject.org/wiki/Fails_to_build_from_source

Comment 1 Fedora Release Engineering 2020-08-03 20:50:25 UTC
Created attachment 1709058 [details]
build.log

Comment 2 Raphael Groner 2020-08-04 07:17:47 UTC
Relevant snippet from build.log:

In file included from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                 from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from _javabridge.c:610:
/usr/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
_javabridge.c:615:10: fatal error: jni.h: No such file or directory
  615 | #include "jni.h"
      |          ^~~~~~~

Is JNI not available with Java 11 as in Fedora 33?

Comment 3 Raphael Groner 2020-08-04 09:18:32 UTC
An easy fix could be to explicitly set JAVA_HOME environment variable to let skip the hackery code for trying to find the java binary with version in path.
https://github.com/LeeKamentsky/python-javabridge/blob/master/javabridge/locate.py#L71
https://github.com/LeeKamentsky/python-javabridge/blob/master/setup.py#L85

Comment 4 Raphael Groner 2020-08-04 09:23:56 UTC
export JAVA_HOME=%{_prefix}/lib/jvm/java

Comment 5 Ben Cotton 2020-08-11 15:06:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 6 Charalampos Stratakis 2020-09-07 16:34:08 UTC
(In reply to Raphael Groner from comment #4)
> export JAVA_HOME=%{_prefix}/lib/jvm/java

PR: https://src.fedoraproject.org/rpms/python-javabridge/pull-request/1

Comment 7 Raphael Groner 2020-09-08 05:02:16 UTC
Thanks. Are there any other rebuilds for branches or bodhi updates needed?

Comment 8 Charalampos Stratakis 2020-09-08 11:15:12 UTC
(In reply to Raphael Groner from comment #7)
> Thanks. Are there any other rebuilds for branches or bodhi updates needed?

F33 as well as it failed to build there also.

Comment 9 Fedora Update System 2020-09-08 20:22:44 UTC
FEDORA-2020-cb0a399bf1 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.