Hello there! Cross-compile via crossdev fail for sys-apps/portage-2.3.4 and =sys-apps/portage-2.3.3 (but version 2.3.2 pretty ok) Details about error please see here: https://paste.pound-python.org/show/VvJ5FM3Om3xWP7nSmivF/ Reproducible: Always
We know that it doesn't work with USE="native-extensions" enabled. You should set this in /etc/portage/package.use: sys-apps/portage -native-extensions
Just snapping the failure context from the pastebin: running build_ext building 'portage.util.libc' extension creating /usr/mipsel-unknown-linux-gnu/tmp/portage/sys-apps/portage-2.3.4/work/portage-2.3.4-python3_5/temp.linux-x86_64-3.5 creating /usr/mipsel-unknown-linux-gnu/tmp/portage/sys-apps/portage-2.3.4/work/portage-2.3.4-python3_5/temp.linux-x86_64-3.5/src mipsel-unknown-linux-gnu-gcc -O2 -pipe -fomit-frame-pointer -mglibc -fPIC -I/usr/include/python3.5m -c src/portage_util_libc.c -o /usr/mipsel-unknown-linux-gnu/tmp/portage/sys-apps/portage-2.3.4/work/portage-2.3.4-python3_5/temp.linux-x86_64-3.5/src/portage_util_libc.o cc1: warning: include location "/usr/include/python3.5m" is unsafe for cross-compilation [-Wpoison-system-directories] In file included from /usr/include/python3.5m/Python.h:50:0, from src/portage_util_libc.c:5: /usr/include/python3.5m/pyport.h:820:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." ^ error: command 'mipsel-unknown-linux-gnu-gcc' failed with exit status 1 ( OP, please attach build logs as files in future ) cross-dev for dev-python/cffi *also* fails the same way for me, so to avoid that, one might want to do: USE="-native-extensions -rsync-verify" for cross.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24631f38a61a53ffd2773090585eb98e9d4e8185 commit 24631f38a61a53ffd2773090585eb98e9d4e8185 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-03-21 23:33:08 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-03-21 23:33:08 +0000 sys-apps/portage: disable USE=native-extensions for cross-compilation It doesn't work because cross-compiling Python modules is either tricky or flat-out impossible, so let's disable it when cross-compiling to make life easier for people. Bug: https://bugs.gentoo.org/612158 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/portage/portage-3.0.30-r1.ebuild | 6 +++++- sys-apps/portage/portage-9999.ebuild | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-)