Bug 2254033
| Summary: | python-jnius uses Cython 0.29 to build, please update to Cython 3 - upstream release 1.6.1 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
| Component: | python-jnius | Assignee: | Raphael Groner <projects.rg> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | projects.rg, python-packagers-sig, releng |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-jnius-1.6.1-1.fc41 python-jnius-1.6.1-1.fc40 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2024-02-26 15:22:34 UTC | Type: | Bug |
| 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: | 1996356, 2231791, 2254029, 2261576 | ||
|
Description
Miro Hrončok
2023-12-11 16:08:41 UTC
Thanks for letting me know about deprecated CPython. Patches welcome, could you provide a Pull Request for review? I'll provide a new build ASAP. By the way, there's release 1.6.1 available. Is that patch for CPython included? https://github.com/kivy/pyjnius/releases/tag/1.6.1 s/CPython/Cython/g Updating to 1.6.0+ should include this, yes. This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle. Changing version to 40. I plan to retire Cython 0.29 in Fedora 41 next week. Let me know if I should wait. How to fix those errors generated from Cython and restrictive gcc options. running build_ext warning: jnius/jnius.pyx:102:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310 Compiling jnius/jnius.pyx because it changed. [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 gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -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 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -I/usr/lib/jvm/java-17-openjdk-17.0.10.0.7-1.fc40.x86_64/include -I/usr/lib/jvm/java-17-openjdk-17.0.10.0.7-1.fc40.x86_64/include/linux -I/usr/include/python3.12 -c jnius/jnius.c -o build/temp.linux-x86_64-cpython-312/jnius/jnius.o jnius/jnius.c: In function ‘__pyx_f_5jnius_get_jnienv’: jnius/jnius.c:22570:76: error: passing argument 2 of ‘(*__pyx_v_5jnius_jvm)->AttachCurrentThread’ from incompatible pointer type [-Wincompatible-pointer-types] 22570 | (void)((__pyx_v_5jnius_jvm[0])->AttachCurrentThread(__pyx_v_5jnius_jvm, (&__pyx_v_env), NULL)); | ~^~~~~~~~~~~~~ | | | const struct JNINativeInterface_ *** jnius/jnius.c:22570:76: note: expected ‘void **’ but argument is of type ‘const struct JNINativeInterface_ ***’ jnius/jnius.c: In function ‘__pyx_f_5jnius_convert_jstring_to_python’: jnius/jnius.c:31003:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 31003 | __pyx_v_j_chars = (__pyx_v_j_env[0])->GetStringChars(__pyx_v_j_env, __pyx_v_j_string, NULL); | ^ jnius/jnius.c: In function ‘__pyx_pf_5jnius_13MetaJavaClass_8resolve_class’: jnius/jnius.c:43717:30: error: assignment to ‘jobject’ {aka ‘struct _jobject *’} from incompatible pointer type ‘struct _jobject **’ [-Wincompatible-pointer-types] 43717 | (__pyx_v_jargs[0]) = ((jobject *)__pyx_v_classLoader); | ^ jnius/jnius.c:43726:30: error: assignment to ‘jobject’ {aka ‘struct _jobject *’} from incompatible pointer type ‘struct _jobject **’ [-Wincompatible-pointer-types] 43726 | (__pyx_v_jargs[1]) = __pyx_v_interfaces; | ^ jnius/jnius.c: In function ‘__pyx_f_5jnius_create_proxy_instance’: jnius/jnius.c:61433:36: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 61433 | (__pyx_v_invoke_methods[0]).name = ((char const *)"invoke0"); | ^ jnius/jnius.c:61442:41: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 61442 | (__pyx_v_invoke_methods[0]).signature = ((char const *)"(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;"); | ^ error: command '/usr/bin/gcc' failed with exit code 1 This is a known issue in Cython. https://github.com/cython/cython/issues/2747 As a workaround set %global build_type_safety_c 2 See e.g. https://src.fedoraproject.org/rpms/python-lxml/c/0f5102956846f0396780ac3ff116c20795dbbf89?branch=rawhide (In reply to Miro Hrončok from comment #7) > This is a known issue in Cython. https://github.com/cython/cython/issues/2747 Bummer, again with enthusiastic update maniac, often seen with gcc while ignoring mass rebuilds for prior tests. /rant When reading through similiar comments, other distro uses clang replacement with lxml and maybe similiarly some downgrade option with also clang for pyjnius is alternative workaround. Proposed build_type_safety_c shows actually as ugly (but working) hack for me. Doubtful gcc 14 can foreseeable revert that faulty default setting. FEDORA-2024-6e03f90a4f (python-jnius-1.6.1-1.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-6e03f90a4f FEDORA-2024-6e03f90a4f (python-jnius-1.6.1-1.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report. *** Bug 2261576 has been marked as a duplicate of this bug. *** FEDORA-2024-c6133f5811 (python-jnius-1.6.1-1.fc40) has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-c6133f5811 FEDORA-2024-c6133f5811 (python-jnius-1.6.1-1.fc40) has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report. For the record, the cython+gcc14 problem has a workaround currently proposed at https://src.fedoraproject.org/rpms/Cython/pull-request/57 |