smadaminov / ovs-dpdk-meson-issues

VMware Summer 2021
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

ovs-dpdk: intrin.h:459, redefinition of '__m128i' a s different kind of symbol #47

Open williamtu opened 3 years ago

williamtu commented 3 years ago
FAILED: lib/libopenvswitch.a.p/ct-dpif.c.obj
"clang" "-Ilib\libopenvswitch.a.p" "-Ilib" "-I..\lib" "-I." "-I.." "-Iinclude" "-I..\include" "-I..
\include\windows" "-I..\datapath-windows\include" "-Ic:\PTHREADS-BUILT" "-Ic:\PTHREADS-BUILT\includ
e" "-IC:\dpdk\install\include" "-fcolor-diagnostics" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pc
h" "-O3" "-Wstrict-prototypes" "-Wall" "-Wextra" "-Wno-sign-compare" "-Wpointer-arith" "-Wformat" "
-Wformat-security" "-Wswitch-enum" "-Wunused-parameter" "-Wbad-function-cast" "-Wcast-align" "-Wstr
ict-prototypes" "-Wold-style-definition" "-Wmissing-prototypes" "-Wmissing-field-initializers" "-Wt
hread-safety" "-fno-strict-aliasing" "-Wswitch-bool" "-Wlogical-not-parentheses" "-Wsizeof-array-ar
gument" "-Wshift-negative-value" "-Wshadow" "-Wno-null-pointer-arithmetic" "-U_MSC_VER" "-msse3" "-
mssse3" "-std=c11" "-U__AVX512F__" -MD -MQ lib/libopenvswitch.a.p/ct-dpif.c.obj -MF "lib\libopenvsw
itch.a.p\ct-dpif.c.obj.d" -o lib/libopenvswitch.a.p/ct-dpif.c.obj "-c" ../lib/ct-dpif.c
In file included from ../lib/ct-dpif.c:17:
In file included from .\config.h:384:
In file included from C:\Program Files\LLVM\lib\clang\12.0.0\include\intrin.h:12:
C:\BuildTools\VC\Tools\MSVC\14.29.30037\include\intrin.h:459:26: error: redefinition of '__m128i' a
s different kind of symbol
__MACHINEX86_X64(__m128i _mm_alignr_epi8(__m128i, __m128i, int))
                         ^
C:\Program Files\LLVM\lib\clang\12.0.0\include\tmmintrin.h:148:4: note: expanded from macro '_mm_al
ignr_epi8'
  (__m128i)__builtin_ia32_palignr128((__v16qi)(__m128i)(a), \
   ^
C:\Program Files\LLVM\lib\clang\12.0.0\include\emmintrin.h:16:19: note: previous definition is here
typedef long long __m128i __attribute__((__vector_size__(16), __aligned__(16)));
                  ^
In file included from ../lib/ct-dpif.c:17:
In file included from .\config.h:384:
In file included from C:\Program Files\LLVM\lib\clang\12.0.0\include\intrin.h:12:
C:\BuildTools\VC\Tools\MSVC\14.29.30037\include\intrin.h:459:26: error: expected ';' after top leve
l declarator
__MACHINEX86_X64(__m128i _mm_alignr_epi8(__m128i, __m128i, int))
                         ^
C:\Program Files\LLVM\lib\clang\12.0.0\include\tmmintrin.h:148:12: note: expanded from macro '_mm_a
lignr_epi8'
  (__m128i)__builtin_ia32_palignr128((__v16qi)(__m128i)(a), \
           ^
In file included from ../lib/ct-dpif.c:17:
In file included from .\config.h:384:
In file included from C:\Program Files\LLVM\lib\clang\12.0.0\include\intrin.h:12:
C:\BuildTools\VC\Tools\MSVC\14.29.30037\include\intrin.h:469:26: error: redefinition of '__m128i' a
s different kind of symbol
__MACHINEX86_X64(__m128i _mm_blend_epi16(__m128i, __m128i, int))
williamtu commented 3 years ago

why config.h has

/* MSR: use meson checks to enable/disable this^M
   and still not clear why it does not work on Linux^M
   or maybe I should include this header only in Windows */^M
#if defined(__clang__) && defined(WIN32)^M
#include <intrin.h>^M
#endif^M
williamtu commented 3 years ago

i remove it