Issue with `system_lua` option regarding header location
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- build-system
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Zig
- Star
- 530
- Fork
- 74
- Merge trung bình
- 9 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của natecraddock/ziglua
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
natecraddock/ziglua#214 · 5 bình luận ·
-
Feature parityĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
natecraddock/ziglua#112 · 5 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
natecraddock/ziglua#101 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
natecraddock/ziglua#75 · 7 bình luận ·
-
Redo the debug interfaceĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
natecraddock/ziglua#57 · 3 bình luận ·
Tất cả issue của natecraddock/ziglua
Issue tương tự
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
NVIDIA/flare-local-inference#90 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
osam-cologne/archlinux-proaudio#917 ·
Maintainer thường phản hồi trong vòng 1 ngày