Issue building Yuescript module against LuaJIT
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 613
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
I've been working on a Nix package for Yuescript's Lua module. What I have works fine when built against PUC-Rio Lua 5.1 or above, but fails when I attempt to build against LuaJIT:
yuescript 0.23.8-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
-- The CXX compiler identification is GNU 13.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Lua (missing: LUA_LIBRARIES) (found version "5.1.4")
-- Lua: /nix/store/iq8s1f6d5wjwy4k7dm24qa4jpa3iby54-luajit-2.1.1693350652/bin/luajit
-- Lua include: /nix/store/iq8s1f6d5wjwy4k7dm24qa4jpa3iby54-luajit-2.1.1693350652/include/luajit-2.1
-- Lua library: LUA_LIBRARIES-NOTFOUND
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done (0.4s)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LUA_LIBRARIES
linked by target "yue" in directory /build/source
linked by target "libyue" in directory /build/source
-- Generating done (0.0s)
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INCLUDE_PATH
CMake Generate step failed. Build files cannot be regenerated correctly.
Error: Build error: Failed cmake.
Based on CMakeLists.txt it looks like it should be looking for the library directory in ${LUA_INCDIR}/../lib ${LUA_INCDIR}/../../lib, and the latter exists and has the library file:
$ tree /nix/store/iq8s1f6d5wjwy4k7dm24qa4jpa3iby54-luajit-2.1.1693350652/include/luajit-2.1/../../lib
/nix/store/iq8s1f6d5wjwy4k7dm24qa4jpa3iby54-luajit-2.1.1693350652/include/luajit-2.1/../../lib
├── libluajit-5.1.a
├── libluajit-5.1.so -> libluajit-5.1.so.2.1.1693350652
├── libluajit-5.1.so.2 -> libluajit-5.1.so.2.1.1693350652
├── libluajit-5.1.so.2.1.1693350652
├── lua
│ └── 5.1
└── pkgconfig
└── luajit.pc
4 directories, 5 files
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
Start with CMakeLists.txt and reproduce the LuaJIT configuration shown in the issue. Inspect how the Lua include directory is converted into library search paths and why LUA_LIBRARIES remains NOTFOUND; done means CMake configures and builds the yue and libyue targets against the listed LuaJIT library.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, lua
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100