kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
732 stars 253 forks source link

Compile fails on Ubuntu 12.04 after latest merge of PR #45 and #54 #57

Open rhass-r7 opened 9 years ago

rhass-r7 commented 9 years ago

I just encountered a build failure on Ubuntu 12.04 against nginx 1.6.1 with the following error:

       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 -I src/mail \
            -o objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o \
            /tmp/kitchen/cache/nginx-auth-ldap/ngx_http_auth_ldap_module.c
       make[1]: Leaving directory `/tmp/kitchen/cache/nginx-1.6.1'
       STDERR: /tmp/kitchen/cache/nginx-auth-ldap/ngx_http_auth_ldap_module.c: In function 'ngx_http_auth_ldap_ssl_handshake':
       /tmp/kitchen/cache/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1216:5: error: passing argument 1 of 'ngx_http_auth_ldap_ssl_handshake_handler' from incompatible pointer type [-Werror]
       /tmp/kitchen/cache/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1178:1: note: expected 'struct ngx_connection_t *' but argument is of type 'struct ngx_http_auth_ldap_connection_t *'
       cc1: all warnings being treated as errors
       make[1]: *** [objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o] Error 1
       make: *** [build] Error 2
       ---- End output of "bash"  "/tmp/chef-script20140917-1228-5bmq48" ----
       Ran "bash"  "/tmp/chef-script20140917-1228-5bmq48" returned 2

I am currently attempting to reproduce the issue against Nginx 1.6.2.

rhass-r7 commented 9 years ago

Just realized this is a data type issue in the latest version. (It still is broken in 1.6.2, but that should be expected.)

"expected 'struct ngx_connection_t ' but argument is of type 'struct ngx_http_auth_ldap_connection_t '"

landryb commented 9 years ago

I can confirm this, build also fails on debian wheezy, against nginx 1.7.5 debian source from http://nginx.org/en/linux_packages.html

Reverting 5d82c4a6e5a9174469a8ccb61b2d61c188f6400f fixes the issue

nyoxi commented 9 years ago

Addressed in pull-request #58