-
Notifications
You must be signed in to change notification settings - Fork 7
Description
While compiling the OSRM backend, I encountered a compilation error related to sol.hpp in third_party/sol2/include/sol/sol.hpp. The error points to an array bounds issue and is treated as an error due to -Werror=array-bounds.
Error :-
/home/nadim/osrm-backend/third_party/sol2/include/sol/sol.hpp:16152:49: error: array subscript ‘const char [30][0]’ is partly outside array bounds of ‘const char [18]’ [-Werror=array-bounds=]
16152 | lua_getfield(L, tableindex, &key[0]);
| ^~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-ambiguous-reversed-operator’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-deprecated-comma-subscript’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
gmake[2]: * [CMakeFiles/EXTRACTOR.dir/build.make:328: CMakeFiles/EXTRACTOR.dir/src/extractor/scripting_environment_lua.cpp.o] Error 1
gmake[1]: * [CMakeFiles/Makefile2:237: CMakeFiles/EXTRACTOR.dir/all] Error 2
gmake: * [Makefile:136: all] Error 2