1.0.2+ wont build
Maxim Dounin
mdounin at mdounin.ru
Thu Jun 30 16:06:37 MSD 2011
Hello!
On Wed, Jun 29, 2011 at 03:42:26PM -0500, OQ wrote:
> In auto/cc/gcc, you have:
>
> CFLAGS="$CFLAGS -Werror"
>
> and
>
> CFLAGS="$CFLAGS -Wunused-variable"
>
> so when building 1.0.2+ you receive this error:
>
> gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
> -Wunused-function -Wunused-variable -Wunused-value -Werror -g -O2 -I
> src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
> -o objs/src/event/ngx_event_openssl.o \
> src/event/ngx_event_openssl.c
> src/event/ngx_event_openssl.c: In function ‘ngx_ssl_get_cached_session’:
> src/event/ngx_event_openssl.c:1690:31: error: variable ‘c’ set but not
> used [-Werror=unused-but-set-variable]
> cc1: all warnings being treated as errors
>
> make[1]: *** [objs/src/event/ngx_event_openssl.o] Error 1
Yes, thank you for report (though it's about gcc 4.6+, not about
nginx 1.0.2+). Try the attached patch.
Obvious workaround is to use
./configure --with-cc-opt="-Wno-unused-but-set-variable"
Maxim Dounin
More information about the nginx
mailing list