Could NOT find Lua (missing: LUA_LIBRARIES)
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 613
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
I've tried a dozen different things to get yuescript installed in an alpine docker container (devcontainer), and I've managed to get past every hurdle except the title. What precisely am I doing wrong?
current dockerfile for the container below:
FROM alpine:3.22
RUN apk add lua5.4-dev lua5.4-libs luarocks gcompat gcc g++ libc-dev git cmake make
ENV CXX=gcc
RUN luarocks-5.4 install yuescript
cmake output below
1.131 Installing https://luarocks.org/yuescript-0.30.3-1.src.rock
3.204 -- The CXX compiler identification is GNU 14.2.0
3.215 -- Detecting CXX compiler ABI info
3.301 -- Detecting CXX compiler ABI info - done
3.319 -- Check for working CXX compiler: /usr/bin/gcc - skipped
3.319 -- Detecting CXX compile features
3.320 -- Detecting CXX compile features - done
3.341 -- Could NOT find Lua (missing: LUA_LIBRARIES) (found version "5.4.7")
3.341 -- Lua: /usr/bin/lua5.4
3.341 -- Lua include: /usr/include/lua5.4
3.341 -- Lua library: LUA_LIBRARIES-NOTFOUND
3.392 -- The C compiler identification is GNU 14.2.0
3.400 -- Detecting C compiler ABI info
3.478 -- Detecting C compiler ABI info - done
3.493 -- Check for working C compiler: /usr/bin/cc - skipped
3.493 -- Detecting C compile features
3.494 -- Detecting C compile features - done
3.503 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
3.584 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
3.588 -- Found Threads: TRUE
3.588 -- Configuring done (0.4s)
3.589 CMake Error: The following variables are used in this project, but they ar
e set to NOTFOUND.
3.589 Please set them or make sure they are set and tested correctly in the CMak
e files:
3.589 LUA_LIBRARIES
3.589 linked by target "yue" in directory /tmp/luarocks_yuescript-0.30.3-1-7
156543/yuescript
3.589 linked by target "libyue" in directory /tmp/luarocks_yuescript-0.30.3-
1-7156543/yuescript
3.589
3.603 -- Generating done (0.0s)
3.603 CMake Generate step failed. Build files cannot be regenerated correctly.
3.611
3.611 Error: Build error: Failed cmake.
3.639
3.639 yuescript 0.30.3-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
lua libraries are present in the container at /usr/lib/lua5.4/liblua-5.4.so.0, /usr/lib/lua5.4/liblua-5.4.so.0.0.0, /usr/lib/lua5.4/liblua.a, and /usr/lib/lua5.4/liblua.so, but even manually setting the LUA_LIBRARIES environment variable to either that directory, or any of the .so files inside, does nothing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using the Alpine Dockerfile and the shown LuaRocks install command. Start by inspecting how CMake discovers Lua libraries in this build; done means the yuescript LuaRocks installation completes successfully in the container.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, docker, lua
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100