nginx-auth-ldap: ngx_http_auth_ldap_module.c:38: error: unknown option after ‘#pragma GCC diagnostic

/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

how do to it?

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@victorhahncastell,

Removed line 404 but I still get the GCC error:

make modules make -f objs/Makefile modules make[1]: Entering directory /opt/home/kenny/github/nginx' cc -c -fPIC -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 \ /home/kenny/github/ldap/nginx-auth-ldap//ngx_http_auth_ldap_module.c cc1: warnings being treated as errors /home/kenny/github/ldap/nginx-auth-ldap//ngx_http_auth_ldap_module.c:43: error: unknown option after '#pragma GCC diagnostic' kind make[1]: *** [objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o] Error 1 make[1]: Leaving directory/opt/home/kenny/github/nginx’ make: *** [modules] Error 2

Also removed line 43 and that let it complete the compile. Which confirmed in the objs directory I now have a ngx_http_auth_ldap_module.so file that I can copy to the modules directory and test dynamic loading.

No luck with copying and moving the .so file over and attempting to load it dynamically. Starting nginx: nginx: [emerg] module “/etc/nginx/modules/ngx_http_auth_ldap_module.so” is not binary compatible in /etc/nginx/nginx.conf:8

The warning option of “-Wcpp” is available for gcc-5.x or later, thus the corresponding pragma directive leads to an error if you compile the code with gcc-4.x. The remedy is, for example, that the line 42 is replaced by

#if GNUC > 4

Hello all,

Can anyone instruct me to fix this issue? I am using CentOS release 6.4 and git the latest commit

/usr/local/src/nginx-auth-ldap/ngx_http_auth_ldap_module.c:43: error: unknown option after ‘#pragma GCC diagnostic’ kind /usr/local/src/nginx-auth-ldap/ngx_http_auth_ldap_module.c:423: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