Created attachment 898382 [details] emerge --info, emerge -pqv, and Python's build.log concatenated Using target profile "default/linux/arm/23.0/split-usr/armv7a_hf" and emerging @system. Host has profile "default/linux/amd64/23.0/desktop/systemd". The crossdev environment is trying to pull in the host's libffi from the wrong location, as seen in the log files. This might be an issue with the Python ebuild.
dev-lang/python builds 2 copies of python: one for CBUILD and one for CHOST. Do you somehow not have libffi installed for CBUILD?
(In reply to Mike Gilbert from comment #1) > dev-lang/python builds 2 copies of python: one for CBUILD and one for CHOST. > > Do you somehow not have libffi installed for CBUILD? libffi 3.4.4-r4 is installed on CBUILD.
I have this problem as well, compiling with crossdev for powerpc.
I think it may be specifically a problem with a 64-bit build host and a 32-bit target. The host has /usr/lib64/libffi/include/ffi.h, but Python believes it lives in /usr/lib/libffi/include instead.
Can confirm that symlinking /usr/lib/libffi -> ../lib/libffi works as a temporary solution, and allows Python to cross-build.
Woops I meant /usr/lib/libffi -> ../lib64/libffi
I had the same issue cross compiling Python 3.12 for aarch64-unknown-linux-gnu, and the same workaround worked, so it doesn't seem to be limited to 32-bit targets.
Chewi, can you have a look?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=6caddf235b5598a9725d21134801b4426e6d3ea6 commit 6caddf235b5598a9725d21134801b4426e6d3ea6 Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2024-09-21 21:02:45 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2024-09-21 21:02:45 +0000 Don't set PKG_CONFIG_PATH in make.conf This is pointless because cross-pkg-config unsets it anyway. It's also harmful because if a cross build needs to call CBUILD's pkg-config, which doesn't use the wrapper, it will pick up .pc files from the wrong location. Bug: https://bugs.gentoo.org/936677 Signed-off-by: James Le Cuirot <chewi@gentoo.org> wrappers/etc/portage/make.conf | 1 - 1 file changed, 1 deletion(-)
Fixed in crossdev master. Just needs a release.
To be clear, you'll need to manually remove this line from /usr/<CHOST>/etc/portage/make.conf unless you recreate the cross environment using the future crossdev release.
Now fixed in crossdev 20240921.