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

build fails - lua_objlen #343

Closed
andmarti1424 opened this issue Jun 4, 2021 · 6 comments
Closed

build fails - lua_objlen #343

andmarti1424 opened this issue Jun 4, 2021 · 6 comments

Comments

@andmarti1424
Copy link

Hello. I am getting this
Building CXX object CMakeFiles/stratagus.dir/src/network/netconnect.cpp.o /home/mongo/src/stratagus.wargus/stratagus/src/network/netconnect.cpp: In lambda function: /home/mongo/src/stratagus.wargus/stratagus/src/network/netconnect.cpp:1882:26: error: ‘lua_objlen’ was not declared in this scope; did you mean ‘lua_rawlen’? 1882 | auto i = lua_objlen(l, -1) + 1; | ^~~~~~~~~~ | lua_rawlen make[2]: *** [CMakeFiles/stratagus.dir/build.make:1880: CMakeFiles/stratagus.dir/src/network/netconnect.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:142: CMakeFiles/stratagus.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

Is this a lua issue?
I have both lua 5.1 and lua5.2..
Thanks.

@timfel
Copy link
Member

timfel commented Jun 4, 2021

It looks like your build is running against Lua 5.2, where this function no longer exists. Can you make sure you are using 5.1?

@andmarti1424
Copy link
Author

I see. Its there a way to force it use v 5.1?

@timfel
Copy link
Member

timfel commented Jun 4, 2021

I think you can set LUA_INCLUDE_DIR and LUA_LIBRARIES, but I don't actually know

@andmarti1424
Copy link
Author

This worked for me: cmake -DLUA_INCLUDE_DIR=/usr/include/lua5.1

@andmarti1424
Copy link
Author

thank you

@timfel
Copy link
Member

timfel commented Jun 4, 2021

you're welcome :)

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