Skip to content
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

s25rttr fails to compile with: ../include/kaguya/detail/lua_function_def.hpp:165:18: error: no matching function for call to 'lua_resume' #1729

Closed
stefson opened this issue Jan 3, 2025 · 4 comments

Comments

@stefson
Copy link
Contributor

stefson commented Jan 3, 2025

this is the musl branch from #1727 , but on a glibc amd64-linux.

from the build log:


FAILED: libs/libGamedata/CMakeFiles/gamedata.dir/gameData/EdgeDesc.cpp.o 
/usr/lib/llvm/19/bin/clang++-19 -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_NOWIDE_DYN_LINK -DBOOST_NOWIDE_NO_LIB -DHAVE_MEMCHECK_H -DHAVE_STRUCT_TIMESPEC -I/var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/libs/libGamedata -I/var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/external/libutil/libs/common/include -I/var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/external/libendian/include -I/var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/external/mygettext/include -I/var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/libs/common/include -I/var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/external/libutil/libs/log/include -I/var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/libs/rttrConfig/src -isystem /usr/include/lua5.4 -isystem /var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/external/kaguya/include  -Og -ggdb -std=gnu++14 -std=c++17 -fvisibility=hidden -fvisibility-inlines-hidden -mfpmath=sse -msse2 -Wall -pedantic -Wextra -Werror -Wno-unused-command-line-argument -fno-strict-aliasing -pedantic-errors -Qunused-arguments -Wcast-qual -Wdisabled-optimization -Wfloat-conversion -Wformat-nonliteral -Wformat-security -Wformat=2 -Wimport -Winit-self -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wparentheses -Wpedantic -Wpointer-arith -Wstrict-aliasing=2 -Wundef -Wunused -Wunused-parameter -Wwrite-strings -Wno-unknown-pragmas -Wctor-dtor-privacy -Woverloaded-virtual -Wno-error=inconsistent-missing-override -Wredundant-decls -MD -MT libs/libGamedata/CMakeFiles/gamedata.dir/gameData/EdgeDesc.cpp.o -MF libs/libGamedata/CMakeFiles/gamedata.dir/gameData/EdgeDesc.cpp.o.d -o libs/libGamedata/CMakeFiles/gamedata.dir/gameData/EdgeDesc.cpp.o -c /var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/libs/libGamedata/gameData/EdgeDesc.cpp
In file included from /var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/libs/libGamedata/gameData/EdgeDesc.cpp:7:
In file included from /var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/libs/libGamedata/lua/CheckedLuaTable.h:9:
In file included from /var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/external/kaguya/include/kaguya/kaguya.hpp:9:
In file included from /var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/external/kaguya/include/kaguya/lua_ref.hpp:20:
In file included from /var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/external/kaguya/include/kaguya/detail/lua_variant_def.hpp:8:
/var/tmp/portage/games-strategy/s25rttr-9999-r6/work/s25rttr-9999/external/kaguya/include/kaguya/detail/lua_function_def.hpp:165:18: error: no matching function for call to 'lua_resume'
  165 |     int result = lua_resume(thread, state, argnum);
      |                  ^~~~~~~~~~
/usr/include/lua5.4/lua.h:311:15: note: candidate function not viable: requires 4 arguments, but 3 were provided
  311 | LUA_API int  (lua_resume)     (lua_State *L, lua_State *from, int narg,
      |               ^                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  312 |                                int *nres);
      |                                ~~~~~~~~~
1 error generated.

there is lua-5.3 and lua-5.4 present

full build log: build.log.gz

@Flamefire
Copy link
Member

Kaguya is not compatible with lua 5.4, you have to use 5.3 or earlier

@stefson
Copy link
Contributor Author

stefson commented Jan 3, 2025

hmm okay, I will check how to force the 5.3 on it (my setup works with the main/release branch)

@Flamefire
Copy link
Member

You can set LUA_INCLUDE_DIR and LUA_LIBRARY CMake variables explicitly if it finds a too recent version

@stefson
Copy link
Contributor Author

stefson commented Jan 5, 2025

I forced to compile against lua-5.3, problem solved.

@stefson stefson closed this as completed Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants