Wrong compiler when cross-compile package #146
-
I'm trying to cross-compile a package for openwrt (python3.7, cpu mips). This is what I did to set up the environment: cd build-mipsel/
mkdir build-python host-python wheels
tar zxvf Python-3.7.13.tgz
mv Python-3.7.13 Python-3.7.13-build
tar zxvf Python-3.7.13.tgz
mv Python-3.7.13 Python-3.7.13-host
cd Python-3.7.13-build/
./configure --prefix=$(realpath ../build-python/)
make -j
make install
cd ../Python-3.7.13-host/
PATH=$(realpath ../build-python/)/bin:$PATH ./configure --prefix=$(realpath ../host-python/) --build=x86_64-pc-linux-gnu --host=mipsel-linux-gnu --without-ensurepip ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no
PATH=$(realpath ../build-python/)/bin:$PATH make -j
PATH=$(realpath ../build-python/)/bin:$PATH make install
cd ..
build-python/bin/python3 -m crossenv host-python/bin/python3 cross_venv
. ./cross_venv/bin/activate
sudo apt install cmake ninja-build
build-python -m pip install -U pip
build-python -m pip install -U setuptools cmake wheel ninja
pip install -U pip
pip install -U setuptools wheel
pip -v wheel c104 -w wheels/ --no-build-isolation The last command gives the following errors:
Note that the compiler is specified as /usr/bin/c++, instead of the correct one. Perhaps this gives an error due to the bitness. However, if I run the command with the correct compiler: Perhaps I did something wrong or is this a bug in crossenv? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
cmake (and meson) do not detect their compiler from the python installation, but require you to explicitly specify it either via the environment or via a cross-compile file. |
Beta Was this translation helpful? Give feedback.
cmake (and meson) do not detect their compiler from the python installation, but require you to explicitly specify it either via the environment or via a cross-compile file.