Skip to content

Python-3.9.1: generate-posix-vars failed for MIPS32 toolchain  #1723

@abhijitsahu

Description

@abhijitsahu

Following below steps for cross-compilation for mips32 toolchain.

Step-1:
touch config.site
gedit config.site
Add below two line:
ac_cv_file__dev_ptmx=no
ac_cv_file__dev_ptc=no
Step-2:
CONFIG_SITE=config.site CC=mipsel-linux-gcc CXX=mipsel-linux-g++ AR=mipsel-linux-ar RANLIB=mipsel-linux-ranlib ./configure --host=mipsel-linux --build=mipsel-linux-gnu --prefix=/home/work_bench/PYTHON/Test-01/Python-3.9.1/my_build --disable-ipv6 --with-openssl=/home/work_bench/ssl/openssl-1.0.2o CPPFLAGS=-L/home/work_bench/ssl/libs CPPFLAGS=-I/home/work_bench/ssl/openssl-1.0.2o/ssl CPPFLAGS=-L/home/work_bench/ssl/openssl-1.0.2o
Step-3:
make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED="mipsel-linux-gcc -shared" CROSS_COMPILE=mipsel-linux- CROSS_COMPILE_TARGET=yes HOSTARCH=mipsel-linux BUILDARCH=mipsel-linux-gnu

Compilation Issue:

Compilation breaks with below error. But compilation works fine for gcc in PC(Ubuntu 18.04).
Could you please suggests?

mipsel-linux-gcc     -Xlinker -export-dynamic -o python Programs/python.o libpython3.9.a -lcrypt -lpthread -ldl  -lpthread -lutil -lm   -lm 
_PYTHON_PROJECT_BASE=/home/abhijit/work_bench/PYTHON/Test-01/Python-3.9.1 _PYTHON_HOST_PLATFORM=linux-mipsel PYTHONPATH=./Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__linux_ 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: 1: python: not found
generate-posix-vars failed
Makefile:615: recipe for target 'pybuilddir.txt' failed
make: *** [pybuilddir.txt] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions