Bug 2034149 - scidavis fails to build with Python 3.11: fatal error: eval.h: No such file or directory
Summary: scidavis fails to build with Python 3.11: fatal error: eval.h: No such file ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: scidavis
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alexander Ploumistos
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2021-12-20 08:37 UTC by Tomáš Hrnčiar
Modified: 2022-02-11 01:21 UTC (History)
5 users (show)

Fixed In Version: scidavis-2.7-1.fc35
Clone Of:
Environment:
Last Closed: 2022-02-11 01:21:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch that fixes building against Python 3.11 (1.42 KB, patch)
2021-12-20 22:29 UTC, Alexander Ploumistos
no flags Details | Diff

Description Tomáš Hrnčiar 2021-12-20 08:37:11 UTC
scidavis fails to build with Python 3.11.0a3.

/builddir/build/BUILD/scidavis-2.4.0/libscidavis/src/PythonScripting.cpp:35:10: fatal error: eval.h: No such file or directory
   35 | #include <eval.h>
      |          ^~~~~~~~
compilation terminated.

The non-limited API files cellobject.h, classobject.h, context.h,
funcobject.h, genobject.h and longintrepr.h have been moved to the
Include/cpython directory. Moreover, the eval.h header file was removed. These
files must not be included directly, as they are already included in Python.h:
Include Files. If they have been included directly, consider including Python.h
instead.
(Contributed by Victor Stinner in bpo-35134.)

https://bugs.python.org/issue35134
https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03054543-scidavis/

For all our attempts to build scidavis with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/scidavis/

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.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
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 Alexander Ploumistos 2021-12-20 22:29:31 UTC
Created attachment 1847140 [details]
patch that fixes building against Python 3.11

I figured a couple of things out, but mostly I "reused" code from another project that made similar modifications in preparation of the Python 3.11 release. Could someone please review it so I can send it upstream? I understand about half of it… Is the version check correct (>= 3.9), or should that be 3.11 (or some other version)? Can I use regular "if" blocks?

With these changes I was able to build SciDAVis locally (using the fedora-rawhide-python311 config) and it also builds on F35 and F36:
https://koji.fedoraproject.org/koji/taskinfo?taskID=80251993
https://koji.fedoraproject.org/koji/taskinfo?taskID=80252006

Comment 2 Alexander Ploumistos 2021-12-22 02:51:47 UTC
After reading about null directives in C/C++, I now understand what the # was doing there.
I do still need someone to go over the patch before I submit it upstream and a clarification about the minimum supported version. If that were possible by the end of the week, when I'll have more time to work on rebuilds and stuff, I would be extremely grateful.

Comment 3 Tomáš Hrnčiar 2021-12-22 10:22:23 UTC
The version check (>= 3.9) is correct and overall the patch LGTM. I think, you can propose it to upstream as it is.

Comment 4 Alexander Ploumistos 2021-12-22 10:45:16 UTC
Thanks a lot Tomáš, I will submit it as soon as I get a moment to breathe.

Happy holidays and a happy new year!

Comment 5 Tomáš Hrnčiar 2021-12-22 12:24:38 UTC
Thank you, Alexander, I wish you all the best to you as well :).

Comment 6 Fedora Update System 2022-02-02 22:37:09 UTC
FEDORA-2022-91e0bfad28 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-91e0bfad28

Comment 7 Fedora Update System 2022-02-03 01:35:56 UTC
FEDORA-2022-91e0bfad28 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-91e0bfad28`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-91e0bfad28

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

Comment 8 Ben Cotton 2022-02-08 20:18:46 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 9 Fedora Update System 2022-02-11 01:21:16 UTC
FEDORA-2022-91e0bfad28 has been pushed to the Fedora 35 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.