flier / pyfasthash

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

Build fails under FreeBSD 11.3 #47

Open andrew-azarov opened 4 years ago

andrew-azarov commented 4 years ago
hw.model: Intel(R) Xeon(R) CPU           E5520  @ 2.27GHz
hw.machine: amd64
hw.ncpu: 16

Getting this error with SSE 4.2:

src/smhasher/metrohash64crc.cpp:52:21: error: always_inline function '_mm_crc32_u64' requires target feature 'sse4.2', but would be inlined into function 'metrohash64crc_1' that is compiled without support for 'sse4.2'
            v[0] ^= _mm_crc32_u64(v[0], read_u64(ptr)); ptr += 8;
                    ^
src/smhasher/metrohash64crc.cpp:53:21: error: always_inline function '_mm_crc32_u64' requires target feature 'sse4.2', but would be inlined into function 'metrohash64crc_1' that is compiled without support for 'sse4.2'
            v[1] ^= _mm_crc32_u64(v[1], read_u64(ptr)); ptr += 8;
                    ^
src/smhasher/metrohash64crc.cpp:54:21: error: always_inline function '_mm_crc32_u64' requires target feature 'sse4.2', but would be inlined into function 'metrohash64crc_1' that is compiled without support for 'sse4.2'
            v[2] ^= _mm_crc32_u64(v[2], read_u64(ptr)); ptr += 8;
                    ^
src/smhasher/metrohash64crc.cpp:55:21: error: always_inline function '_mm_crc32_u64' requires target feature 'sse4.2', but would be inlined into function 'metrohash64crc_1' that is compiled without support for 'sse4.2'
            v[3] ^= _mm_crc32_u64(v[3], read_u64(ptr)); ptr += 8;
                    ^
src/smhasher/metrohash64crc.cpp:84:17: error: always_inline function '_mm_crc32_u64' requires target feature 'sse4.2', but would be inlined into function 'metrohash64crc_1' that is compiled without support for 'sse4.2'
        hash ^= _mm_crc32_u64(hash, read_u32(ptr)); ptr += 4;
                ^
src/smhasher/metrohash64crc.cpp:90:17: error: always_inline function '_mm_crc32_u64' requires target feature 'sse4.2', but would be inlined into function 'metrohash64crc_1' that is compiled without support for 'sse4.2'
        hash ^= _mm_crc32_u64(hash, read_u16(ptr)); ptr += 2;
                ^
src/smhasher/metrohash64crc.cpp:96:17: error: always_inline function '_mm_crc32_u64' requires target feature 'sse4.2', but would be inlined into function 'metrohash64crc_1' that is compiled without support for 'sse4.2'
        hash ^= _mm_crc32_u64(hash, read_u8(ptr));

with CLANG default on FreeBSD. gcc10 also produces the same error