Issue building Yuescript module against LuaJIT

オープン
#169 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cmake, cpp, lua
領域
build-system

調査の方向性

CMakeLists.txt から始め、issue に示されている LuaJIT 構成を再現します。Lua の include ディレクトリがライブラリ検索パスに変換される仕組みと、LUA_LIBRARIES が NOTFOUND のままになる理由を調査します。CMake が構成を完了し、指定された LuaJIT ライブラリに対して yue と libyue のターゲットをビルドできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Lua
スター
620
フォーク
45
平均マージ
9時間 5分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

IppClub/YueScript のほかの issue

IppClub/YueScript の issue をすべて見る

似ている issue

Lua の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。