Opened 20 months ago

Closed 20 months ago

Last modified 19 months ago

#71687 closed defect (fixed)

xxhashlib: builds fail for 10.7 to 10.11, due to mmx instructions

Reported by: mascguy (Christopher Nielsen) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.10.5
Keywords: Cc: Schamschula (Marius Schamschula)
Port: xxhashlib

Description

The simplest approach, based on similar tickets for other ports, is to simply blacklist Clang < 900.

In file included from xxh_x86dispatch.c:203:
./xxhash.h:4975:37: warning: implicit declaration of function '_mm512_loadu_si512' is invalid in C99 [-Wimplicit-function-declaration]
        __m512i const data_vec    = _mm512_loadu_si512   (input);
                                    ^
./xxhash.h:4975:23: error: initializing 'const __m512i' (vector of 8 'long long' values) with an expression of incompatible type 'int'
        __m512i const data_vec    = _mm512_loadu_si512   (input);
                      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./xxhash.h:4977:23: error: initializing 'const __m512i' (vector of 8 'long long' values) with an expression of incompatible type 'int'
        __m512i const key_vec     = _mm512_loadu_si512   (secret);
                      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./xxhash.h:4981:37: warning: implicit declaration of function '_mm512_srli_epi64' is invalid in C99 [-Wimplicit-function-declaration]
        __m512i const data_key_lo = _mm512_srli_epi64 (data_key, 32);
                                    ^
./xxhash.h:4981:23: error: initializing 'const __m512i' (vector of 8 'long long' values) with an expression of incompatible type 'int'
        __m512i const data_key_lo = _mm512_srli_epi64 (data_key, 32);
                      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./xxhash.h:4985:35: warning: implicit declaration of function '_mm512_shuffle_epi32' is invalid in C99 [-Wimplicit-function-declaration]
        __m512i const data_swap = _mm512_shuffle_epi32(data_vec, (_MM_PERM_ENUM)_MM_SHUFFLE(1, 0, 3, 2));
                                  ^
./xxhash.h:4985:67: error: use of undeclared identifier '_MM_PERM_ENUM'
        __m512i const data_swap = _mm512_shuffle_epi32(data_vec, (_MM_PERM_ENUM)_MM_SHUFFLE(1, 0, 3, 2));
                                                                  ^
./xxhash.h:5024:23: error: initializing 'const __m512i' (vector of 8 'long long' values) with an expression of incompatible type 'int'
        __m512i const shifted     = _mm512_srli_epi64    (acc_vec, 47);
                      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./xxhash.h:5026:23: error: initializing 'const __m512i' (vector of 8 'long long' values) with an expression of incompatible type 'int'
        __m512i const key_vec     = _mm512_loadu_si512   (secret);
                      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./xxhash.h:5027:37: warning: implicit declaration of function '_mm512_ternarylogic_epi32' is invalid in C99 [-Wimplicit-function-declaration]
        __m512i const data_key    = _mm512_ternarylogic_epi32(key_vec, acc_vec, shifted, 0x96 /* key_vec ^ acc_vec ^ shifted */);
                                    ^
./xxhash.h:5030:23: error: initializing 'const __m512i' (vector of 8 'long long' values) with an expression of incompatible type 'int'
        __m512i const data_key_hi = _mm512_srli_epi64 (data_key, 32);
                      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./xxhash.h:5033:43: warning: implicit declaration of function '_mm512_slli_epi64' is invalid in C99 [-Wimplicit-function-declaration]
        *xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32));
                                          ^
./xxhash.h:5033:43: error: passing 'int' to parameter of incompatible type '__m512i' (vector of 8 'long long' values)
        *xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32));
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../lib/clang/8.0.0/include/avx512fintrin.h:449:40: note: passing argument to parameter '__B' here
_mm512_add_epi64 (__m512i __A, __m512i __B)
                                       ^
In file included from xxh_x86dispatch.c:203:
./xxhash.h:5046:72: warning: implicit declaration of function '_mm512_set1_epi8' is invalid in C99 [-Wimplicit-function-declaration]
        __m512i const seed     = _mm512_mask_sub_epi64(seed_pos, 0xAA, _mm512_set1_epi8(0), seed_pos);
                                                                       ^
./xxhash.h:5046:72: error: passing 'int' to parameter of incompatible type '__m512i' (vector of 8 'long long' values)
        __m512i const seed     = _mm512_mask_sub_epi64(seed_pos, 0xAA, _mm512_set1_epi8(0), seed_pos);
                                                                       ^~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../lib/clang/8.0.0/include/avx512fintrin.h:480:59: note: passing argument to parameter '__A' here
_mm512_mask_sub_epi64 (__m512i __W, __mmask8 __U, __m512i __A, __m512i __B)
                                                          ^
In file included from xxh_x86dispatch.c:203:
./xxhash.h:5054:40: warning: implicit declaration of function '_mm512_load_si512' is invalid in C99 [-Wimplicit-function-declaration]
            dest[i] = _mm512_add_epi64(_mm512_load_si512(src + i), seed);
                                       ^
./xxhash.h:5054:40: error: passing 'int' to parameter of incompatible type '__m512i' (vector of 8 'long long' values)
            dest[i] = _mm512_add_epi64(_mm512_load_si512(src + i), seed);
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../lib/clang/8.0.0/include/avx512fintrin.h:449:27: note: passing argument to parameter '__A' here
_mm512_add_epi64 (__m512i __A, __m512i __B)
                          ^
7 warnings and 10 errors generated.
make: *** [xxh_x86dispatch.o] Error 1

Change History (4)

comment:1 Changed 20 months ago by mascguy (Christopher Nielsen)

Cc: Schamschula added
Owner: changed from Schamschula to mascguy

comment:2 Changed 20 months ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: assignedclosed

In 440cd12b80d95762e2ef60e5073ce46602a2cf3c/macports-ports (master):

xxhash: blacklist clang < 900

Fixes: #71687

comment:3 Changed 20 months ago by Christopher Nielsen <mascguy@…>

In e19bed298dff7fe5003557437a8f0a6479a14648/macports-ports (master):

xxhash: add comment, re: clang blacklisting

See: #71687

comment:4 Changed 19 months ago by mascguy (Christopher Nielsen)

Has duplicate issue:71688

Note: See TracTickets for help on using tickets.