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 with prebuilt Lua Version #43

Open
aryajur opened this issue Nov 2, 2023 · 0 comments
Open

Build with prebuilt Lua Version #43

aryajur opened this issue Nov 2, 2023 · 0 comments

Comments

@aryajur
Copy link

aryajur commented Nov 2, 2023

I am trying to build with a pre-build Lua version. meson was not able to find my Lua version. I then defined a lua.pc file:

`
prefix=/path/to/my/lua
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/inc

Name: lua
Description: Lua programming language
Version: 5.3
Libs: -L${libdir} -llua
Cflags: -I${includedir}
`

I then get the following error:

Found pkg-config: C:\msys64\mingw32\bin/pkg-config.EXE (1.8.0)
Found CMake: C:\msys64\mingw32\bin/cmake.EXE (3.25.1)
Run-time dependency lua5.3 found: NO (tried pkgconfig and cmake)
Run-time dependency lua-5.3 found: NO (tried pkgconfig and cmake)
Run-time dependency lua53 found: NO (tried pkgconfig and cmake)
Run-time dependency lua found: YES 5.3
Run-time dependency libffi found: YES 3.4.4
Library dl found: NO
Computing int of "LUA_VERSION_NUM" with dependency lua: 503
Library lua found: NO
Library lua5.3 found: NO

../meson.build:144:8: ERROR: C++ shared or static library 'lua53' not found

the libdir already has lua53.dll file in there. After I renamed lua53.dll to lua.dll then that worked. But now it was not able to find the executable Lua.

So I made the deps subdirectory and put the lua53 executable and dll in there with all the include files in the deps/include subdirectory. Then I ran the command:

meson .. -Dlua_version=5.3 -Dlua_path=/path/to/cffi-lua-0.2.3/build/deps/lua.exe

that worked!

Now when I run ninja I get all fatal errors that it cannot find lua.hpp.

So I had to manually edit build.ninja to add the "-Ideps/include" term in the commands.
After that it worked.

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

1 participant