Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Issue with `system_lua` option regarding header location

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, lua
領域
build-system

調査の方向性

Start in build.zig, where the system_lua option and the additional_system_headers handling feed the translate-c step, and read the comment above the addSystemIncludePath() call. Reproduce by pointing system_lua at a distro layout such as /usr/include/luajit-2.1. The issue offers two API directions, an additional_headers option or a ?LazyPath for system_lua, but the maintainer has not chosen one, so agree on the API before writing code. Done means system Lua headers in subdirectories resolve without the -isystem/-I conflict warning.

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

説明

If you set system_lua to true, you may be given an error that it cannot find the Lua headers defined in build/include/*.h, because most distributions/operating systems will put the header files inside a subdirectory, e.g. /usr/include/luajit-2.1.

To fix this, I tried adding the LuaJIT include path using ziglua's additional_system_headers option, but that gave me a quite strange error:

error: warning: add "/usr/include/luajit-2.1" to header searchlist '-isystem' conflicts with '-I'

The fix for this is to add it as a regular include path with addIncludePath() instead of addSystemIncludePath(), but that may break other usecases (e.g. the one mentioned in the comment right above that call in the code).

So personally, I see two (good) options here:

  • Adding an additional_headers option, in the same vein as additional_system_headers;
  • Letting system_lua take a ?LazyPath type, where null means compiling the selected Lua version, and any LazyPath means adding the given path as an include path for translate-c.
主要言語
Zig
スター
530
フォーク
74
平均マージ
6日 15時間
マージ済み PR(30日)
1

環境構築

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

はじめの一歩

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

natecraddock/ziglua のほかの issue

natecraddock/ziglua の issue をすべて見る

似ている issue

Build System の issue をもっと見る

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

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