smadaminov / ovs-dpdk-meson-issues

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

windows clang: BUILD_ASSERT_DECL #43

Closed williamtu closed 3 years ago

williamtu commented 3 years ago
[2/250] Compiling C object lib/libopenvswitch.a.p/classifier.c.obj
FAILED: lib/libopenvswitch.a.p/classifier.c.obj
"clang" "-Ilib\libopenvswitch.a.p" "-Ilib" "-I..\lib" "-I." "-I.." "-I..\include\windows" "-Iinclude" "-I..\include" "-I..\datapath-windows\i
nclude" "-IC:\PTHREADS-BUILT\include" "-IC:\temp\dpdk\include" "-IC:\dpdk\lib\eal\windows\include" "-Xclang" "-fcolor-diagnostics" "-pipe" "-
D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-g" "-Wthread-safety" "-Wno-microsoft-enum-forward-reference" "-Wno-unused-function" "-Wno-so
metimes-uninitialized" "-Wno-format" "-Wno-pointer-sign" "-Wno-incompatible-pointer-types" "-dM" "-U_MSC_VER" "-D_TIMESPEC_DEFINED" "-D_CRT_N
ONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS" "-D_CRT_SECURE_NO_DEPRECATE" "-U__AVX512F__" "-msse3" "-mssse3" -MD -MQ lib/libopenvswitch.a.p
/classifier.c.obj -MF "lib\libopenvswitch.a.p\classifier.c.obj.d" -o lib/libopenvswitch.a.p/classifier.c.obj "-c" ../lib/classifier.c
In file included from ../lib/classifier.c:18:
In file included from ..\lib/classifier.h:301:
In file included from ..\lib/cmap.h:22:
In file included from ..\lib/ovs-rcu.h:160:
In file included from ..\lib/compiler.h:20:
..\include\openvswitch/compiler.h:59:2: warning: ("XXX no static assert") [-W#warnings]
#warning("XXX no static assert")
 ^
In file included from ../lib/classifier.c:25:
In file included from ..\lib/odp-util.h:27:
..\include\openvswitch/ofp-actions.h:201:1: error: bit-field 'build_assert_failed' has negative width (-1)
BUILD_ASSERT_DECL(sizeof(struct ofpact) == 4);
^
..\include\openvswitch/compiler.h:257:42: note: expanded from macro 'BUILD_ASSERT_DECL'
        extern int (*build_assert(void))[BUILD_ASSERT__(EXPR)]
                                         ^
..\include\openvswitch/compiler.h:254:38: note: expanded from macro 'BUILD_ASSERT__'
        sizeof(struct { unsigned int build_assert_failed : (EXPR) ? 1 : -1; })
                                     ^
In file included from ../lib/classifier.c:25:
In file included from ..\lib/odp-util.h:27:
..\include\openvswitch/ofp-actions.h:201:1: error: conflicting types for 'build_assert'
..\include\openvswitch/compiler.h:257:22: note: expanded from macro 'BUILD_ASSERT_DECL'
        extern int (*build_assert(void))[BUILD_ASSERT__(EXPR)]
williamtu commented 3 years ago

need to enable -std=c11 https://clang.llvm.org/docs/LanguageExtensions.html https://clang.llvm.org/c_status.html