Issue with `system_lua` option regarding header location
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- 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_headersoption, in the same vein asadditional_system_headers; - Letting
system_luatake a?LazyPathtype, wherenullmeans compiling the selected Lua version, and anyLazyPathmeans adding the given path as an include path fortranslate-c.
- 主要言語
- Zig
- スター
- 530
- フォーク
- 74
- 平均マージ
- 6日 15時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
natecraddock/ziglua のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
natecraddock/ziglua#214 · コメント 3 件 ·
-
Feature parityオープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
natecraddock/ziglua#112 · コメント 5 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
natecraddock/ziglua#101 ·
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
natecraddock/ziglua#75 · コメント 7 件 ·
-
Define apicheck function to use a Zig panic対応中かも @natecraddock が 166 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
natecraddock/ziglua#71 · コメント 5 件 ·
natecraddock/ziglua の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
polhenarejos/pico-fido#302 ·
-
A-testing C-bug E-small P-low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NationalSecurityAgency/ghidra#9997 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vercel/turborepo#14885 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug websites
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
quarto-dev/quarto-cli#15176 ·
メンテナーはふだん 1 日以内に返信