enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.28k stars 282 forks source link

4.8.1: error: implicit declaration of function '_mm512_4fmadd_ps' is invalid in C99 #1187

Open yurivict opened 1 year ago

yurivict commented 1 year ago

4.8.1 build prints these errors/warnings:

WARN: CCompilerOpt.dist_test[630] : CCompilerOpt._dist_test_spawn[764] : Command (cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -I/usr/local/include/python3.9 -c /usr/local/lib/python3.9/site-packages/numpy/distutils/checks/test_flags.c -o /tmp/tmp7cjatp9z/usr/local/lib/python3.9/site-packages/numpy/distutils/checks/test_flags.o -MMD -MF /tmp/tmp7cjatp9z/usr/local/lib/python3.9/site-packages/numpy/distutils/checks/test_flags.o.d -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq) failed with exit status 1 output -> 
cc: error: unknown argument: '-mavx5124fmaps'
cc: error: unknown argument: '-mavx5124vnniw'

WARN: CCompilerOpt.cc_test_flags[1077] : testing failed
INFO: CCompilerOpt.feature_test[1547] : testing feature 'AVX512_KNM' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mno-mmx -mavx512cd -mavx512er -mavx512pf)
INFO: C compiler: cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -fPIC

INFO: compile options: '-I/usr/local/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mno-mmx -mavx512cd -mavx512er -mavx512pf -Werror'
WARN: CCompilerOpt.dist_test[630] : CCompilerOpt._dist_test_spawn[764] : Command (cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -I/usr/local/include/python3.9 -c /usr/local/lib/python3.9/site-packages/numpy/distutils/checks/cpu_avx512_knm.c -o /tmp/tmp7cjatp9z/usr/local/lib/python3.9/site-packages/numpy/distutils/checks/cpu_avx512_knm.o -MMD -MF /tmp/tmp7cjatp9z/usr/local/lib/python3.9/site-packages/numpy/distutils/checks/cpu_avx512_knm.o.d -msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mno-mmx -mavx512cd -mavx512er -mavx512pf -Werror) failed with exit status 1 output -> 
/usr/local/lib/python3.9/site-packages/numpy/distutils/checks/cpu_avx512_knm.c:22:9: error: implicit declaration of function '_mm512_4fmadd_ps' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    b = _mm512_4fmadd_ps(b, b, b, b, b, NULL);
        ^
/usr/local/lib/python3.9/site-packages/numpy/distutils/checks/cpu_avx512_knm.c:22:9: note: did you mean '_mm512_fmadd_ps'?
/usr/lib/clang/14.0.5/include/avx512fintrin.h:2720:1: note: '_mm512_fmadd_ps' declared here
_mm512_fmadd_ps(__m512 __A, __m512 __B, __m512 __C)
^
/usr/local/lib/python3.9/site-packages/numpy/distutils/checks/cpu_avx512_knm.c:22:7: error: assigning to '__m512' (vector of 16 'float' values) from incompatible type 'int'
    b = _mm512_4fmadd_ps(b, b, b, b, b, NULL);
      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/lib/python3.9/site-packages/numpy/distutils/checks/cpu_avx512_knm.c:24:9: error: implicit declaration of function '_mm512_4dpwssd_epi32' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    a = _mm512_4dpwssd_epi32(a, a, a, a, a, NULL);
        ^
/usr/local/lib/python3.9/site-packages/numpy/distutils/checks/cpu_avx512_knm.c:24:9: note: did you mean '_mm512_dpwssd_epi32'?
/usr/lib/clang/14.0.5/include/avx512vnniintrin.h:68:1: note: '_mm512_dpwssd_epi32' declared here
_mm512_dpwssd_epi32(__m512i __S, __m512i __A, __m512i __B)
^
/usr/local/lib/python3.9/site-packages/numpy/distutils/checks/cpu_avx512_knm.c:24:7: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int'
    a = _mm512_4dpwssd_epi32(a, a, a, a, a, NULL);
      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.

WARN: CCompilerOpt.feature_test[1563] : testing failed

Despite the above errors build succeeds.

Python-3.9 clang-14 FreeBSD 13.1