flier / pyfasthash

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

0.9.0 & 0.9.1 doesn't build on Debian 9 (Stretch) #27

Closed MartinHerren closed 6 years ago

MartinHerren commented 6 years ago

Pyhash 0.9.x doesn't seem to build on a stock Debian 9 (Stretch):

Install log up to the first error:

Installed /tmp/easy_install-j6_vebxx/pyhash-0.9.1/.eggs/py_cpuinfo-4.0.0-py3.5.egg
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
src/smhasher/City.cpp: In function ‘uint32 Hash32Len0to4(const char*, size_t, uint32)’:
src/smhasher/City.cpp:148:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < len; i++) {
                   ~~^~~~~
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/lib/gcc/x86_64-linux-gnu/6/include/nmmintrin.h:31:0,
                 from src/smhasher/metrohash64crc.cpp:28:
/usr/lib/gcc/x86_64-linux-gnu/6/include/smmintrin.h: In function ‘void metrohash64crc_1(const uint8_t*, uint64_t, uint32_t, uint8_t*)’:
/usr/lib/gcc/x86_64-linux-gnu/6/include/smmintrin.h:846:1: error: inlining failed in call to always_inline ‘long long unsigned int _mm_crc32_u64(long long unsigned int, long long unsigned int)’: target specific option mismatch
 _mm_crc32_u64 (unsigned long long __C, unsigned long long __V)
 ^~~~~~~~~~~~~
src/smhasher/metrohash64crc.cpp:52:34: note: called from here
             v[0] ^= _mm_crc32_u64(v[0], read_u64(ptr)); ptr += 8;
                     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
$ uname -a
Linux runner--project-0-concurrent-0 4.17.0-1-amd64 #1 SMP Debian 4.17.8-1 (2018-07-20) x86_64 GNU/Linux
$ gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

It works fine on Debian Buster (future Debian 10). Pyhash 0.8.3 installs fine on Debian 9, provided that libboost-python-dev has been installed.

flier commented 6 years ago

Interesting, seems the python-pip version (9.0.1-2) from Debian 9 repo too old, after I install the latest pip (18.0) it works.

flier commented 6 years ago

Seems caused by setuptools 33.1.1 on Debian 9, it works after upgrade it.

$ pip install -U pip setuptools
MartinHerren commented 6 years ago

Thanks, that works, closing it !