Opus 1.5.x and main compilation failing with GCC 8.5.0
Opus 1.5.2 Buils is failing with gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-18).
g++ 8.5.0 not compatible with AVX2 interensic.
../silk/x86/NSQ_del_dec_avx2.c: In function 'silk_nsq_del_dec_scale_states_avx2': ../silk/x86/NSQ_del_dec_avx2.c:959:43: warning: implicit declaration of function '_mm_loadu_si64'; did you mean '_mm_loadu_si32'? [-Wimplicit-function-declaration] __m256i x = _mm256_cvtepi16_epi64(_mm_loadu_si64(&x16[i])); ^~~~~~~~~~~~~~ _mm_loadu_si32 ../silk/x86/NSQ_del_dec_avx2.c:959:43: warning: nested extern declaration of '_mm_loadu_si64' [-Wnested-externs] ../silk/x86/NSQ_del_dec_avx2.c:959:43: error: incompatible type for argument 1 of '_mm256_cvtepi16_epi64' __m256i x = _mm256_cvtepi16_epi64(_mm_loadu_si64(&x16[i])); ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-redhat-linux/8/include/immintrin.h:43, from ../silk/x86/NSQ_del_dec_avx2.c:37: /usr/lib/gcc/x86_64-redhat-linux/8/include/avx2intrin.h:468:32: note: expected '__m128i' {aka '__vector(2) long long int'} but argument is of type 'int' _mm256_cvtepi16_epi64 (__m128i __X)
Replacing [ 'AVX2', 'immintrin.h', '__m256i', '_mm256_abs_epi32(_mm256_setzero_si256())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ], with [ 'AVX2', 'immintrin.h', '__m256i', '_mm256_cvtepi16_epi64(_mm_loadu_si64())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ],
resolves the issue.
Replacing [ 'AVX2', 'immintrin.h', '__m256i', '_mm256_abs_epi32(_mm256_setzero_si256())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ], with [ 'AVX2', 'immintrin.h', '__m256i', '_mm256_cvtepi16_epi64(_mm_loadu_si64())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ],
resolves the issue.
which file?
Ahh My bad. Forgot to mention the file name. This change needs to be done in meson.build file.