Issue with `system_lua` option regarding header location
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Domínio
- build-system
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Zig
- Estrelas
- 530
- Forks
- 74
- Merge médio
- 6d 15h
- PRs com merge (30d)
- 1
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de natecraddock/ziglua
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
natecraddock/ziglua#214 · 3 comentários ·
-
Feature parityAberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
natecraddock/ziglua#112 · 5 comentários ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 20/100
natecraddock/ziglua#101 ·
-
feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
natecraddock/ziglua#75 · 7 comentários ·
-
Define apicheck function to use a Zig panicTalvez já em andamento @natecraddock assumiu há 166 dias. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
natecraddock/ziglua#71 · 5 comentários ·
Todas as issues de natecraddock/ziglua
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
polhenarejos/pico-fido#302 ·
-
A-testing C-bug E-small P-low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
NationalSecurityAgency/ghidra#9997 · 2 comentários ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
vercel/turborepo#14885 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
bug websites
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
quarto-dev/quarto-cli#15176 ·
Mantenedores costumam responder em até 1 dia