Bug 2083977 - sigil fails to build with Python 3.11: error: expected primary-expression before '(' token
Summary: sigil fails to build with Python 3.11: error: expected primary-expression bef...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sigil
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Horák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F38FTBFS PYTHON3.11 F37FTBFS
TreeView+ depends on / blocked
 
Reported: 2022-05-11 07:17 UTC by Tomáš Hrnčiar
Modified: 2022-09-19 00:19 UTC (History)
4 users (show)

Fixed In Version: sigil-0.9.14-14.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-19 00:19:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-05-11 07:17:39 UTC
sigil fails to build with Python 3.11.0b1.

/builddir/build/BUILD/Sigil-0.9.14/src/Misc/EmbeddedPython.cpp:217:23: warning: 'void PyEval_InitThreads()' is deprecated [-Wdeprecated-declarations]
  217 |     PyEval_InitThreads();
      |     ~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/python3.11/Python.h:95,
                 from /builddir/build/BUILD/Sigil-0.9.14/src/Misc/EmbeddedPython.h:26,
                 from /builddir/build/BUILD/Sigil-0.9.14/src/Misc/EmbeddedPython.cpp:23:
/usr/include/python3.11/ceval.h:132:37: note: declared here
  132 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
      |                                     ^~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/Sigil-0.9.14/src/Misc/EmbeddedPython.cpp: In member function 'QVariant EmbeddedPython::PyObjectToQVariant(PyObject*, bool)':
/builddir/build/BUILD/Sigil-0.9.14/src/Misc/EmbeddedPython.cpp:459:27: error: expected primary-expression before '(' token
  459 |             res = QVariant(QString::fromLatin1(reinterpret_cast<const char *>PyUnicode_1BYTE_DATA(po), -1));
      |                           ^
In file included from /usr/include/python3.11/Python.h:38:
/usr/include/python3.11/pyport.h:28:39: error: expected '(' before 'static_cast'
   28 | #  define _Py_STATIC_CAST(type, expr) static_cast<type>(expr)
      |                                       ^~~~~~~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:350:34: note: in expansion of macro '_Py_STATIC_CAST'
  350 | #define PyUnicode_1BYTE_DATA(op) _Py_STATIC_CAST(Py_UCS1*, PyUnicode_DATA(op))
      |                                  ^~~~~~~~~~~~~~~
/builddir/build/BUILD/Sigil-0.9.14/src/Misc/EmbeddedPython.cpp:459:78: note: in expansion of macro 'PyUnicode_1BYTE_DATA'
  459 |             res = QVariant(QString::fromLatin1(reinterpret_cast<const char *>PyUnicode_1BYTE_DATA(po), -1));
      |                                                                              ^~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/Sigil-0.9.14/src/Misc/EmbeddedPython.cpp:459:108: error: expected ')' before ';' token
  459 |             res = QVariant(QString::fromLatin1(reinterpret_cast<const char *>PyUnicode_1BYTE_DATA(po), -1));
      |                           ~                                                                                ^

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/04392802-sigil/

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

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 Ben Cotton 2022-08-09 13:15:36 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 2 Miro Hrončok 2022-09-14 13:47:45 UTC
Hey, Dan. Could you please fix and rebuild the package?

Comment 3 Fedora Update System 2022-09-14 15:57:14 UTC
FEDORA-2022-62fc8f1339 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-62fc8f1339

Comment 4 Dan Horák 2022-09-14 16:26:19 UTC
thanks for the reminder :-)

Comment 5 Fedora Update System 2022-09-15 01:48:57 UTC
FEDORA-2022-62fc8f1339 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-62fc8f1339`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-62fc8f1339

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

Comment 6 Fedora Update System 2022-09-19 00:19:12 UTC
FEDORA-2022-62fc8f1339 has been pushed to the Fedora 37 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.