Bug 2022269 - pylibacl fails to build with Python 3.11: error: lvalue required as left operand of assignment
Summary: pylibacl fails to build with Python 3.11: error: lvalue required as left oper...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: pylibacl
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marcin Zajaczkowski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2098789 (view as bug list)
Depends On:
Blocks: PYTHON3.11 F37FTBFS F37FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2021-11-11 08:40 UTC by Tomáš Hrnčiar
Modified: 2025-09-18 14:09 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-06-20 21:23:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-11-11 08:40:54 UTC
pylibacl fails to build with Python 3.11.0a2.

acl.c: In function ‘PyInit_posix1e’:
acl.c:1803:24: error: lvalue required as left operand of assignment
 1803 |     Py_TYPE(&ACL_Type) = &PyType_Type;
      |                        ^
acl.c:1808:26: error: lvalue required as left operand of assignment
 1808 |     Py_TYPE(&Entry_Type) = &PyType_Type;
      |                          ^
acl.c:1812:28: error: lvalue required as left operand of assignment
 1812 |     Py_TYPE(&Permset_Type) = &PyType_Type;
      |                            ^

Since Py_TYPE() is changed to a inline static function, Py_TYPE(obj) = new_type must be replaced with Py_SET_TYPE(obj, new_type): see the Py_SET_TYPE() function (available since Python 3.9). For backward compatibility, this macro can be used:

#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_TYPE)
static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type)
{ ob->ob_type = type; }
#define Py_SET_TYPE(ob, type) _Py_SET_TYPE((PyObject*)(ob), type)
#endif

(Contributed by Victor Stinner in bpo-39573.)

https://bugs.python.org/issue39573
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/02940467-pylibacl/

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

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-02-08 21:29:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Miro Hrončok 2022-06-20 10:16:05 UTC
*** Bug 2098789 has been marked as a duplicate of this bug. ***

Comment 3 Marcin Zajaczkowski 2022-06-20 20:56:05 UTC
I upgraded pylibacl to an (overlooked) 0.6.0 release from 2020 and it built fine (with the tests) in rawhide (with 3.11.0~b3-3.fc37):
https://koji.fedoraproject.org/koji/taskinfo?taskID=88508698

There was some problem with one of the tests on s390x (https://koji.fedoraproject.org/koji/taskinfo?taskID=88507670), so I reported it upstream (https://github.com/iustin/pylibacl/issues/20) and temporarily excluded from the build.

Comment 4 Miro Hrončok 2022-06-20 21:23:00 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok).

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 37.

Thanks for taking care of it!


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