Open
Description
Describe the bug
Default compile flags for nginx-sys doesn't allow to compile ngx crate without manual intervention on gcc 15.1 (Arch Linux rolling)
There's 2 erros to fix:
- Default ZLIB_VERSION (1.3.0) doesn't exist on the website anymore. I had to rewrite to 1.3.1
- nginx-sys crate compilation fails with the following error:
src/http/v2/ngx_http_v2_filter_module.c:151:36: error: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (6 chars into 5 available) [-Werror=unterminated-string-initialization]
src/http/v2/ngx_http_v2_filter_module.c:154:9: error: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (13 chars into 12 available) [-Werror=unterminated-string-initialization]
To fix it I had to manually add attribute ((nonstring)) to declaration into .cargo/registry/.../
To Reproduce
- cargo init --lib
- cargo add ngx
- cargo build
Expected behavior
Cargo builds simple library
Your environment
- Version of ngx = 0.4.1
- Version of Rust = 1.86.0
- Version of NGINX = 1.22.0
- Arch Linux rolling, gcc version 15.1.1 20250425 (GCC)
Additional context
I'm not sure if I need to send PR to nginx repo with attribute param or to you to change build flags, so feel free to close this issue if it's inappropriate repo.
Metadata
Metadata
Assignees
Labels
No labels