flier / pyfasthash

Python Non-cryptographic Hash Library
Apache License 2.0
281 stars 50 forks source link

Fails to build on armv7l #40

Open rngadam opened 4 years ago

rngadam commented 4 years ago

target

jarvis / 🚚 cat /proc/cpuinfo                                                                                                           
processor   : 0
model name  : ARMv7 Processor rev 2 (v7l)
BogoMIPS    : 995.32
Features    : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part    : 0xc08
CPU revision    : 2

Hardware    : Generic AM33XX (Flattened Device Tree)
Revision    : 0000
Serial      : 1942BBBG0271

cross-compiler

 /home/ubuntu/build/buildroot-2019.11.1/output/host/bin/arm-buildroot-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=/home/ubuntu/build/buildroot-2019.11.1/output/host/bin/arm-buildroot-linux-gnueabihf-gcc.br_real
COLLECT_LTO_WRAPPER=/home/ubuntu/build/buildroot-2019.11.1/output/host/libexec/gcc/arm-buildroot-linux-gnueabihf/8.3.0/lto-wrapper
Target: arm-buildroot-linux-gnueabihf
Configured with: ./configure --prefix=/home/ubuntu/build/buildroot-2019.11.1/output/host --sysconfdir=/home/ubuntu/build/buildroot-2019.11.1/output/host/etc --enable-static --target=arm-buildroot-linux-gnueabihf --with-sysroot=/home/ubuntu/build/buildroot-2019.11.1/output/host/arm-buildroot-linux-gnueabihf/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --with-gmp=/home/ubuntu/build/buildroot-2019.11.1/output/host --with-mpc=/home/ubuntu/build/buildroot-2019.11.1/output/host --with-mpfr=/home/ubuntu/build/buildroot-2019.11.1/output/host --with-pkgversion='Buildroot 2019.11.1' --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath --enable-tls --enable-threads --without-isl --without-cloog --with-abi=aapcs-linux --with-cpu=cortex-a8 --with-fpu=vfpv3-d16 --with-float=hard --with-mode=arm --enable-languages=c,c++ --with-build-time-tools=/home/ubuntu/build/buildroot-2019.11.1/output/host/arm-buildroot-linux-gnueabihf/bin --enable-shared --disable-libgomp
Thread model: posix
gcc version 8.3.0 (Buildroot 2019.11.1) 

can modify:

is_arm = machine in ['aarch64', 'aarch64_be', 'armv8b', 'armv8l']

to add armv7l.

I've managed to exclude some code that fails to build in:

https://github.com/Esmartdriver/pyfasthash/pull/1

still fails later:

       farm_fingerprint_128_t::Export(m, "farm_fingerprint_128");                                                                                   [687/1905]
                                     ^
    src/Hash.cpp:85:29: error: qualified-id in declaration before '(' token
       metro_hash_128_1_t::Export(m, "metro_128_1");
                                 ^
    src/Hash.cpp:86:29: error: qualified-id in declaration before '(' token
       metro_hash_128_2_t::Export(m, "metro_128_2");
                                 ^
    src/Hash.cpp:92:33: error: qualified-id in declaration before '(' token
       metro_hash_128_crc_1_t::Export(m, "metro_128_crc_1");
                                     ^
    src/Hash.cpp:93:33: error: qualified-id in declaration before '(' token
       metro_hash_128_crc_2_t::Export(m, "metro_128_crc_2");
                                     ^
    src/Hash.cpp:100:28: error: qualified-id in declaration before '(' token
       t1ha2_atonce128_t::Export(m, "t1ha2_atonce128");
                                ^
    src/Hash.cpp:111:26: error: qualified-id in declaration before '(' token
       xxh3_hash_128_t::Export(m, "xxh3_128");
                              ^
    src/Hash.cpp:116:29: error: qualified-id in declaration before '(' token
       highway_hash_128_t::Export(m, "highway_128");
                                 ^
    error: command '/home/ubuntu/build/buildroot-2019.11.1/output/host/bin/arm-buildroot-linux-gnueabihf-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kaldn4t6/pyhash/se
tup.py'"'"'; __file__='"'"'/tmp/pip-install-kaldn4t6/pyhash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'
"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-z8krkg42/install-record.txt --single-version-ext
ernally-managed --compile --install-headers /usr/include/python3.8/pyhash Check the logs for full command output.