ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.06k stars 493 forks source link

Build failure on ubuntu 23.04 #1494

Closed tplsofteng closed 1 year ago

tplsofteng commented 1 year ago

Hi, I have tried building on ubuntu 23.04.

I have installed the following lua packages: liblua5.4-dev lua5.4

And the cmake command is copied from the ubuntu.yml:

cmake -B build/debug -D CMAKE_BUILD_TYPE:STRING=Debug "-DSOL2_LUA_VERSION:STRING=5.4" -DSOL2_PLATFORM:STRING=x64 -DSOL2_CI=ON -DSOL2_BUILD_LUA:BOOL=ON -DBUILD_LUA_AS_DLL:BOOL=OFF -DSOL2_TESTS:BOOL=ON -DSOL2_EXAMPLES:BOOL=ON -DSOL2_TESTS_EXAMPLES:BOOL=ON

I am encountering this error:

-- Found LuaBuild: liblua-5.4.4 (found version "5.4.4") 
-- Configuring done (4.6s)
CMake Error at cmake/Packages/FindLuaBuild/LuaVanilla.cmake:251 (add_dependencies):
  The dependency target "LUA_VANILLA" of target "liblua-5.4.4" does not
  exist.
Call Stack (most recent call first):
  cmake/Packages/FindLuaBuild.cmake:86 (include)
  cmake/Packages/FindLuaBuild.cmake:112 (find_lua_build)
  CMakeLists.txt:229 (find_package)

I have looked at https://sol2.readthedocs.io/en/latest/build.html but don't see any information regarding this.

Thanks.

devgs commented 1 year ago

I'm poking at the sky here, but just in case... You may actually have liblua-5.4.5, while Sol thinks that It's 5.4.4. Try specifying a concrete version with a patch number: -DSOL2_LUA_VERSION:STRING=5.4.5

tplsofteng commented 1 year ago

Yes this was the issue, actual version that worked was 5.4.7. Thank You