Failed to compile unittests on aarch64 platform, the error code is:
In file included from /home/sonic-cpp/include/sonic/internal/arch/avx2/base.h:24,
from /home/sonic-cpp/tests/memcmp_test.cpp:22:
/home/sonic-cpp/include/sonic/internal/arch/avx2/simd.h:20:10: fatal error: immintrin.h: No such file or directory
20 | #include <immintrin.h>
Source code:
#include "gtest/gtest.h"
#include "include/sonic/internal/arch/avx2/base.h"
#include "include/sonic/internal/arch/sonic_cpu_feature.h"
#if defined(SONIC_HAVE_AVX2) && !defined(SONIC_DYNAMIC_DISPATCH)
I tried to put #include "include/sonic/internal/arch/avx2/base.h" below #if defined(SONIC_HAVE_AVX2) && !defined(SONIC_DYNAMIC_DISPATCH) and it worked.