GUI / nginx-upstream-dynamic-servers

An nginx module to resolve domain names inside upstreams and keep them up to date.
MIT License
311 stars 74 forks source link

failed compile with nginx-1.9.13 #15

Closed gfrankliu closed 8 years ago

gfrankliu commented 8 years ago

./configure --add-module=nginx-upstream-dynamic-servers make ...

cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
        -o objs/src/http/modules/ngx_http_upstream_zone_module.o \
        src/http/modules/ngx_http_upstream_zone_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
        -o objs/addon/nginx-upstream-dynamic-servers/ngx_http_upstream_dynamic_servers.o \
        nginx-upstream-dynamic-servers/ngx_http_upstream_dynamic_servers.c
cc1: warnings being treated as errors
nginx-upstream-dynamic-servers/ngx_http_upstream_dynamic_servers.c: In function ‘ngx_http_upstream_dynamic_server_resolve_handler’:
nginx-upstream-dynamic-servers/ngx_http_upstream_dynamic_servers.c:425: error: assignment from incompatible pointer type
nginx-upstream-dynamic-servers/ngx_http_upstream_dynamic_servers.c:438: error: assignment from incompatible pointer type
make[1]: *** [objs/addon/nginx-upstream-dynamic-servers/ngx_http_upstream_dynamic_servers.o] Error 1
wandenberg commented 8 years ago

I couldn't reproduce the problem. Which gcc version are you using?

gfrankliu commented 8 years ago

It's centos 6. I'm not on the computer right now to check the exact gcc version that comes with latest centos 6.

gfrankliu commented 8 years ago

gcc-4.4.7-16.el6.x86_64

wandenberg commented 8 years ago

@gfrankliu can you test this version ? it should compile and run normally

gfrankliu commented 8 years ago

same error on cents 6. tar zxf nginx-1.9.13.tar.gz cd nginx-1.9.13 git clone https://github.com/wandenberg/nginx-upstream-dynamic-servers.git ./configure --add-module=nginx-upstream-dynamic-servers make

wandenberg commented 8 years ago

You picked the wrong version. The link target to nginx_1_9_13 branch, not to master. Retry after checkout to it, please.

gfrankliu commented 8 years ago

switched to the nginx_1_9_13 and it is working. Thanks!