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 · 6 comments
Open

Failing to compiler from master head #7129

madwax opened this issue Mar 6, 2025 · 6 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

@tombay
Copy link

tombay commented May 20, 2025

It is a compiler bug. A workaround is to edit src/extractor/scripting_environment_lua.cpp and change some property assignments.
e.g. in
// version-dependent parts of the api
auto initV2Context = &
{

changefrom, to (for example)
< sol::optionalstd::int32_t u_turn_penalty = properties["u_turn_penalty"];

        std::int32_t i_turn_penalty = properties["u_turn_penalty"];
        sol::optional<std::int32_t> u_turn_penalty = i_turn_penalty;

The changed entries needed to change are:
sol::optionalstd::int32_t u_turn_penalty = properties["u_turn_penalty"];
sol::optional max_speed_for_map_matching = properties["max_speed_for_map_matching"];
sol::optional continue_straight_at_waypoint = properties["continue_straight_at_waypoint"];
sol::optional use_turn_restrictions = properties["use_turn_restrictions"];
sol::optional left_hand_driving = properties["left_hand_driving"];
sol::optional weight_precision = properties["weight_precision"];
sol::optional force_split_edges = properties["force_split_edges"];

I can't provide line numbers as it depends what build (tag version or master) you are building. (I did this on osrm-backend-6.0.0 as my master has problems with Obstacles).
The compiler error is related to "lazy" optimization of the strings. I moved allocation to the to of the if in ascending order and osrm-extract built.
e.g.
if (properties.valid())
{
sol::optionalstd::string weight_name = properties["weight_name"];
sol::optionalstd::int32_t u_turn_penalty = properties["u_turn_penalty"];
sol::optional weight_precision = properties["weight_precision"];
sol::optional force_split_edges = properties["force_split_edges"];
sol::optional left_hand_driving = properties["left_hand_driving"];
sol::optional use_turn_restrictions = properties["use_turn_restrictions"];
sol::optionalstd::int32_t traffic_signal_penalty = properties["traffic_signal_penalty"];
sol::optional max_speed_for_map_matching = properties["max_speed_for_map_matching"];
sol::optional continue_straight_at_waypoint = properties["continue_straight_at_waypoint"];

Whoever manages scripting_environment_lua.cpp could maybe do that. it could just be the order of the allocations within the block but I am happy that I can build it for now.

@tombay
Copy link

tombay commented May 20, 2025

gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04)

tom@metatom:~/Downloads/software/Project-OSRM/osrm-backend-6.0.0/src/extractor$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 13.3.0-6ubuntu2~24.04' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-13-fG75Ri/gcc-13-13.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-13-fG75Ri/gcc-13-13.3.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04) 

What I meant was - the code does the assignment followed by the test for != sol::nullopt. If you want to (i would) keep that then maybe just reordering the code to have the order above it might work.

@purew
Copy link

purew commented May 21, 2025

Compiling with latest clang works:

env CC=clang CXX=clang++ cmake .. -GNinja
ninja

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

5 participants