Bug 2049669 - setools fails to build with Python 3.11: error: two or more data types in declaration specifiers
Summary: setools fails to build with Python 3.11: error: two or more data types in dec...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: setools
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-02-02 14:21 UTC by Tomáš Hrnčiar
Modified: 2022-03-17 14:16 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-17 14:16:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-02-02 14:21:11 UTC
setools fails to build with Python 3.11.0a4.

In file included from /usr/include/python3.11/cpython/pystate.h:5,
                 from /usr/include/python3.11/pystate.h:135,
                 from /usr/include/python3.11/Python.h:76,
                 from setools/policyrep.c:46:
/usr/include/sepol/policydb/conditional.h:57:18: error: two or more data types in declaration specifiers
   57 |         uint32_t bool;
      |                  ^~~~
setools/policyrep.c: In function ‘__pyx_f_7setools_9policyrep_sepol_logging_callback’:
setools/policyrep.c:10348:3: warning: function ‘__pyx_f_7setools_9policyrep_sepol_logging_callback’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
10348 |   __pyx_t_1 = ((vasprintf((&__pyx_v_msg), __pyx_v_fmt, __pyx_v_args) < 0) != 0);
      |   ^~~~~~~~~
setools/policyrep.c: In function ‘__pyx_pf_7setools_9policyrep_23ConditionalExprIterator___next__’:
setools/policyrep.c:17360:263: error: expected identifier before ‘_Bool’
17360 |     __pyx_t_3 = ((PyObject *)__pyx_f_7setools_9policyrep_7Boolean_factory(((struct __pyx_obj_7setools_9policyrep_SELinuxPolicy *)__pyx_t_2), __pyx_f_7setools_9policyrep_13SELinuxPolicy_boolean_value_to_datum(__pyx_v_self->__pyx_base.policy, (__pyx_v_self->curr->bool - 1)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 349, __pyx_L1_error)
      |                                                                                                                                                                                                                                                                       ^~~~
setools/policyrep.c: In function ‘__pyx_f_7setools_9policyrep_13SELinuxPolicy__rebuild_attrs_from_map’:
setools/policyrep.c:87950:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
87950 |       __pyx_t_7 = ((__pyx_v_bit < ebitmap_length((&(__pyx_v_self->handle->p.attr_type_map[__pyx_v_i])))) != 0);
      |                                 ^
setools/policyrep.c:88058:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
88058 |       __pyx_t_7 = ((__pyx_v_bit < ebitmap_length((&__pyx_v_tmp_type->types))) != 0);
      |                                 ^
error: command '/usr/bin/gcc' failed with exit code 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/03272462-setools/

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

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


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