Opened 2 years ago
Closed 2 years ago
Last modified 12 days ago
#2104 closed defect (fixed)
I encountered an error when compiling nginx-quic.
|Reported by:||Owned by:|
src/event/ngx_event_quic_transport.c: In function ‘ngx_quic_create_stream’: src/event/ngx_event_quic_transport.c:60:27: error: comparison is always true due to limited range of data type [-Werror=type-limits] : ((uint32_t) value) <= 16383 ? 2 \ ^ src/event/ngx_event_quic_transport.c:1376:15: note: in expansion of macro ‘ngx_quic_varint_len’ len = ngx_quic_varint_len(sf->type); ^ src/event/ngx_event_quic_transport.c:61:27: error: comparison is always true due to limited range of data type [-Werror=type-limits] : ((uint64_t) value) <= 1073741823 ? 4 \ ^ src/event/ngx_event_quic_transport.c:1376:15: note: in expansion of macro ‘ngx_quic_varint_len’ len = ngx_quic_varint_len(sf->type); ^ cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I/tmp/boringssl/include -I src/core -I src/event -I src/event/modules -I src/os/unix -I /tmp/libpcre -I /tmp/zlib -I objs \ -o objs/src/event/ngx_event_quic_protection.o \ src/event/ngx_event_quic_protection.c cc1: all warnings being treated as errors make: *** [objs/src/event/ngx_event_quic_transport.o] Error 1 objs/Makefile:1015: recipe for target 'objs/src/event/ngx_event_quic_transport.o' failed make: *** Waiting for unfinished jobs.... make: Leaving directory '/home/runner/work/shadowsocks_install/shadowsocks_install/nginx-quic-quic' Makefile:8: recipe for target 'build' failed make: *** [build] Error 2 Error: Process completed with exit code 2.
Here is a link to the detailed error message
Change History (7)
comment:1 by , 2 years ago
comment:2 by , 2 years ago
I don't know what version of nginx-quic is supposed to be the latest version.
This is the address of the source code package I downloaded.
comment:3 by , 2 years ago
I made a typo in the gcc version and need to correct it.
built by gcc 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1~16.04)
Linux 4.15.0-1098-azure x86_64
comment:4 by , 2 years ago
Yes, this is a known issue when compiling with gcc5.
It is believed to be a defect in the compiler,
because newer gcc versions do not produce such an error.
As a workaround, you can build nginx-quic with
Add this gcc options to --with-cc-opt as follows:
comment:5 by , 2 years ago
Thank you for your helpfulness in helping me finally compile it!👍
Already compiled and approved
comment:6 by , 2 years ago
|Status:||new → closed|
What is the nginx-quic revision?
What is a compiler and its version?