yaoweibin / nginx_ajp_module

support AJP protocol proxy with Nginx
http://github.com/yaoweibin/nginx_ajp_module
246 stars 60 forks source link

Built failure on nginx-1.7.10 and pcre-8.36 #35

Closed Niemi closed 9 years ago

Niemi commented 9 years ago

/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_store’: /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:467:30: error: comparison between pointer and integer [-Werror] if (alcf->upstream.cache != NGX_CONF_UNSET_PTR ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:468:33: error: comparison between pointer and integer [-Werror] && alcf->upstream.cache != NULL) ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_cache’: /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:540:30: error: comparison between pointer and integer [-Werror] if (alcf->upstream.cache != NGX_CONF_UNSET_PTR) { ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:545:30: error: assignment makes integer from pointer without a cast [-Werror] alcf->upstream.cache = NULL; ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:553:26: error: assignment makes integer from pointer without a cast [-Werror] alcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0, ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:555:30: error: comparison between pointer and integer [-Werror] if (alcf->upstream.cache == NULL) { ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_create_loc_conf’: /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:669:26: error: assignment makes integer from pointer without a cast [-Werror] conf->upstream.cache = NGX_CONF_UNSET_PTR; ^ In file included from src/core/ngx_core.h:76:0, from /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:3: /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_merge_loc_conf’: src/core/ngx_conf_file.h:252:14: error: comparison between pointer and integer [-Werror] if (conf == NGX_CONF_UNSET_PTR) { \ ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’ ngx_conf_merge_ptr_value(conf->upstream.cache, ^ src/core/ngx_conf_file.h:253:22: error: comparison between pointer and integer [-Werror] conf = (prev == NGX_CONF_UNSET_PTR) ? default : prev; \ ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’ ngx_conf_merge_ptr_value(conf->upstream.cache, ^ src/core/ngx_conf_file.h:253:55: error: pointer/integer type mismatch in conditional expression [-Werror] conf = (prev == NGX_CONF_UNSET_PTR) ? default : prev; \ ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’ ngx_conf_merge_ptr_value(conf->upstream.cache, ^ src/core/ngx_conf_file.h:253:14: error: assignment makes integer from pointer without a cast [-Werror] conf = (prev == NGX_CONF_UNSET_PTR) ? default : prev; \ ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’ ngx_conf_merge_ptr_value(conf->upstream.cache, ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:870:53: error: invalid type argument of ‘->’ (have ‘int’) if (conf->upstream.cache && conf->upstream.cache->data == NULL) { ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:873:18: error: assignment makes pointer from integer without a cast [-Werror] shm_zone = conf->upstream.cache; ^ cc1: all warnings being treated as errors make[1]: * [objs/addon/nginx_ajp_module-master/ngx_http_ajp_module.o] Error 1 objs/Makefile:1140: recipe for target 'objs/addon/nginx_ajp_module-master/ngx_http_ajp_module.o' failed make[1]: Leaving directory '/home/niemi/MLserver/nginx-1.7.10' Makefile:8: recipe for target 'build' failed make: * [build] Error 2

yaoweibin commented 9 years ago

I have fixed the compatible problem. Try the latest revision in the master branch.

Thanks.

Niemi commented 9 years ago

Thank you for great work!

yaoweibin commented 9 years ago

I have fixed the compatible problem. Try the latest revision in the master branch.

Thanks.

在 2015年2月25日,下午11:50,Aleksei <notifications@github.com mailto:notifications@github.com> 写道:

/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_store’: /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:467:30: error: comparison between pointer and integer [-Werror] if (alcf->upstream.cache != NGX_CONF_UNSET_PTR ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:468:33: error: comparison between pointer and integer [-Werror] && alcf->upstream.cache != NULL) ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_cache’: /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:540:30: error: comparison between pointer and integer [-Werror] if (alcf->upstream.cache != NGX_CONF_UNSET_PTR) { ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:545:30: error: assignment makes integer from pointer without a cast [-Werror] alcf->upstream.cache = NULL; ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:553:26: error: assignment makes integer from pointer without a cast [-Werror] alcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0, ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:555:30: error: comparison between pointer and integer [-Werror] if (alcf->upstream.cache == NULL) { ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_create_loc_conf’: /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:669:26: error: assignment makes integer from pointer without a cast [-Werror] conf->upstream.cache = NGX_CONF_UNSET_PTR; ^ In file included from src/core/ngx_core.h:76:0, from /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:3: /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_merge_loc_conf’: src/core/ngx_conf_file.h:252:14: error: comparison between pointer and integer [-Werror] if (conf == NGX_CONF_UNSET_PTR) { \ ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’ ngx_conf_merge_ptr_value(conf->upstream.cache, ^ src/core/ngx_conf_file.h:253:22: error: comparison between pointer and integer [-Werror] conf = (prev == NGX_CONF_UNSET_PTR) ? default : prev; \ ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’ ngx_conf_merge_ptr_value(conf->upstream.cache, ^ src/core/ngx_conf_file.h:253:55: error: pointer/integer type mismatch in conditional expression [-Werror] conf = (prev == NGX_CONF_UNSET_PTR) ? default : prev; \ ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’ ngx_conf_merge_ptr_value(conf->upstream.cache, ^ src/core/ngx_conf_file.h:253:14: error: assignment makes integer from pointer without a cast [-Werror] conf = (prev == NGX_CONF_UNSET_PTR) ? default : prev; \ ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’ ngx_conf_merge_ptr_value(conf->upstream.cache, ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:870:53: error: invalid type argument of ‘->’ (have ‘int’) if (conf->upstream.cache && conf->upstream.cache->data == NULL) { ^ /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:873:18: error: assignment makes pointer from integer without a cast [-Werror] shm_zone = conf->upstream.cache; ^ cc1: all warnings being treated as errors make[1]: * [objs/addon/nginx_ajp_module-master/ngx_http_ajp_module.o] Error 1 objs/Makefile:1140: recipe for target 'objs/addon/nginx_ajp_module-master/ngx_http_ajp_module.o' failed make[1]: Leaving directory '/home/niemi/MLserver/nginx-1.7.10' Makefile:8: recipe for target 'build' failed make: * [build] Error 2

— Reply to this email directly or view it on GitHub https://github.com/yaoweibin/nginx_ajp_module/issues/35.

frogstarr78 commented 9 years ago

I'm having a similar issue with different versions:

AJP: 0.3.0 (and 0.2.6 actually I tried to see if it was an issue with the latest releast) Nginx: 1.8.0 PCRE: 7.8 CentOS: 6.6

 ./configure --add-module=/root/nginx_ajp_module-0.3.0/ --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_spdy_module --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
...
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /root/nginx_ajp_module-0.2.6//modules -I /root/nginx_ajp_module-0.2.6/ -I objs -I src/http -I src/http/modules -I src/mail \
                -o objs/addon/nginx_ajp_module-0.2.6/ngx_http_ajp.o \
                                /root/nginx_ajp_module-0.2.6//ngx_http_ajp.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /root/nginx_ajp_module-0.2.6//modules -I /root/nginx_ajp_module-0.2.6/ -I objs -I src/http -I src/http/modules -I src/mail \
                -o objs/addon/nginx_ajp_module-0.2.6/ngx_http_ajp_module.o \
                /root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c
cc1: warnings being treated as errors
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c: In function ‘ngx_http_ajp_store’:
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:468: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:468: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c: In function ‘ngx_http_ajp_cache’:
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:541: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:546: error: assignment makes integer from pointer without a cast
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:555: error: assignment makes integer from pointer without a cast
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:556: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c: In function ‘ngx_http_ajp_create_loc_conf’:
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:670: error: assignment makes integer from pointer without a cast
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c: In function ‘ngx_http_ajp_merge_loc_conf’:
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:869: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:869: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:869: error: pointer/integer type mismatch in conditional expression
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:869: error: assignment makes integer from pointer without a cast
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:872: error: invalid type argument of ‘->’ (have ‘int’)
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:875: error: assignment makes pointer from integer without a cast
make[1]: *** [objs/addon/nginx_ajp_module-0.2.6/ngx_http_ajp_module.o] Error 1