Before you open an issue, please make sure you have tried the following steps:
- Make sure your environment is the same with (https://mace.readthedocs.io/en/latest/installation/env_requirement.html).
- Have you ever read the document for your usage?
- Check if your issue appears in HOW-TO-DEBUG or FAQ.
- The form below must be filled.
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): ubuntu 20
- NDK version(e.g., 15c):
- GCC version(if compiling for host, e.g., 5.4.0): 9.4.0
- MACE version (Use the command: git describe --long --tags): v1.0.3
- Python version(2.7): 3.6
- Bazel version (e.g., 0.13.0):
Model deploy file (*.yml)
Describe the problem
Build fails with the error reported below.
I'm building with CMake.
If I switch to gcc7, then the build is successfull.
To Reproduce
Steps to reproduce the problem:
1. cd /path/to/mace
2. python tools/converter.py convert --config_file=/path/to/your/model_deployment_file
Error information / logs
Please include the full log and/or traceback here.
In file included from /usr/include/string.h:495,
from /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/third_party/install/protobuf/include/google/protobuf/stubs/port.h:38,
from /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/third_party/install/protobuf/include/google/protobuf/stubs/common.h:46,
from /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.h:9,
from /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:4:
In function ‘void* memset(void*, int, size_t)’,
inlined from ‘void mace::QuantizeActivationInfo::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:1711:11,
inlined from ‘mace::QuantizeActivationInfo::QuantizeActivationInfo()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:1696:13,
inlined from ‘void protobuf_mace_2eproto::InitDefaultsQuantizeActivationInfo()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:132:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [29, 40] from the object at ‘mace::_QuantizeActivationInfo_default_instance_’ is out of the bounds of referenced subobject ‘mace::QuantizeActivationInfo::scale_’ with type ‘float’ at offset 24 [-Werror=array-bounds]
71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘void* memset(void*, int, size_t)’,
inlined from ‘void mace::NodeInput::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:1289:11,
inlined from ‘mace::NodeInput::NodeInput()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:1274:13,
inlined from ‘void protobuf_mace_2eproto::InitDefaultsNodeInput()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:104:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [29, 32] from the object at ‘mace::_NodeInput_default_instance_’ is out of the bounds of referenced subobject ‘mace::NodeInput::node_id_’ with type ‘int’ at offset 24 [-Werror=array-bounds]
71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘void* memset(void*, int, size_t)’,
inlined from ‘void mace::InputOutputInfo::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:2724:11,
inlined from ‘mace::InputOutputInfo::InputOutputInfo()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:2703:13,
inlined from ‘void protobuf_mace_2eproto::InitDefaultsInputOutputInfo()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:164:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [53, 64] from the object at ‘mace::_InputOutputInfo_default_instance_’ is out of the bounds of referenced subobject ‘mace::InputOutputInfo::node_id_’ with type ‘int’ at offset 48 [-Werror=array-bounds]
71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘void* memset(void*, int, size_t)’,
inlined from ‘void mace::Argument::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:914:11,
inlined from ‘mace::Argument::Argument()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:887:13,
inlined from ‘void protobuf_mace_2eproto::InitDefaultsArgument()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:90:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [81, 84] from the object at ‘mace::_Argument_default_instance_’ is out of the bounds of referenced subobject ‘mace::Argument::i_’ with type ‘long int’ at offset 72 [-Werror=array-bounds]
71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘void* memset(void*, int, size_t)’,
inlined from ‘void mace::ConstTensor::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:280:11,
inlined from ‘mace::ConstTensor::ConstTensor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:257:13,
inlined from ‘void protobuf_mace_2eproto::InitDefaultsConstTensor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:76:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [105, 136] from the object at ‘mace::_ConstTensor_default_instance_’ is out of the bounds of referenced subobject ‘mace::ConstTensor::offset_’ with type ‘long int’ at offset 96 [-Werror=array-bounds]
71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘void* memset(void*, int, size_t)’,
inlined from ‘void mace::OperatorDef::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:2028:11,
inlined from ‘mace::OperatorDef::OperatorDef()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:1994:13,
inlined from ‘void protobuf_mace_2eproto::InitDefaultsOperatorDef()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:146:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [237, 248] from the object at ‘mace::_OperatorDef_default_instance_’ is out of the bounds of referenced subobject ‘mace::OperatorDef::device_type_’ with type ‘int’ at offset 232 [-Werror=array-bounds]
71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
Additional context
Add any other context about the problem here, e.g., what you have modified about the code.
Before you open an issue, please make sure you have tried the following steps:
System information
Model deploy file (*.yml)
......Describe the problem
Build fails with the error reported below.
I'm building with CMake.
If I switch to gcc7, then the build is successfull.
To Reproduce
Steps to reproduce the problem:
1. cd /path/to/mace 2. python tools/converter.py convert --config_file=/path/to/your/model_deployment_fileError information / logs
Please include the full log and/or traceback here.
In file included from /usr/include/string.h:495, from /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/third_party/install/protobuf/include/google/protobuf/stubs/port.h:38, from /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/third_party/install/protobuf/include/google/protobuf/stubs/common.h:46, from /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.h:9, from /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:4: In function ‘void* memset(void*, int, size_t)’, inlined from ‘void mace::QuantizeActivationInfo::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:1711:11, inlined from ‘mace::QuantizeActivationInfo::QuantizeActivationInfo()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:1696:13, inlined from ‘void protobuf_mace_2eproto::InitDefaultsQuantizeActivationInfo()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:132:5: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [29, 40] from the object at ‘mace::_QuantizeActivationInfo_default_instance_’ is out of the bounds of referenced subobject ‘mace::QuantizeActivationInfo::scale_’ with type ‘float’ at offset 24 [-Werror=array-bounds] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘void* memset(void*, int, size_t)’, inlined from ‘void mace::NodeInput::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:1289:11, inlined from ‘mace::NodeInput::NodeInput()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:1274:13, inlined from ‘void protobuf_mace_2eproto::InitDefaultsNodeInput()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:104:5: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [29, 32] from the object at ‘mace::_NodeInput_default_instance_’ is out of the bounds of referenced subobject ‘mace::NodeInput::node_id_’ with type ‘int’ at offset 24 [-Werror=array-bounds] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘void* memset(void*, int, size_t)’, inlined from ‘void mace::InputOutputInfo::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:2724:11, inlined from ‘mace::InputOutputInfo::InputOutputInfo()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:2703:13, inlined from ‘void protobuf_mace_2eproto::InitDefaultsInputOutputInfo()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:164:5: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [53, 64] from the object at ‘mace::_InputOutputInfo_default_instance_’ is out of the bounds of referenced subobject ‘mace::InputOutputInfo::node_id_’ with type ‘int’ at offset 48 [-Werror=array-bounds] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘void* memset(void*, int, size_t)’, inlined from ‘void mace::Argument::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:914:11, inlined from ‘mace::Argument::Argument()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:887:13, inlined from ‘void protobuf_mace_2eproto::InitDefaultsArgument()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:90:5: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [81, 84] from the object at ‘mace::_Argument_default_instance_’ is out of the bounds of referenced subobject ‘mace::Argument::i_’ with type ‘long int’ at offset 72 [-Werror=array-bounds] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘void* memset(void*, int, size_t)’, inlined from ‘void mace::ConstTensor::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:280:11, inlined from ‘mace::ConstTensor::ConstTensor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:257:13, inlined from ‘void protobuf_mace_2eproto::InitDefaultsConstTensor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:76:5: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [105, 136] from the object at ‘mace::_ConstTensor_default_instance_’ is out of the bounds of referenced subobject ‘mace::ConstTensor::offset_’ with type ‘long int’ at offset 96 [-Werror=array-bounds] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘void* memset(void*, int, size_t)’, inlined from ‘void mace::OperatorDef::SharedCtor()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:2028:11, inlined from ‘mace::OperatorDef::OperatorDef()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:1994:13, inlined from ‘void protobuf_mace_2eproto::InitDefaultsOperatorDef()’ at /root/.conan/data/mace/1.0.3/_/_/build/b41b8edd6fea17501e849581ef615ed628d4216e/build/Release/mace/proto/mace.pb.cc:146:5: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [237, 248] from the object at ‘mace::_OperatorDef_default_instance_’ is out of the bounds of referenced subobject ‘mace::OperatorDef::device_type_’ with type ‘int’ at offset 232 [-Werror=array-bounds] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));Additional context
Add any other context about the problem here, e.g., what you have modified about the code.