Closed AndreMiras closed 6 years ago
It seems to be because we got the -L/usr/lib64
being added for some reasons. So it tries to link again system libraries, which are of course incompatible with ARM ones.
Some also having the same issue but with some default -I/usr/include/python3.6m
also getting added.
I can reproduce it cloning pycryptodome
and trying to build the extension with the cross-compiler.
PATH="$HOME/.buildozer/crystax-ndk-10.3.2-linux-x86_64/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/bin:$PATH"
CC=arm-linux-androideabi-gcc python setup.py build_ext -v
And I get the following output:
Testing support for x86intrin.h header
Target does not support x86intrin.h header
running build_ext
Testing support for 128-bit integer
Target does not support 128-bit integer
Testing support for intrin.h header
Target does not support intrin.h header
Testing support for cpuid.h header
Target does not support cpuid.h header
Testing support for posix_memalign
Target does not support posix_memalign
Testing support for memalign
Target does not support memalign
Warning: compiler does not support AESNI instructions
Warning: compiler does not support CLMUL instructions
building 'Crypto.Hash._MD2' extension
arm-linux-androideabi-gcc -fPIC -DPYCRYPTO_LITTLE_ENDIAN -DLTC_NO_ASM -Isrc/ -I/usr/include/python3.6m -c src/MD2.c -o build/temp.linux-x86_64-3.6/src/MD2.o -O3
In file included from src/MD2.c:28:0:
src/common.h:34:19: fatal error: stdio.h: No such file or directory
compilation terminated.
error: command 'arm-linux-androideabi-gcc' failed with exit status 1
OK it might be because it's being added by core build_ext, see https://github.com/python/cpython/blob/3.6/Lib/distutils/command/build_ext.py#L164