[New-bugs-announce] [issue45881] Cross compiling on Linux is untested, undocumented, and broken

Christian Heimes report at bugs.python.org
Tue Nov 23 11:37:45 EST 2021


New submission from Christian Heimes <lists at cheimes.de>:

Cross compiling is an approach to compile a program for a different CPU architecture and platform, e.g. compile for an ARM64 (aarch64) or WASM on a x86_64 build system.

Python configure script, Makefile, and setup.py have multiple references to cross compiling. However I could not find any documentation in the devguide or Python docs how to cross compile. We also lack CI (buildbot) to test cross compiling. This lack of awareness and testing leads to breakage of the feature. For example the design of Programs/_freeze_module in main (3.11-dev) is incompatible with cross compiling.

I kinda got cross compiling working with 3.10, but only with some additional hacks and patches. I also ran into other problems like _PYTHON_HOST_PLATFORM env var is not automatically forwarded to setup.py. The helper functions add_multiarch_paths() and add_cross_compiling_paths() break builds for me, too. Cross compiling only works when the methods are commented out.

----------
assignee: docs at python
components: Build, Cross-Build, Documentation, Tests
messages: 406853
nosy: Alex.Willmer, brett.cannon, christian.heimes, docs at python
priority: normal
severity: normal
status: open
title: Cross compiling on Linux is untested, undocumented, and broken
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45881>
_______________________________________


More information about the New-bugs-announce mailing list