You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void* __builtin_memset(void*, int, long unsigned int)’ offset [33, 40] from the object at ‘onnx::_TensorProto_Segment_default_instance_’ is out of the bounds of referenced subobject ‘onnx::TensorProto_Segment::begin_’ with type ‘long int’ at offset 24 [-Werror=array-bounds] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
#39
In function‘void* memset(void*, int, size_t)’,
inlined from ‘void onnx::TensorProto_Segment::SharedCtor()’ at /home/test/onnx2c/build/onnx.pb.cc:4176:11,
inlined from ‘onnx::TensorProto_Segment::TensorProto_Segment()’ at /home/test/onnx2c/build/onnx.pb.cc:4161:13,
inlined from ‘void InitDefaultsscc_info_TensorProto_Segment_onnx_2eproto()’ at /home/test/onnx2c/build/onnx.pb.cc:4159:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [33, 40] from the object at ‘onnx::_TensorProto_Segment_default_instance_’ is out of the bounds of referenced subobject ‘onnx::TensorProto_Segment::begin_’ with type ‘long int’ at offset 24 [-Werror=array-bounds]
71 |return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));|~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
make[3]: *** [CMakeFiles/onnx2c_lib.dir/build.make:167: CMakeFiles/onnx2c_lib.dir/onnx.pb.cc.o] Error 1
make[3]: *** Waiting for unfinished jobs....
[ 50%] Building C object cmake_timestamp/CMakeFiles/timestamp.dir/timestamp.c.o
[ 50%] Built target timestamp
make[2]: *** [CMakeFiles/Makefile2:1228: CMakeFiles/onnx2c_lib.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1262: CMakeFiles/onnx2c.dir/rule] Error 2
make: *** [Makefile:192: onnx2c] Error 2
The text was updated successfully, but these errors were encountered:
Installing protobufs should not require any extra tricks. apt install protobuf-compiler libprotobuf-dev should be good.
My other development machine is also Ubuntu 20.04, with the same versions of the protobufs, and I don't see this problem - because I always build the -DCMAKE_BUILD_TYPE=Debug version... And this reminded me of:
onnx/onnx#4756
So to me it looks like a bug in either onnx or protobuf. I'm not sure if anything could be done on onnx2c-side, except maybe check for protobuf versions >3.6 in CMake.
Building the debug version of onnx2c is quick fix for this. But seems it only hides some bug somewhere...
@kraiskil Building the Debug version of onnx2c resolves the issue temporarily. How about adding this error as a FAQ in README.md? Do let me know if I can add it.
leads to the following error:
The text was updated successfully, but these errors were encountered: