New submission from Christian Heimes <li...@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@python
components: Build, Cross-Build, Documentation, Tests
messages: 406853
nosy: Alex.Willmer, brett.cannon, christian.heimes, docs@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue45881>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to