effil icon indicating copy to clipboard operation
effil copied to clipboard

Compilation issue with Sol.

Open stustd opened this issue 2 years ago • 5 comments

I recursively git-cloned the effil repo and encounter the following Sol-related compilation issue (using LuaJit-2.1.0-beta3):

dev10@ax010:[lua-5.1-luajit]: make
[  7%] Building CXX object CMakeFiles/effil.dir/src/cpp/channel.cpp.o
In file included from /home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/src/cpp/this-thread.h:3,
                 from /home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/src/cpp/notifier.h:3,
                 from /home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/src/cpp/channel.h:3,
                 from /home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/src/cpp/channel.cpp:1:
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp: In instantiation of ‘static int sol::stack::pusher<wchar_t [N]>::push(lua_State*, const wchar_t (&)[N], std::size_t) [with long unsigned int N = 2; lua_State = lua_State; std::size_t = long unsigned int]’:
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:4800:48:   required from ‘int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const wchar_t (&)[2]; Args = {int}; lua_State = lua_State]’
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:7154:23:   required from here
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:7124:67: error: call of overloaded ‘push<const wchar_t*>(lua_State*&, const wchar_t [2], const wchar_t*)’ is ambiguous
 7124 |                                 return stack::push<const wchar_t*>(L, str, str + sz);
      |                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:4799:28: note: candidate: ‘int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const wchar_t*; Args = {const wchar_t*}; lua_State = lua_State]’
 4799 |                 inline int push(lua_State* L, T&& t, Args&&... args) {
      |                            ^~~~
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:4805:28: note: candidate: ‘int sol::stack::push(lua_State*, Arg&&, Args&& ...) [with T = const wchar_t*; Arg = const wchar_t (&)[2]; Args = {const wchar_t*}; <template-parameter-1-4> = void; lua_State = lua_State]’
 4805 |                 inline int push(lua_State* L, Arg&& arg, Args&&... args) {
      |                            ^~~~
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp: In instantiation of ‘static int sol::stack::pusher<char16_t [N]>::push(lua_State*, const char16_t (&)[N], std::size_t) [with long unsigned int N = 2; lua_State = lua_State; std::size_t = long unsigned int]’:
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:4800:48:   required from ‘int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const char16_t (&)[2]; Args = {int}; lua_State = lua_State]’
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:7162:23:   required from here
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:7135:68: error: call of overloaded ‘push<const char16_t*>(lua_State*&, const char16_t [2], const char16_t*)’ is ambiguous
 7135 |                                 return stack::push<const char16_t*>(L, str, str + sz);
      |                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:4799:28: note: candidate: ‘int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const char16_t*; Args = {const char16_t*}; lua_State = lua_State]’
 4799 |                 inline int push(lua_State* L, T&& t, Args&&... args) {
      |                            ^~~~
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:4805:28: note: candidate: ‘int sol::stack::push(lua_State*, Arg&&, Args&& ...) [with T = const char16_t*; Arg = const char16_t (&)[2]; Args = {const char16_t*}; <template-parameter-1-4> = void; lua_State = lua_State]’
 4805 |                 inline int push(lua_State* L, Arg&& arg, Args&&... args) {
      |                            ^~~~
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp: In instantiation of ‘static int sol::stack::pusher<char32_t [N]>::push(lua_State*, const char32_t (&)[N], std::size_t) [with long unsigned int N = 2; lua_State = lua_State; std::size_t = long unsigned int]’:
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:4800:48:   required from ‘int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const char32_t (&)[2]; Args = {int}; lua_State = lua_State]’
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:7170:23:   required from here
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:7146:68: error: call of overloaded ‘push<const char32_t*>(lua_State*&, const char32_t [2], const char32_t*)’ is ambiguous
 7146 |                                 return stack::push<const char32_t*>(L, str, str + sz);
      |                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:4799:28: note: candidate: ‘int sol::stack::push(lua_State*, T&&, Args&& ...) [with T = const char32_t*; Args = {const char32_t*}; lua_State = lua_State]’
 4799 |                 inline int push(lua_State* L, T&& t, Args&&... args) {
      |                            ^~~~
/home/dev10/workspace/thirdparty/src/lua/packages/effil/effil/libs/sol/single/sol/sol.hpp:4805:28: note: candidate: ‘int sol::stack::push(lua_State*, Arg&&, Args&& ...) [with T = const char32_t*; Arg = const char32_t (&)[2]; Args = {const char32_t*}; <template-parameter-1-4> = void; lua_State = lua_State]’
 4805 |                 inline int push(lua_State* L, Arg&& arg, Args&&... args) {
      |                            ^~~~
make[2]: *** [CMakeFiles/effil.dir/build.make:76: CMakeFiles/effil.dir/src/cpp/channel.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/effil.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
dev10@ax010:[lua-5.1-luajit]:

Anyone an idea what goes wrong? Thanks.

Solved: no compilation errors with clang++ (instead of g++).

stustd avatar Jul 19 '23 08:07 stustd

Solved: no compilation errors with clang++ (instead of g++).

stustd avatar Jul 26 '23 19:07 stustd