bytedance / bytedance/sonic-cpp

Failed to compile unittests on aarch64 platform. fatal error: immintrin.h: No such file or directory

Open
#116 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
976
Forks
127
PR merge metrics
No merged PRs in 30d

Description

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

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.