Skip to content

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

@videncoding

Description

@videncoding

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions