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
-
难度 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 天内回复