[issue22699] Module source files not found when cross-compiling

Xavier de Gaye report at bugs.python.org
Fri Mar 20 04:29:15 EDT 2020


Xavier de Gaye <xdegaye at gmail.com> added the comment:

Steve wrote:
> In my build, I've set PYTHON_FOR_BUILD=python3.8

This will not work, PYTHON_FOR_BUILD when cross-compiling is set by configure as:

PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp

FWIW there is no problem cross-compiling Python and the standard library extension modules on Android, see for example the 'termux' Android application and its Python build.

On the other hand there are problems when cross-compiling third party extension modules due to:
* PYTHON_FOR_BUILD must be set correctly.
* distutils is still refering to sysconfig values of the build system instead of the target system.
But setup.py handles this correctly and does not need to be modified.

----------
nosy: +xdegaye

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


More information about the Python-bugs-list mailing list