yaoweibin/nginx_tcp_proxy_module — Issue #14: Compile error with nginx-1.1.5 and nginx-gridfs
Author: optixx
Created: 2011-10-23 17:22:04+00:00
State: open

I can build the nginx_tcp_proxy module without any problem. As soon as i add the the gridfs module to the build process i get errors during the nginx_tcp_proxy build.

cc1: warnings being treated as errors
In file included from ../nginx_tcp_proxy_module/ngx_tcp.h:30,
from ../nginx_tcp_proxy_module//ngx_tcp.c:5:
../nginx_tcp_proxy_module/ngx_tcp_upstream.h:120: error: declaration does not declare anything
make[1]: *** [objs/addon/nginx_tcp_proxy_module/ngx_tcp.o] Error 1
make[1]: Leaving directory `/opt/build/nginx-1.1.5'
make: *** [build] Error 2
make -f objs/Makefile install
make[1]: Entering directory `/opt/build/nginx-1.1.5'
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g --std=c99 -Isrc -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../nginx_tcp_proxy_module//modules -I ../nginx_tcp_proxy_module/ -I objs -I src/http -I src/http/modules -I src/mail \
-o objs/addon/nginx_tcp_proxy_module/ngx_tcp.o \
../nginx_tcp_proxy_module//ngx_tcp.c
cc1: warnings being treated as errors
In file included from ../nginx_tcp_proxy_module/ngx_tcp.h:30,
from ../nginx_tcp_proxy_module//ngx_tcp.c:5:
../nginx_tcp_proxy_module/ngx_tcp_upstream.h:120: error: declaration does not declare anything

When i remove the -Werror from the nginx Makfile, the build fails on bit later:

gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -g --std=c99 -Isrc -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../nginx_tcp_proxy_module//modules -I ../nginx_tcp_proxy_module/ -I objs -I src/http -I src/http/modules -I src/mail \
-o objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream.o \
../nginx_tcp_proxy_module//ngx_tcp_upstream.c
In file included from ../nginx_tcp_proxy_module/ngx_tcp.h:30,
from ../nginx_tcp_proxy_module//ngx_tcp_upstream.c:4:
../nginx_tcp_proxy_module/ngx_tcp_upstream.h:120: warning: declaration does not declare anything
../nginx_tcp_proxy_module//ngx_tcp_upstream.c:82: error: ‘ngx_tcp_upstream_srv_conf_t’ has no member named ‘status_alive’
../nginx_tcp_proxy_module//ngx_tcp_upstream.c:89: error: ‘ngx_tcp_upstream_srv_conf_t’ has no member named ‘status_alive’
../nginx_tcp_proxy_module//ngx_tcp_upstream.c: In function ‘ngx_tcp_upstream_add’:
../nginx_tcp_proxy_module//ngx_tcp_upstream.c:656: error: ‘ngx_tcp_upstream_srv_conf_t’ has no member named ‘status_alive’
../nginx_tcp_proxy_module//ngx_tcp_upstream.c:656: warning: statement with no effect

Iam sure that this build failure only shows up when i add the gridfs module to the build.