title: CrossCompilie python code for raspberry pi
body: <p>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 <a href="https://github.com/Yadoms/yadoms/wiki/Cross-compile-for-raspberry-PI" rel="nofollow noreferrer">https://github.com/Yadoms/yadoms/wiki/Cross-compile-for-raspberry-PI</a></p>
  
  <p>I followed step of the above written guide: 
  - Setup Environment 
  - Install cross compiler
  - Boost 1.64
  - Python</p>
  
  <p>On the last part (Python) it fails to execute the last instruction.</p>
  
  <pre><code>$ 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/Desktop/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
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>checking build system type... x86_64-pc-linux-gnu
  checking host system type... arm-unknown-linux-gnueabihf
  checking for python3.7... python3.7
  checking for python interpreter for cross build... python3.7
  checking for --enable-universalsdk... no
  checking for --with-universal-archs... no
  checking MACHDEP... checking for --without-gcc... no
  checking for --with-icc... no
  checking for arm-linux-gnueabihf-gcc... arm-linux-gnueabihf-gcc
  checking whether the C compiler works... no
  configure: error: in `/home/slr/Desktop/raspberry/boost_1_64_0/Python-3.7.5':
  configure: error: C compiler cannot create executables
  See `config.log' for more details
  </code></pre>
  
  <p>and then: </p>
  
  <pre><code>$ make HOSTPYTHON=$HOME/Desktop/raspberry/depsBuild/pythonhost/python HOSTPGEN=$HOME/Desktop/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 
  </code></pre>
  
  <p>output:</p>
  
  <pre><code> make: *** No targets specified and no makefile found.  Stop.
  </code></pre>
  
  <p>I need python3 for my purpose. </p>
  
  <p>I am really stuck in this problem, could someone have some idea? I tried also with QEMU and Docker (<a href="https://raspberrypi.stackexchange.com/questions/109488/building-a-virtual-machine-with-the-img-file-of-the-raspberry-pi-stretch">https://raspberrypi.stackexchange.com/questions/109488/building-a-virtual-machine-with-the-img-file-of-the-raspberry-pi-stretch</a>) and both of them failed in compiling my target code:
  <code>gcc: internal compiler error</code>
  My code is pretty long ( Some thousand of lines ), while small codes successfully works. Thanks in advice.</p>