Issue with `system_lua` option regarding header location
還沒有人認領這個 Issue。
評估
- 難度
- 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 小時
- 30 天內合併 PR
- 1
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
natecraddock/ziglua 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 35/100
natecraddock/ziglua#214 · 3 則留言 ·
-
Feature parity未關閉
難度 5/5 一週以上 新手友好度 35/100
natecraddock/ziglua#112 · 5 則留言 ·
-
難度 5/5 一週以上 新手友好度 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
-
category:port-update
難度 2/5 1-3 小時 新手友好度 66/100
維護者通常 2 天內回覆
-
dev/release: verify-release-candidate.sh runs 0 Java tests with Debian's Maven可能已有人在做 @kou 今天認領。 未關閉Type: bug
難度 2/5 1-3 小時 新手友好度 72/100
apache/arrow-adbc#4947 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
facebookresearch/faiss#5775 · 1 則留言 ·
維護者通常 2 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
bug
難度 1/5 1 小時以內 新手友好度 84/100
AOSSIE-Org/OpenVerifiableLLM#216 · 1 則留言 ·
維護者通常 1 天內回覆