Today I’ve been working on setting up extra VPS clones and I’ve run into a strange and frustrating compile time error with the latest nginx development version (0.9.6).
I’m running Ubuntu 10.04.2 LTS x86_64, however, I’ve upgraded GCC to 4.6.1. ./configure runs without errors, but upon running make -j4 I’m presented with the following error:
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_open_file_cache.o \
src/core/ngx_open_file_cache.c
src/core/ngx_resolver.c: In function
‘ngx_resolver_process_ptr’:
src/core/ngx_resolver.c:1425:43:
error: variable ‘qclass’ set but not
used [-Werror=unused-but-set-variable]
src/core/ngx_resolver.c:1425:36:
error: variable ‘qtype’ set but not
used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as
errorsmake[1]: *
[objs/src/core/ngx_resolver.o] Error 1
make[1]: * Waiting for unfinished
jobs…. make[1]: Leaving directory
`/root/nginx-0.9.6′ make: *** [build]
Error 2
(Better seen at pastebin: http://pastebin.com/g0bNS2nY)
I’ve tried adding –with–cc-opt=”-W” to the ./configure options but without result. Can anyone please shed some light on this show stopper?
Many, many thanks in advance!
A nicer way to do this is to pass the following to ./configure