[nginx] can't compile with debug and openssl

Jérôme Loyet jerome at loyet.net
Thu Mar 3 11:05:52 MSK 2011


I'm having a problem compiling nginx with debug and ssl :

make -f objs/Makefile
make[1]: Entering directory `/misc/distrib/BUILD/nginx-0.8.54'
gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g  -I
src/core -I src/event -I src/event/modules -I src/os/unix -I
/usr/include/libxml2 -I objs \
                -o objs/src/event/ngx_event_openssl.o \
cc1: warnings being treated as errors
src/event/ngx_event_openssl.c: In function ‘ngx_ssl_handshake’:
src/event/ngx_event_openssl.c:569: error: assignment discards
qualifiers from pointer target type
make[1]: *** [objs/src/event/ngx_event_openssl.o] Error 1
make[1]: Leaving directory `/misc/distrib/BUILD/nginx-0.8.54'
make: *** [build] Error 2

I'm using openssl-1.0.0 from redhat 6.

The problem comes from src/event/ngx_event_openssl.c arround line 564


In /usr/include/openssl/opensslv.h, OPENSSL_VERSION_NUMBER is defined as this:

#define OPENSSL_VERSION_NUMBER  0x10000003L

I don't know if redhat has backported some patch from newer release of
openssl or if we should just change the #if to >= 0x10000003L (at

Hope it helps

++ jerome

More information about the nginx-devel mailing list