Bug 2224366 - MUSIC is not compatible with Cython 3
Summary: MUSIC is not compatible with Cython 3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: MUSIC
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2246998 2251973
Blocks: DROP_CYTHON_0.29
TreeView+ depends on / blocked
 
Reported: 2023-07-20 14:41 UTC by Ben Beasley
Modified: 2023-12-13 08:41 UTC (History)
3 users (show)

Fixed In Version: MUSIC-1.2.1-3.fc40
Clone Of:
Environment:
Last Closed: 2023-12-13 08:41:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources MUSIC pull-request 4 0 None None None 2023-12-12 13:48:39 UTC
Github INCF MUSIC issues 77 0 None open Cython 3 compatbility 2023-11-20 13:23:15 UTC
Github cython cython issues 5818 0 None closed [BUG] float(string): error: invalid cast from type ‘std::string’ to type ‘PyObject*’ 2023-11-20 13:23:15 UTC

Description Ben Beasley 2023-07-20 14:41:20 UTC
Description of problem:

MUSIC is not compatible with Cython 3

Version-Release number of selected component (if applicable): 1.1.16-11.20201002git8c6b77a.fc39


How reproducible:


Steps to Reproduce:
1. Ensure the spec file does not upper-bound the Cython version
2. Build the package

Actual results:

[1/1] Cythonizing pybuffer.pyx
make[2]: Leaving directory '/builddir/build/BUILD/MUSIC-8c6b77a5780c0c66191aa7e8f07f9d33614dcc16/MUSIC-8c6b77a5780c0c66191aa7e8f07f9d33614dcc16-mpich/pymusic'
/usr/lib64/python3.12/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /builddir/build/BUILD/MUSIC-8c6b77a5780c0c66191aa7e8f07f9d33614dcc16/MUSIC-8c6b77a5780c0c66191aa7e8f07f9d33614dcc16-mpich/pymusic/pybuffer.pxd
  tree = Parsing.p_module(s, pxd, full_module_name)
warning: pyconfig.pxi:1:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: pybuffer.pxd:8: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

Error compiling Cython file:
------------------------------------------------------------
...
            raise TypeError("object does not present buffer interface")

        cdef Py_buffer* pybuf = &self.pybuf
        PyObject_GetBuffer(data, pybuf, bufflags)
        self.dtype = TypeDict[getformat(pybuf)]
        self.items = pybuf.len / pybuf.itemsize
                               ^
------------------------------------------------------------

pybuffer.pyx:63:31: Cannot assign type 'double' to 'Py_ssize_t'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python3.12/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
    cythonize_one(*args)
  File "/usr/lib64/python3.12/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: pybuffer.pyx


Expected results:

Package builds with Cython 3.

Additional info:

This is probably pretty straightforward to fix. I’m not looking into it right now, though, and I have not attempted to report it upstream. I do not know if this is fixed in the latest release, bug 2224362; I doubt it.

Comment 1 Ben Beasley 2023-07-20 14:46:54 UTC
PR to pin the Cython version and use the compat package for now: https://src.fedoraproject.org/rpms/MUSIC/pull-request/2

Comment 2 Fedora Release Engineering 2023-08-16 07:19:48 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 3 Ankur Sinha (FranciscoD) 2023-11-20 13:23:16 UTC
We need to wait for the new cython 3.0.6 version from the looks of it.

Comment 4 Miro Hrončok 2023-12-11 15:56:17 UTC
 - we need Cython 3.0.6 (bz2251973)
 - we need https://github.com/INCF/MUSIC/commit/f007845154d21613935186d0bbd1557ad6c23728
 - this package FTBFS with openmpi 5 anyway (bz2246998)

Comment 5 Fedora Update System 2023-12-13 08:35:08 UTC
FEDORA-2023-0a19676e01 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-0a19676e01

Comment 6 Fedora Update System 2023-12-13 08:41:08 UTC
FEDORA-2023-0a19676e01 has been pushed to the Fedora 40 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.