Closed williamtu closed 3 years ago
[1/252] Compiling C object lib/libopenvswitch.a.p/backtrace.c.obj FAILED: lib/libopenvswitch.a.p/backtrace.c.obj "clang" "-Ilib\libopenvswitch.a.p" "-Ilib" "-I..\lib" "-I." "-I.." "-Iinclude\openflow" "-I..\include\openflow" "-Iinclude\openvswitch" "-I..\include\openvsw itch" "-I..\include\windows" "-Iinclude" "-I..\include" "-I..\datapath-windows\include" "-IC:\PTHREADS-BUILT\include" "-Xclang" "-fcolor-diagnostics" "-pipe" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-g" "-Wthread-safety" "-Werror" "-dM" -MD -MQ lib/libopenvswitch.a.p/backtrace.c.obj -MF "lib\libopenvswit ch.a.p\backtrace.c.obj.d" -o lib/libopenvswitch.a.p/backtrace.c.obj "-c" ../lib/backtrace.c ../lib/backtrace.c:28:1: error: unused variable 'init_this_modulebacktrace' [-Werror,-Wunused-variable] VLOG_DEFINE_THIS_MODULE(backtrace); ^ ..\include\openvswitch/vlog.h:188:9: note: expanded from macro 'VLOG_DEFINE_THIS_MODULE' OVS_CONSTRUCTOR(init_thismodule##MODULE) { \ ^ ..\include\openvswitch/compiler.h:219:59: note: expanded from macro 'OVSCONSTRUCTOR' declspec(allocate(".CRT$XCU")) static void (cdecl*f##)(void) = f; \ ^
maybe add? add_global_arguments('-U_MSC_VER', language : 'c')
I currently use clang linker. We can add support for msvc later if needed.
clang
msvc
[1/252] Compiling C object lib/libopenvswitch.a.p/backtrace.c.obj FAILED: lib/libopenvswitch.a.p/backtrace.c.obj "clang" "-Ilib\libopenvswitch.a.p" "-Ilib" "-I..\lib" "-I." "-I.." "-Iinclude\openflow" "-I..\include\openflow" "-Iinclude\openvswitch" "-I..\include\openvsw itch" "-I..\include\windows" "-Iinclude" "-I..\include" "-I..\datapath-windows\include" "-IC:\PTHREADS-BUILT\include" "-Xclang" "-fcolor-diagnostics" "-pipe" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-g" "-Wthread-safety" "-Werror" "-dM" -MD -MQ lib/libopenvswitch.a.p/backtrace.c.obj -MF "lib\libopenvswit ch.a.p\backtrace.c.obj.d" -o lib/libopenvswitch.a.p/backtrace.c.obj "-c" ../lib/backtrace.c ../lib/backtrace.c:28:1: error: unused variable 'init_this_modulebacktrace' [-Werror,-Wunused-variable] VLOG_DEFINE_THIS_MODULE(backtrace); ^ ..\include\openvswitch/vlog.h:188:9: note: expanded from macro 'VLOG_DEFINE_THIS_MODULE' OVS_CONSTRUCTOR(init_thismodule##MODULE) { \ ^ ..\include\openvswitch/compiler.h:219:59: note: expanded from macro 'OVSCONSTRUCTOR' declspec(allocate(".CRT$XCU")) static void (cdecl*f##)(void) = f; \ ^