I found issues on installing a cross compiler on my Ubuntu19.04 64 bit machine. I would like to cross compile python code into executable for my raspberry pi 3 model b+ running Debian Stretch.I followed many guides, none of them worked. I am actually following https://github.com/Yadoms/yadoms/wiki/Cross-compile-for-raspberry-PI
I followed step of the above written guide: - Setup Environment - Install cross compiler- Boost 1.64- Python
On the last part (Python) it fails to execute the last instruction.
$ CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib ./configure --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf --build=x86_64-linux-gnu --prefix=$HOME/rapsberry/depsBuild/python --disable-ipv6 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no ac_cv_have_long_long_format=yes --enable-shared
output:
checking build system type... x86_64-pc-linux-gnuchecking host system type... arm-unknown-linux-gnueabihfchecking for python3.7... python3.7checking for python interpreter for cross build... python3.7checking for --enable-universalsdk... nochecking for --with-universal-archs... nochecking MACHDEP... checking for --without-gcc... nochecking for --with-icc... nochecking for arm-linux-gnueabihf-gcc... arm-linux-gnueabihf-gccchecking whether the C compiler works... noconfigure: error: in `/home/slr/Desktop/raspberry/boost_1_64_0/Python-3.7.5':configure: error: C compiler cannot create executablesSee `config.log' for more details
and then:
$ make HOSTPYTHON=$HOME/raspberry/depsBuild/pythonhost/python HOSTPGEN=$HOME/raspberry/depsBuild/pythonhost/Parser/pgen BLDSHARED="arm-linux-gnueabihf-gcc -shared" CROSS-COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_TARGET=yes HOSTARCH=arm-linux BUILDARCH=arm-linux-gnueabihf
output:
make: *** No targets specified and no makefile found. Stop.
I need python3 for my purpose.
I am really stuck in this problem, could someone have some idea? I tried also with QEMU and Docker (https://raspberrypi.stackexchange.com/questions/109488/building-a-virtual-machine-with-the-img-file-of-the-raspberry-pi-stretch) and both of them failed in compiling my target code:gcc: internal compiler error
My code is pretty long ( Some thousand of lines ), while small codes successfully works. Thanks in advice.