Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 936677

Summary: dev-lang/python-3.12.4_p2 refuses to cross-emerge into an Armv7-A target
Product: Gentoo Linux Reporter: Roland Metivier <metivier.roland>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: UNCONFIRMED ---    
Severity: normal CC: chewi, dave, metivier.roland
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info, emerge -pqv, and Python's build.log concatenated

Description Roland Metivier 2024-07-26 20:23:37 UTC
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.
Comment 1 Mike Gilbert gentoo-dev 2024-07-26 21:54:24 UTC
dev-lang/python builds 2 copies of python: one for CBUILD and one for CHOST.

Do you somehow not have libffi installed for CBUILD?
Comment 2 Roland Metivier 2024-07-26 22:05:31 UTC
(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.
Comment 3 Dave Vasilevsky 2024-09-07 06:52:52 UTC
I have this problem as well, compiling with crossdev for powerpc.
Comment 4 Dave Vasilevsky 2024-09-07 06:54:52 UTC
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.
Comment 5 Dave Vasilevsky 2024-09-07 07:02:35 UTC
Can confirm that symlinking /usr/lib/libffi -> ../lib/libffi works as a temporary solution, and allows Python to cross-build.
Comment 6 Dave Vasilevsky 2024-09-07 07:03:32 UTC
Woops I meant /usr/lib/libffi -> ../lib64/libffi