Bug 2325194 - libnvme fails to build with Python 3.14: /usr/include/python3.14/pyport.h:629:35: error: missing ')' after "__has_attribute"
Summary: libnvme fails to build with Python 3.14: /usr/include/python3.14/pyport.h:629...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libnvme
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Bžatek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2024-11-11 14:04 UTC by Karolina Surma
Modified: 2025-03-03 14:34 UTC (History)
4 users (show)

Fixed In Version: libnvme-1.11.1-3.fc43
Clone Of:
Environment:
Last Closed: 2025-03-03 14:34:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2024-11-11 14:04:02 UTC
libnvme fails to build with Python 3.14.0a1.

In file included from /usr/include/python3.14/Python.h:63,
                 from libnvme/nvme_wrap.c:203:
/usr/include/python3.14/pyport.h:629:35: error: missing ')' after "__has_attribute"
  629 | #if _Py__has_attribute(fallthrough)
      |                                   ^
/builddir/build/BUILD/libnvme-1.11-build/libnvme-1.11/redhat-linux-build/internal/config.h:62:35: error: missing binary operator before token "("
   62 | #define fallthrough __attribute__((__fallthrough__))
      |                                   ^

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08195515-libnvme/

For all our attempts to build libnvme with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/libnvme/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Tomáš Bžatek 2024-11-28 13:03:37 UTC
Uhm, yes please, a patch would be welcome to move forward. I'm kinda overwhelmed by the amount of work at the moment (although still NVMe, different area).

Comment 2 Miro Hrončok 2024-11-29 15:16:16 UTC
libnvme has #define fallthrough, Python 3.14 uses __attribute__((fallthrough)) now https://github.com/python/cpython/commit/12af8ec864225248c3d2916cb142a5e7ee36cbe2

Victor, does this create an incompatibility of the two codebases?

Comment 3 Victor Stinner 2024-12-02 15:38:27 UTC
> Victor, does this create an incompatibility of the two codebases?

Correct. If libnvme defines a "fallthrough" macro, the "#if _Py__has_attribute(fallthrough)" test in Python cannot work.

libnvme should undefine the "fallthrough" macro before including <Python.h>.

Comment 4 Aoife Moloney 2025-02-26 13:15:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 5 Tomáš Bžatek 2025-03-03 14:34:17 UTC
Fix available as libnvme-1.11.1-3.fc43
Feel free to reopen in case of any related issues.


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