[New-bugs-announce] [issue45314] Using target python while cross-building

Frans report at bugs.python.org
Tue Sep 28 14:20:08 EDT 2021


New submission from Frans <frans at fransdb.nl>:

While trying to cross-compile Python-3.9.7, I came across the next error report:

i586-cross-linux-gcc     -Xlinker -export-dynamic -o python Programs/python.o -L. -lpython3.9 -lcrypt -ldl  -lpthread -lm   -lm  
_PYTHON_PROJECT_BASE=/mnt/lfs/sources-base/Python-3.9.7 _PYTHON_HOST_PLATFORM=linux-i586 PYTHONPATH=./Lib _PYTHON_SYSCONFIGDATA_NAME=_sys
configdata__linux_i386-linux-gnu python -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
       echo "generate-posix-vars failed" ; \
       rm -f ./pybuilddir.txt ; \
       exit 1 ; \
fi
/bin/sh: line 1: python: command not found
generate-posix-vars failed
make: *** [Makefile:619: pybuilddir.txt] Error 1
-----------------------------------------------------------
Strange, because Python configure/Makefile known that we are cross-compiling, but still try to execute a program with the target architecture, which is not the same as the architecture of the build machine. Of course it fails.

----------
components: Cross-Build
messages: 402799
nosy: Alex.Willmer, fransdb
priority: normal
severity: normal
status: open
title: Using target python while cross-building
versions: Python 3.9

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


More information about the New-bugs-announce mailing list