Bug 2272966 - python-jnius: FTBFS in Fedora Rawhide
Summary: python-jnius: FTBFS in Fedora Rawhide
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-jnius
Version: 41
Hardware: Unspecified
OS: Linux
medium
urgent
Target Milestone: ---
Assignee: Raphael Groner
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
: 2266683 2291748 (view as bug list)
Depends On:
Blocks: F41FTBFS F41FailsToInstall F42FailsToInstall PYTHON3.13 F41FinalFreezeException 2262141
TreeView+ depends on / blocked
 
Reported: 2024-04-03 13:35 UTC by Karolina Surma
Modified: 2024-10-12 00:19 UTC (History)
5 users (show)

Fixed In Version: python-jnius-1.6.1-5.fc41
Clone Of:
Environment:
Last Closed: 2024-10-12 00:19:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2024-04-03 13:35:02 UTC
Description of problem:
Package python-jnius fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
1.6.1-1.fc41

Steps to Reproduce:
koji build --scratch f41 python-jnius-1.6.1-1.fc41.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/python-jnius

Reproducible: Always

Actual Results:  
[1/1] Cythonizing jnius/jnius.pyx
building 'jnius' extension
creating build/temp.linux-x86_64-cpython-312
creating build/temp.linux-x86_64-cpython-312/jnius
/usr/bin/clang -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -I/usr/lib/jvm/java-21-openjdk-21.0.2.0.13-3.fc41.x86_64/include -I/usr/lib/jvm/java-21-openjdk-21.0.2.0.13-3.fc41.x86_64/include/linux -I/usr/include/python3.12 -c jnius/jnius.c -o build/temp.linux-x86_64-cpython-312/jnius/jnius.o
clang: error: unsupported argument 'gnu2' to option '-mtls-dialect=' for target 'x86_64-redhat-linux-gnu'
error: command '/usr/bin/clang' failed with exit code 1

Comment 1 Raphael Groner 2024-04-15 19:13:09 UTC
gcc (as clang alternative) is b0rken as well due to Cython 3 issue.

Comment 2 Raphael Groner 2024-04-15 19:15:26 UTC
*** Bug 2266683 has been marked as a duplicate of this bug. ***

Comment 3 Karolina Surma 2024-06-12 15:03:08 UTC
*** Bug 2291748 has been marked as a duplicate of this bug. ***

Comment 4 Karolina Surma 2024-09-04 14:55:59 UTC
This package has failed to build with Python 3.13 so far. Fedora 41 is already in the Beta Freeze phase. What's your plan going forward? Will the package be fixed in time for the Final Freeze of Fedora 41 (planned on Oct 15th 2024)?
If you don't plan or can't fix the package before Fedora 41 goes into the Final Freeze phase, please retire the package. You can unretire it anytime during the Fedora 41 lifecycle - doing this now will simply ensure that we don't release Fedora with a broken package. Thank you!

Comment 5 Raphael Groner 2024-09-18 10:11:07 UTC
Upstream dropped support for python 2.x generally and 3.7 so recommends 3.8 at least.

Let me try new builds for F40+. Pastly knwon there were some issues within modifications of Python ABI used to interact bridge to J*. Retire is not needed currently.

.

Comment 6 Miro Hrončok 2024-09-27 10:15:22 UTC
> Let me try new builds...

Hey Raphael, any luck with that?

Will the package be fixed in time for the Final Freeze of Fedora 41 (planned on Oct 15th 2024)?

Comment 7 Raphael Groner 2024-10-06 16:17:16 UTC
(In reply to Miro Hrončok from comment #6)
> Will the package be fixed in time for the Final Freeze of Fedora 41 (planned
> on Oct 15th 2024)?

Urgent? FTR is that Cython issue fixed meanwhile as mentioned in comment #1? I fail to remember details.

(In reply to Raphael Groner from comment #1)
> gcc (as clang alternative) is b0rken as well due to Cython 3 issue.

Comment 8 Miro Hrončok 2024-10-06 18:04:03 UTC
Yes, urgent. The final freeze is ~1 week.

I don't understand what the "Cython issue" you mentioned in that comment is. Currently, the package fails (according to Koschei) with:

=================================== FAILURES ===================================
____________________ ReflectTest.test_hierharchy_arraylist _____________________
self = <test_reflect.ReflectTest testMethod=test_hierharchy_arraylist>
    def test_hierharchy_arraylist(self):
        d = identify_hierarchy_dict(find_javaclass("java.util.ArrayList"), 0, True)
        self.assertContains(d, "java.util.ArrayList")# concrete
        self.assertContains(d, "java.util.AbstractCollection")# superclass
        self.assertContains(d, "java.util.Collection")# interface
        self.assertContains(d, "java.lang.Iterable")# interface
        self.assertContains(d, "java.lang.Object")# root
        maxLevel = max(d.values())
>       self.assertEqual(d["java.lang.Object"], maxLevel)
E       AssertionError: 3 != 4
test_reflect.py:38: AssertionError
=========================== short test summary info ============================
FAILED test_reflect.py::ReflectTest::test_hierharchy_arraylist - AssertionErr...
======================== 1 failed, 164 passed in 1.06s =========================

Comment 9 Raphael Groner 2024-10-07 16:40:38 UTC
Indeed, that's a new bug but now within java. Test case checks for inheritance order, so JVM has actually changed internally handling of interface implementation, e.g. Collection and Iterable as interfaces especially mentioned. Worth to get reported to upstream, there isn't Java SE 17 used as it seems. 

Meanwhile I'd suggest to ignore and so disable that test method or at least skip by commenting failed AssertEquals line, doable with a small patch. As far as I can see shortly there's nothing wrong with functionality according to documentation, just test case needs some refactoring.

java.lang.Object
 java.util.AbstractCollection<E>
  java.util.AbstractList<E>
   java.util.ArrayList<E>

Type Parameters:
    E - the type of elements in this list

All Implemented Interfaces:
    Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess 

https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/ArrayList.html

Please let me know if any other build failure.

Comment 11 Fedora Update System 2024-10-09 09:11:32 UTC
FEDORA-2024-1b27e861e4 (python-jnius-1.6.1-5.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-1b27e861e4

Comment 12 Fedora Update System 2024-10-10 03:16:56 UTC
FEDORA-2024-1b27e861e4 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-1b27e861e4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-1b27e861e4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2024-10-12 00:19:27 UTC
FEDORA-2024-1b27e861e4 (python-jnius-1.6.1-5.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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