This seems to affect only mips3-n32, mips3-multilib, mips64-n32, mips64-multilib (note that the primary ABI for the multilib stages is n32). Here's what I got from catalyst: building '_ctypes' extension mips64-unknown-linux-gnu-gcc -fPIC -Wsign-compare -DNDEBUG -O2 -march=mips64 -mabi=n32 -mplt -pipe -fwrapv -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include -I. -I/usr/include/ncursesw -I/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Include -I/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3 -c /var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Modules/_ctypes/_ctypes.c -o build/temp.linux-mips64-3.11/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Modules/_ctypes/_ctypes.o /var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Modules/_ctypes/_ctypes.c:118:10: fatal error: ffi.h: No such file or directory 118 | #include <ffi.h> | ^~~~~~~ compilation terminated. *** WARNING: renaming "readline" since importing it failed: /var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/build/lib.linux-mips64-3.11/readline.cpython-311-mips64-linux-gnuabin32.so: undefined symbol: rl_resize_terminal *** WARNING: renaming "_curses" since importing it failed: /var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/build/lib.linux-mips64-3.11/_curses.cpython-311-mips64-linux-gnuabin32.so: undefined symbol: tigetstr *** WARNING: renaming "_curses_panel" since importing it failed: /var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/build/lib.linux-mips64-3.11/_curses_panel.cpython-311-mips64-linux-gnuabin32.so: undefined symbol: set_panel_userptr The following modules found by detect_modules() in setup.py have not been built, they are *disabled* by configure: _tkinter nis Failed to build these modules: _ctypes Following modules built successfully but were removed because they could not be imported: _curses _curses_panel readline Traceback (most recent call last): File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/./setup.py", line 1626, in <module> main() ^^^^^^ File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/./setup.py", line 1596, in main setup(# PyPI Metadata (PEP 301) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Lib/distutils/core.py", line 148, in setup dist.run_commands() ^^^^^^^^^^^^^^^^^^^ File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Lib/distutils/dist.py", line 966, in run_commands self.run_command(cmd) ^^^^^^^^^^^^^^^^^^^^^ File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Lib/distutils/dist.py", line 985, in run_command cmd_obj.run() ^^^^^^^^^^^^^ File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Lib/distutils/command/build.py", line 135, in run self.run_command(cmd_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Lib/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Lib/distutils/dist.py", line 985, in run_command cmd_obj.run() ^^^^^^^^^^^^^ File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/Lib/distutils/command/build_ext.py", line 340, in run self.build_extensions() ^^^^^^^^^^^^^^^^^^^^^^^ File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/./setup.py", line 522, in build_extensions self.summary(mods_built, mods_disabled) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3/./setup.py", line 601, in summary raise RuntimeError("Failed to build some stdlib modules") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Failed to build some stdlib modules make: *** [Makefile:867: sharedmods] Error 1 * ERROR: dev-lang/python-3.11.0_beta3::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-lang/python-3.11.0_beta3::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-lang/python-3.11.0_beta3::gentoo'`. * The complete build log is located at '/var/tmp/catalyst/logs/dev-lang:python-3.11.0_beta3:20220605-213407.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-lang/python-3.11.0_beta3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/python-3.11.0_beta3/temp/environment'. * Working directory: '/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3' * S: '/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3' * Messages for package dev-lang/python-3.11.0_beta3: * Log file: /var/tmp/catalyst/logs/dev-lang:python-3.11.0_beta3:20220605-213407.log * ERROR: dev-lang/python-3.11.0_beta3::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-lang/python-3.11.0_beta3::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-lang/python-3.11.0_beta3::gentoo'`. * The complete build log is located at '/var/tmp/catalyst/logs/dev-lang:python-3.11.0_beta3:20220605-213407.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-lang/python-3.11.0_beta3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/python-3.11.0_beta3/temp/environment'. * Working directory: '/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3' * S: '/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3'
Created attachment 783293 [details] build log from a chroot
Created attachment 783296 [details] emerge --info
Could you: 1. get config.log and share it 2. run pkg-config libffi --cflags-only-I 3. run pkg-config libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'
(In reply to Sam James from comment #3) > 2. run pkg-config libffi --cflags-only-I dilfridge-mips64-multilib ~ # pkg-config libffi --cflags-only-I -I/usr/lib32/libffi/include > 3. run pkg-config libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ > *$//' dilfridge-mips64-multilib ~ # pkg-config libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//' /usr/lib32/libffi/include dilfridge-mips64-multilib ~ # ls -l /usr/lib32/libffi/include total 24 -rw-r--r-- 1 root root 14253 Apr 18 14:51 ffi.h -rw-r--r-- 1 root root 6578 Apr 18 14:51 ffitarget.h
Created attachment 783500 [details] config.log (compressed) From a quick glance, maybe python gets the main abi wrong?
@python: could someone of you please report this upstream and link to the report here?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f90c33b4082f6bb908d2ae1b9ce4cf66a0b7428 commit 3f90c33b4082f6bb908d2ae1b9ce4cf66a0b7428 Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2022-06-27 23:44:19 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2022-06-27 23:45:30 +0000 profiles: mask python:3.11 on mips n32 profiles Bug: https://bugs.gentoo.org/850151 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> profiles/arch/mips/mips64/n32/package.mask | 5 +++++ profiles/arch/mips/mips64/n32/use.mask | 5 ++++- profiles/arch/mips/mipsel/mips64el/n32/package.mask | 5 +++++ profiles/arch/mips/mipsel/mips64el/n32/use.mask | 5 ++++- 4 files changed, 18 insertions(+), 2 deletions(-)
Submitted upstream
As I mentioned on the upstream issue, I think this patch got dropped for our Python 3.11 ebuilds, maybe by accident? https://github.com/gentoo/cpython/commit/69fccd4a801cb0e2f303f765e1bee8d7589d803f
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3a07918714b4e45902be8f43cb3d5bd649bf8a8 commit a3a07918714b4e45902be8f43cb3d5bd649bf8a8 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-07-08 13:09:59 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2022-07-08 13:10:19 +0000 dev-lang/python: add 3.11.0_beta3_p2 Closes: https://bugs.gentoo.org/850151 Signed-off-by: Mike Gilbert <floppym@gentoo.org> dev-lang/python/Manifest | 1 + dev-lang/python/python-3.11.0_beta3_p2.ebuild | 472 ++++++++++++++++++++++++++ 2 files changed, 473 insertions(+)