nginx-auth-ldap
nginx-auth-ldap copied to clipboard
Nginx won't compile with newest commit
I know you sort of wrote this, but after the newest commit nginx wouldn't compile for me, because i lacked the specified openssl version. So it should probably be listed as a requirement at this point, unless there is some way to fix it or skip the check for the new features.
I'm getting this as well.
OSX 10.11:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f objs/Makefile
cc -c -pipe -O -Wall -Wextra -Wpointer-arith -Wconditional-uninitialized -Wno-unused-parameter -Wno-deprecated-declarations -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/include -I objs -I src/http -I src/http/modules \
-o objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o \
nginx-auth-ldap/ngx_http_auth_ldap_module.c
nginx-auth-ldap/ngx_http_auth_ldap_module.c:38:32: error: unknown warning group '-Wcpp', ignored [-Werror,-Wunknown-pragmas]
#pragma GCC diagnostic warning "-Wcpp"
^
nginx-auth-ldap/ngx_http_auth_ldap_module.c:395:8: error: "http_auth_ldap: Compiling with OpenSSL < 1.0.2, certificate verification will be unavailable. OPENSSL_VERSION_NUMBER == " XSTR(OPENSSL_VERSION_NUMBER) [-Werror,-W#warnings]
#warning "http_auth_ldap: Compiling with OpenSSL < 1.0.2, certificate verification will be unavailable. OPENSSL_VERSION_NUMBER == " XSTR(OPENSSL_VERSION_NUMBER)
^
2 errors generated.
make[1]: *** [objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o] Error 1
make: *** [build] Error 2
Nginx was built with openssl 1.0.2f and compiles cleanly:
# ./nginx -V
nginx version: nginx/1.9.11
built by clang 7.0.2 (clang-700.1.81)
configure arguments: --with-openssl=/usr/local/Cellar/openssl/1.0.2f/
To an untrained eye, it looks like the check on line 392 (introduced in 2e3e8a9e147a0446b5097976695fa6cc5cb6f172) is using a greater than when it should be using a less than:
#if OPENSSL_VERSION_NUMBER >= 0x10002000
Im also having problems with this
make -f objs/Makefile
make[1]: Entering directory '/root/nginx'
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-auth-ldap/ngx_http_auth_ldap_module.o \
src/http/modules/nginx-auth-ldap//ngx_http_auth_ldap_module.c
cc1: warnings being treated as errors
src/http/modules/nginx-auth-ldap//ngx_http_auth_ldap_module.c:38: error: unknown option after ‘#pragma GCC diagnostic’ kind
src/http/modules/nginx-auth-ldap//ngx_http_auth_ldap_module.c:395:8: error: #warning "http_auth_ldap: Compiling with OpenSSL < 1.0.2, certificate verification will be unavailable. OPENSSL_VERSION_NUMBER == " XSTR(OPENSSL_VERSION_NUMBER)
make[1]: *** [objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o] Error 1
make[1]: Leaving directory '/root/nginx'
make: *** [build] Error 2
Sorry man, i never managed to fix that issue. I just rolled back to a git-version that worked for me (the one before the ssl update).
2016-03-02 8:26 GMT+01:00 Eric Adordionicio [email protected]:
Im also having problems with this
make -f objs/Makefile make[1]: Entering directory '/root/nginx' 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-auth-ldap/ngx_http_auth_ldap_module.o
src/http/modules/nginx-auth-ldap//ngx_http_auth_ldap_module.c cc1: warnings being treated as errors src/http/modules/nginx-auth-ldap//ngx_http_auth_ldap_module.c:38: error: unknown option after ‘#pragma GCC diagnostic’ kind src/http/modules/nginx-auth-ldap//ngx_http_auth_ldap_module.c:395:8: error: #warning "http_auth_ldap: Compiling with OpenSSL < 1.0.2, certificate verification will be unavailable. OPENSSL_VERSION_NUMBER == " XSTR(OPENSSL_VERSION_NUMBER) make[1]: *** [objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o] Error 1 make[1]: Leaving directory '/root/nginx' make: *** [build] Error 2— Reply to this email directly or view it on GitHub https://github.com/kvspb/nginx-auth-ldap/issues/123#issuecomment-191108845 .
Alright thanks @JannickH91 , just so everyone knows I'm gonna put that commit here. [256cafe]
/usr/local/src/nginx-auth-ldap/ngx_http_auth_ldap_module.c:38: error: unknown option after ‘#pragma GCC diagnostic’ kind /usr/local/src/nginx-auth-ldap/ngx_http_auth_ldap_module.c:395:8: error: #warning "http_auth_ldap: Compiling with OpenSSL < 1.0.2, certificate verification will be unavailable. OPENSSL_VERSION_NUMBER == " XSTR(OPENSSL_VERSION_NUMBER) make[1]: *** [objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o] Error 1 make[1]: Leaving directory `/usr/local/src/nginx-1.6.2' make: *** [build] Error 2
I also have the same problem, how to do?
Hi guys,
PR #139 should fix this problem.
You can actually compile with an older SSL version -- it just won't be secure and throws a warning to tell you that.
The basic problem here is that nginx forces compilation with -Werror, which is a bad idea to begin with. I tried to fix this by including a GCC pragma telling the compiler not to escalate this warning which, alas, gets ignored by clang -- which is the default compiler on OS X.
thanks , Looks like I have to upgrade OpenSSL!
I use nginx1.8 based on CentOS6.5,Also appear this mistake.Unable to resolve!
@billy98, have you tried pulling PR #139? This should fix it. However, if you need secure communication with the LDAP server you need to upgrade your OpenSSL version.