I tried to build ONNX on Windows 10, using protobuf 3.9.x - as it was explained here:
Building ONNX on Windows <https://github.com/onnx/onnx#windows> . That scenario was tested for MSVC - and I am experimenting with migrating to Clang (using clang, clang++ and clang-cl compilers). I am currently building ONNX's benchmarks,on Windows 10, using Clang 11.0RC2 - and I am experiencing some missing includes (Ninja's output) : [2/57] Building CXX object CMakeFiles\onnx_proto.dir\onnx\onnx-operators-ml.pb.cc.obj FAILED: CMakeFiles/onnx_proto.dir/onnx/onnx-operators-ml.pb.cc.obj C:\PROGRA~1\LLVM\bin\clang-cl.exe /nologo -TP -DONNX_API="" -DONNX_ML=1 -DONNX_NAMESPACE=onnx -DPROTOBUF_USE_DLLS -I. -IC:\Users\clang\protobuf_llvm\include /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MD /O2 /Ob2 /DNDEBUG /MP /WX /wd4800 /wd4503 /wd4146 /wd4244 /wd4267 -Wno-implicit-function-declaration -Wno-undefined-inline -Wno-incompatible-pointer-types -Wno-dllexport-explicit-instantiation-decl -Wno-microsoft-unqualified-friend -Wno-absolute-value -Wno-unused-variable -Wno-unknown-argument -Wno-writable-strings -Qunused-arguments /MD /showIncludes /FoCMakeFiles\onnx_proto.dir\onnx\onnx-operators-ml.pb.cc.obj /FdCMakeFiles\onnx_proto.dir\onnx_proto.pdb -c onnx\onnx-operators-ml.pb.cc In file included from onnx\onnx-operators-ml.pb.cc:4: In file included from .\onnx/onnx-operators-ml.pb.h:30: In file included from C:\Users\clang\protobuf_llvm\include\google/protobuf/generated_message_reflection.h:47: In file included from C:\Users\clang\protobuf_llvm\include\google/protobuf/descriptor.h:62: C:\Users\clang\protobuf_llvm\include\google/protobuf/stubs/mutex.h(96,1): error: declaration of anonymous class must be a definition class PROTOBUF_EXPORT GOOGLE_PROTOBUF_CAPABILITY("mutex") WrappedMutex { ^ C:\Users\clang\protobuf_llvm\include\google/protobuf/stubs/mutex.h(96,1): error: declaration does not declare anything [-Werror,-Wmissing-declarations] C:\Users\clang\protobuf_llvm\include\google/protobuf/stubs/mutex.h(113,15): error: unknown type name 'WrappedMutex' using Mutex = WrappedMutex; ^ C:\Users\clang\protobufllvm\include\google/protobuf/stubs/mutex.h(118,22): error: unknown type name 'Mutex' explicit MutexLock(Mutex *mu) : mu(mu) { this->mu_->Lock(); } ^ C:\Users\clang\protobufllvm\include\google/protobuf/stubs/mutex.h(121,3): error: unknown type name 'Mutex' Mutex *const mu; ^ C:\Users\clang\protobuf_llvm\include\google/protobuf/stubs/mutex.h(132,27): error: unknown type name 'Mutex' explicit MutexLockMaybe(Mutex mu) : ^ C:\Users\clang\protobuf_llvm\include\google/protobuf/stubs/mutex.h(136,3): error: unknown type name 'Mutex' Mutex const mu_; ^ C:\Users\clang\protobuf_llvm\include\google/protobuf/stubs/mutex.h(172,17): error: no member named 'Mutex' in namespace 'google::protobuf::internal' using internal::Mutex; ~~^ In file included from onnx\onnx-operators-ml.pb.cc:4: In file included from .\onnx/onnx-operators-ml.pb.h:30: In file included from C:\Users\clang\protobuf_llvm\include\google/protobuf/generated_message_reflection.h:47: C:\Users\clang\protobufllvm\include\google/protobuf/descriptor.h(1848,13): error: no type named 'WrappedMutex' in namespace 'google::protobuf::internal' internal::WrappedMutex* mutex; ~~^ 9 errors generated. ninja: build stopped: subcommand failed. Ivan -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/ffcb2d82-457f-49a0-9e4d-1c7e46a6cdd1n%40googlegroups.com.
