Skip to content

Failing to compiler from master head #7129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
madwax opened this issue Mar 6, 2025 · 3 comments
Open

Failing to compiler from master head #7129

madwax opened this issue Mar 6, 2025 · 3 comments

Comments

@madwax
Copy link

madwax commented Mar 6, 2025

Issue

build of master failed.
I have just setup a Ubuntu 24.04 machine, cloned master (9857dcf) and tried to build using cmake as outline in the instructions.

I get the following errors:

In file included from /home/madwax/devel/tmp/osrm-backend/include/extractor/scripting_environment_lua.hpp:15,
from /home/madwax/devel/tmp/osrm-backend/src/extractor/scripting_environment_lua.cpp:1:
In member function ‘void sol::stack::field_getter<T, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[23]; T = char [23]; bool global = false; bool raw = false; = void]’,
inlined from ‘void sol::stack::get_field(lua_State*, Key&&, int) [with bool global = false; bool raw = false; Key = const char (&)[23]]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:12092:62,
inlined from ‘sol::stack::probe sol::stack::probe_field_getter<T, P, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[23]; T = char [23]; P = int; bool b = false; bool raw = false; = void]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16329:21,
inlined from ‘sol::stack::probe sol::stack::probe_field_getter<T, P, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[15]; T = char [15]; P = int; bool b = false; bool raw = false; = void]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16323:9,
inlined from ‘sol::stack::probe sol::stack::probe_get_field(lua_State*, Key&&, int) [with bool global = false; bool raw = false; C = int; Key = const char (&)[15]]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:12112:78,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get_deep_optional(int&, int, Key&&, Keys&& ...) const [with bool global = false; bool raw = false; sol::detail::insert_mode mode = sol::detail::none; T = sol::optional; Key = const char (&)[15]; Keys = {}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25627:62,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get_single(int, Keys&& ...) const [with bool raw = false; Ret = sol::optional; Keys = {const char (&)[15]}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25533:83,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get(Keys&& ...) const [with T = sol::optional; Keys = {const char (&)[15]}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25860:40,
inlined from ‘decltype(auto) sol::table_proxy< , >::tuple_get(std::index_sequence<_Ind ...>) const & [with T = sol::optional; long unsigned int ...I = {0}; Table = sol::basic_table_core<false, sol::basic_reference >&; Key = std::tuple<const char (&)[15]>]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:24742:39,
inlined from ‘decltype(auto) sol::table_proxy< , >::get() const & [with T = sol::optional; Table = sol::basic_table_core<false, sol::basic_reference >&; Key = std::tuple<const char (&)[15]>]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:24847:23,
inlined from ‘sol::proxy_base< >::operator T() const [with T = sol::optional; typename std::enable_if<sol::meta::all<std::integral_constant<bool, (! std::integral_constant<bool, ((((((is_string_literal_array_of_v<T, char> || is_same_v<T, const char*>) || is_same_v<T, char>) || is_string_of_v<T, char>) || is_same_v<T, std::initializer_list >) || is_string_view_of_v<T, char>) || is_null_pointer_v)>::value)>, sol::is_proxy_primitive<typename std::remove_cv<typename std::remove_reference<Iter>::type>::type> >::value, sol::meta::enable_t>::type = sol::meta::enable_t::; Super = sol::table_proxy<sol::basic_table_core<false, sol::basic_reference >&, std::tuple<const char (&)[15]> >]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16973:32,
inlined from ‘osrm::extractor::Sol2ScriptingEnvironment::InitContext(osrm::extractor::LuaScriptingContext&)::<lambda()>’ at /home/madwax/devel/tmp/osrm-backend/src/extractor/scripting_environment_lua.cpp:644:85:
/home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16152:49: error: array subscript ‘const char [23][0]’ is partly outside array bounds of ‘const char [15]’ [-Werror=array-bounds=]
16152 | lua_getfield(L, tableindex, &key[0]);
| ^~~~~~~~~~~~
In member function ‘void sol::stack::field_getter<T, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[30]; T = char [30]; bool global = false; bool raw = false; = void]’,
inlined from ‘void sol::stack::get_field(lua_State*, Key&&, int) [with bool global = false; bool raw = false; Key = const char (&)[30]]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:12092:62,
inlined from ‘sol::stack::probe sol::stack::probe_field_getter<T, P, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[30]; T = char [30]; P = bool; bool b = false; bool raw = false; = void]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16329:21,
inlined from ‘sol::stack::probe sol::stack::probe_field_getter<T, P, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[18]; T = char [18]; P = bool; bool b = false; bool raw = false; = void]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16323:9,
inlined from ‘sol::stack::probe sol::stack::probe_get_field(lua_State*, Key&&, int) [with bool global = false; bool raw = false; C = bool; Key = const char (&)[18]]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:12112:78,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get_deep_optional(int&, int, Key&&, Keys&& ...) const [with bool global = false; bool raw = false; sol::detail::insert_mode mode = sol::detail::none; T = sol::optional; Key = const char (&)[18]; Keys = {}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25627:62,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get_single(int, Keys&& ...) const [with bool raw = false; Ret = sol::optional; Keys = {const char (&)[18]}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25533:83,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get(Keys&& ...) const [with T = sol::optional; Keys = {const char (&)[18]}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25860:40,
inlined from ‘decltype(auto) sol::table_proxy< , >::tuple_get(std::index_sequence<_Ind ...>) const & [with T = sol::optional; long unsigned int ...I = {0}; Table = sol::basic_table_core<false, sol::basic_reference >&; Key = std::tuple<const char (&)[18]>]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:24742:39,
inlined from ‘decltype(auto) sol::table_proxy< , >::get() const & [with T = sol::optional; Table = sol::basic_table_core<false, sol::basic_reference >&; Key = std::tuple<const char (&)[18]>]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:24847:23,
inlined from ‘sol::proxy_base< >::operator T() const [with T = sol::optional; typename std::enable_if<sol::meta::all<std::integral_constant<bool, (! std::integral_constant<bool, ((((((is_string_literal_array_of_v<T, char> || is_same_v<T, const char*>) || is_same_v<T, char>) || is_string_of_v<T, char>) || is_same_v<T, std::initializer_list >) || is_string_view_of_v<T, char>) || is_null_pointer_v)>::value)>, sol::is_proxy_primitive<typename std::remove_cv<typename std::remove_reference<Iter>::type>::type> >::value, sol::meta::enable_t>::type = sol::meta::enable_t::; Super = sol::table_proxy<sol::basic_table_core<false, sol::basic_reference >&, std::tuple<const char (&)[18]> >]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16973:32,
inlined from ‘osrm::extractor::Sol2ScriptingEnvironment::InitContext(osrm::extractor::LuaScriptingContext&)::<lambda()>’ at /home/madwax/devel/tmp/osrm-backend/src/extractor/scripting_environment_lua.cpp:663:83:
/home/madwax/devel/tmp/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]);
| ^~~~~~~~~~~~
In member function ‘void sol::stack::field_getter<T, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[23]; T = char [23]; bool global = false; bool raw = false; = void]’,
inlined from ‘void sol::stack::get_field(lua_State*, Key&&, int) [with bool global = false; bool raw = false; Key = const char (&)[23]]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:12092:62,
inlined from ‘sol::stack::probe sol::stack::probe_field_getter<T, P, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[23]; T = char [23]; P = int; bool b = false; bool raw = false; = void]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16329:21,
inlined from ‘sol::stack::probe sol::stack::probe_field_getter<T, P, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[17]; T = char [17]; P = unsigned int; bool b = false; bool raw = false; = void]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16323:9,
inlined from ‘sol::stack::probe sol::stack::probe_get_field(lua_State*, Key&&, int) [with bool global = false; bool raw = false; C = unsigned int; Key = const char (&)[17]]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:12112:78,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get_deep_optional(int&, int, Key&&, Keys&& ...) const [with bool global = false; bool raw = false; sol::detail::insert_mode mode = sol::detail::none; T = sol::optional; Key = const char (&)[17]; Keys = {}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25627:62,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get_single(int, Keys&& ...) const [with bool raw = false; Ret = sol::optional; Keys = {const char (&)[17]}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25533:83,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get(Keys&& ...) const [with T = sol::optional; Keys = {const char (&)[17]}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25860:40,
inlined from ‘decltype(auto) sol::table_proxy< , >::tuple_get(std::index_sequence<_Ind ...>) const & [with T = sol::optional; long unsigned int ...I = {0}; Table = sol::basic_table_core<false, sol::basic_reference >&; Key = std::tuple<const char (&)[17]>]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:24742:39,
inlined from ‘decltype(auto) sol::table_proxy< , >::get() const & [with T = sol::optional; Table = sol::basic_table_core<false, sol::basic_reference >&; Key = std::tuple<const char (&)[17]>]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:24847:23,
inlined from ‘sol::proxy_base< >::operator T() const [with T = sol::optional; typename std::enable_if<sol::meta::all<std::integral_constant<bool, (! std::integral_constant<bool, ((((((is_string_literal_array_of_v<T, char> || is_same_v<T, const char*>) || is_same_v<T, char>) || is_string_of_v<T, char>) || is_same_v<T, std::initializer_list >) || is_string_view_of_v<T, char>) || is_null_pointer_v)>::value)>, sol::is_proxy_primitive<typename std::remove_cv<typename std::remove_reference<Iter>::type>::type> >::value, sol::meta::enable_t>::type = sol::meta::enable_t::; Super = sol::table_proxy<sol::basic_table_core<false, sol::basic_reference >&, std::tuple<const char (&)[17]> >]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16973:32,
inlined from ‘osrm::extractor::Sol2ScriptingEnvironment::InitContext(osrm::extractor::LuaScriptingContext&)::<lambda()>’ at /home/madwax/devel/tmp/osrm-backend/src/extractor/scripting_environment_lua.cpp:667:85:
/home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16152:49: error: array subscript ‘const char [23][0]’ is partly outside array bounds of ‘const char [17]’ [-Werror=array-bounds=]
16152 | lua_getfield(L, tableindex, &key[0]);
| ^~~~~~~~~~~~
In member function ‘void sol::stack::field_getter<T, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[30]; T = char [30]; bool global = false; bool raw = false; = void]’,
inlined from ‘void sol::stack::get_field(lua_State*, Key&&, int) [with bool global = false; bool raw = false; Key = const char (&)[30]]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:12092:62,
inlined from ‘sol::stack::probe sol::stack::probe_field_getter<T, P, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[30]; T = char [30]; P = bool; bool b = false; bool raw = false; = void]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16329:21,
inlined from ‘sol::stack::probe sol::stack::probe_field_getter<T, P, global, raw, >::get(lua_State*, Key&&, int) [with Key = const char (&)[18]; T = char [18]; P = bool; bool b = false; bool raw = false; = void]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16323:9,
inlined from ‘sol::stack::probe sol::stack::probe_get_field(lua_State*, Key&&, int) [with bool global = false; bool raw = false; C = bool; Key = const char (&)[18]]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:12112:78,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get_deep_optional(int&, int, Key&&, Keys&& ...) const [with bool global = false; bool raw = false; sol::detail::insert_mode mode = sol::detail::none; T = sol::optional; Key = const char (&)[18]; Keys = {}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25627:62,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get_single(int, Keys&& ...) const [with bool raw = false; Ret = sol::optional; Keys = {const char (&)[18]}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25533:83,
inlined from ‘decltype(auto) sol::basic_table_core<, >::traverse_get(Keys&& ...) const [with T = sol::optional; Keys = {const char (&)[18]}; bool top_level = false; ref_t = sol::basic_reference]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:25860:40,
inlined from ‘decltype(auto) sol::table_proxy< , >::tuple_get(std::index_sequence<_Ind ...>) const & [with T = sol::optional; long unsigned int ...I = {0}; Table = sol::basic_table_core<false, sol::basic_reference >&; Key = std::tuple<const char (&)[18]>]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:24742:39,
inlined from ‘decltype(auto) sol::table_proxy< , >::get() const & [with T = sol::optional; Table = sol::basic_table_core<false, sol::basic_reference >&; Key = std::tuple<const char (&)[18]>]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:24847:23,
inlined from ‘sol::proxy_base< >::operator T() const [with T = sol::optional; typename std::enable_if<sol::meta::all<std::integral_constant<bool, (! std::integral_constant<bool, ((((((is_string_literal_array_of_v<T, char> || is_same_v<T, const char*>) || is_same_v<T, char>) || is_string_of_v<T, char>) || is_same_v<T, std::initializer_list >) || is_string_view_of_v<T, char>) || is_null_pointer_v)>::value)>, sol::is_proxy_primitive<typename std::remove_cv<typename std::remove_reference<Iter>::type>::type> >::value, sol::meta::enable_t>::type = sol::meta::enable_t::; Super = sol::table_proxy<sol::basic_table_core<false, sol::basic_reference >&, std::tuple<const char (&)[18]> >]’ at /home/madwax/devel/tmp/osrm-backend/third_party/sol2/include/sol/sol.hpp:16973:32,
inlined from ‘osrm::extractor::Sol2ScriptingEnvironment::InitContext(osrm::extractor::LuaScriptingContext&)::<lambda()>’ at /home/madwax/devel/tmp/osrm-backend/src/extractor/scripting_environment_lua.cpp:671:83:
/home/madwax/devel/tmp/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]);

Steps to reproduce

  • Clone
  • cmake et al

Specifications

Please provide details of your development environment.

  • brand new Ubuntu 24.04 machine setup with the apt package list defined for 22.04

I get it's not a release and I don't know if you run the no breaking master/main rule.

@DennisOSRM
Copy link
Collaborator

Can you post the output from the cmake run? Probably an incompatibility of dependencies and/or compiler versions. At least that's the initial guess.

@madwax
Copy link
Author

madwax commented Mar 7, 2025

As asked for the build output:
putty.log

I think the problem is the compiler. I run into the same problem building v5.27.1 from git or downloaded source. I had a very quick poke around to fix it but somehow what I through was the fix failed due to key being something else other than a char[], I had to give up at that point.

@donno
Copy link

donno commented Mar 11, 2025

This looks like a duplicate of #6704, newer versions of GCC are picking up a problem in sol2 (a dependency of osrm-backend) or a GCC bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants