作者:NOYOKI要跑偏 | 来源:互联网 | 2023-10-09 19:22
123456789101112131415 78%] Building CXX object CMakeFiles/flattests.dir/tests/test.cpp.oIn file inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| 78%] Building CXX object CMakeFiles/flattests.dir/tests/test.cpp.o
In file included from /root/snort_src/flatbuffers-1.12.0/tests/test.cpp:39:
/root/snort_src/flatbuffers-1.12.0/tests/arrays_test_generated.h: In constructor ‘MyGame::Example::ArrayStruct::ArrayStruct(float, int8_t, int32_t)’:
/root/snort_src/flatbuffers-1.12.0/tests/arrays_test_generated.h:156:34: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct MyGame::Example::NestedStruct’; use assignment or value-initialization instead [-Werror=class-memaccess]
156 | std::memset(d_, 0, sizeof(d_));
| ^
/root/snort_src/flatbuffers-1.12.0/tests/arrays_test_generated.h:66:40: note: ‘struct MyGame::Example::NestedStruct’ declared here
66 | FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) NestedStruct FLATBUFFERS_FINAL_CLASS {
| ^~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/flattests.dir/build.make:160:CMakeFiles/flattests.dir/tests/test.cpp.o] 错误 1
make[2]: 离开目录“/root/snort_src/flatbuffers-build”
make[1]: *** [CMakeFiles/Makefile2:282:CMakeFiles/flattests.dir/all] 错误 2
make[1]: 离开目录“/root/snort_src/flatbuffers-build”
make: *** [Makefile:163:all] 错误 2 |
这个错误是源于snort 官方文档:在Ubuntu Linux 18-20 上配置Snort环境的 2021年2月版文档,希望能帮到受到同样错误烦恼的人,同时也希望有人能够给出这个错误的原因。