SPDY compilation fail - Warnings

Hi,

SPDY compilation fails for me, due to some warnings.

The compilation script which fails could be seen here, syntaxically
colored :

Or here, in a raw version :

Nginx SPDY Compilation Fail

-------------------------------

NGINX_VERSION=‘1.3.2’
NGINX_ECHO_MODULE_VERSION=‘0.39’
sudo mkdir -p /var/log/nginx
sudo mkdir -p /tmp/nginx/{client,proxy,fastcgi,cache}
sudo chown www-data:www-data /tmp/nginx/{client,proxy,fastcgi,cache}
sudo ps -C nginx -o pid=‘’ | xargs sudo kill -9
cd /usr/local/src
sudo wget -O nginx-$NGINX_ECHO_MODULE_VERSION.tar.gz
https://github.com/agentzh/echo-nginx-module/tarball/v$NGINX_ECHO_MODULE_VERSION
sudo tar -zxvf nginx-$NGINX_ECHO_MODULE_VERSION.tar.gz
sudo rm -fr nginx-$NGINX_ECHO_MODULE_VERSION.tar.gz
sudo mv agentzh-echo* nginx_echo_module
cd /usr/local/src
sudo wget -O nginx-$NGINX_VERSION.tar.gz
http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz
sudo tar -zxvf nginx-$NGINX_VERSION.tar.gz
sudo rm -fr nginx-$NGINX_VERSION.tar.gz
cd nginx-$NGINX_VERSION

Apply SPDY

sudo wget -O patch.spdy.txt
http://nginx.org/patches/spdy/patch.spdy.txt
sudo patch -p0 < patch.spdy.txt

Remove NginX Version in headers

grep -risl ‘Server: nginx’ * | xargs sudo sed -i -e ‘s/Server:
nginx/Server: /g’
grep -risl ‘server: %V’ * | xargs sudo sed -i -e ‘s/server: %V/server:
/g’
sudo make clean

–with-ld-opt=‘-ltcmalloc_minimal’ is optional, but recommended

sudo ./configure --with-cc-opt=‘-O3 -unroll2 -march=native’
–with-ld-opt=‘-ltcmalloc_minimal’
–error-log-path=/var/log/nginx/error.log
–add-module=/usr/local/src/nginx_echo_module
–conf-path=/usr/local/nginx/nginx.conf
–group=www-data
–http-client-body-temp-path=/tmp/nginx/client
–http-fastcgi-temp-path=/tmp/nginx/fastcgi
–http-log-path=/var/log/nginx/access.log
–http-proxy-temp-path=/tmp/nginx/proxy \

–lock-path=/var/lock/nginx.lock–prefix=/usr/local/nginx
–pid-path=/var/run/nginx.pid
–user=www-data
–with-http_geoip_module
–with-http_gzip_static_module
–with-http_realip_module
–with-http_ssl_module
–with-http_stub_status_module
–with-ipv6
–with-http_ssl_module
–without-http_autoindex_module
–without-http_auth_basic_module
–without-http_browser_module
–without-http_empty_gif_module
–without-http_scgi_module
–without-http_split_clients_module
–without-http_ssi_module
–without-http_uwsgi_module
–without-mail_imap_module
–without-mail_pop3_module
–without-mail_smtp_module
&& sudo make && sudo make install && cd /usr/local/src
sudo rm -fr nginx-$NGINX_VERSION
sudo rm -fr nginx_echo_module

-------------------------------

Compile without SPDY Patch : it works

Compile with SPDY Patch : it fails

---------------------------------

Posted at Nginx Forum:

On Thursday 26 July 2012 07:52:20 DenisTRUFFAUT wrote:

Hi,

SPDY compilation fails for me, due to some warnings.
The compilation script which fails could be seen here, syntaxically
colored :
Nginx SPDY Compilation Fail - Pastebin.com

What are the warnings you are getting?

wbr, Valentin V. Bartenev

cc1: warnings being treated as errors
src/http/ngx_http_request.c: In function
‘ngx_http_ssl_handshake_handler’:
src/http/ngx_http_request.c:635: error: implicit declaration of function
‘SSL_get0_next_proto_negotiated’
make[1]: *** [objs/src/http/ngx_http_request.o] Erreur 1
make[1]: quittant le répertoire « /usr/local/src/nginx-1.3.2 »
make: *** [build] Erreur 2

Posted at Nginx Forum:

The complete compilation log could be found here :

Posted at Nginx Forum:

On Thursday 26 July 2012 17:13:27 DenisTRUFFAUT wrote:

cc1: warnings being treated as errors
src/http/ngx_http_request.c: In function
‘ngx_http_ssl_handshake_handler’:
src/http/ngx_http_request.c:635: error: implicit declaration of function
‘SSL_get0_next_proto_negotiated’
make[1]: *** [objs/src/http/ngx_http_request.o] Erreur 1
make[1]: quittant le répertoire « /usr/local/src/nginx-1.3.2 »
make: *** [build] Erreur 2

http://nginx.org/patches/spdy/README.txt

The version of the OpenSSL library must be 1.0.1 or above. Older
versions do
not support the Next Protocol Negations extension which is required for
SPDY.

wbr, Valentin V. Bartenev

Compilation is a success. \o/

Posted at Nginx Forum:

Oh-oh… :open_mouth:

Another error with NginX 1.3.4 and patch 52 :

objs/src/http/ngx_http_request.o: In function
ngx_http_ssl_handshake_handler': /usr/local/src/nginx-1.3.4/src/http/ngx_http_request.c:643: undefined reference to SSL_get0_next_proto_negotiated’
objs/src/http/modules/ngx_http_ssl_module.o: In function
ngx_http_ssl_merge_srv_conf': /usr/local/src/nginx-1.3.4/src/http/modules/ngx_http_ssl_module.c:469: undefined reference to SSL_CTX_set_next_protos_advertised_cb’
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/usr/local/src/nginx-1.3.4’
make: *** [build] Error 2

This time, I have installed open ssl 1.0.1.
Is there something else required to compile ?
(It is another machine)

11:41:41|root@SkeetMeet-1> openssl version
OpenSSL 1.0.1c 10 May 2012

Posted at Nginx Forum:

On Wednesday 15 August 2012 01:10:58 DenisTRUFFAUT wrote:

/usr/local/src/nginx-1.3.4/src/http/modules/ngx_http_ssl_module.c:469:
11:41:41|root@SkeetMeet-1> openssl version
OpenSSL 1.0.1c 10 May 2012

It looks like that you have two different versions of OpenSSL installed,
or at
least the headers from the old one.

wbr, Valentin V. Bartenev

On Wednesday 15 August 2012 01:21:37 Valentin V. Bartenev wrote:

`ngx_http_ssl_merge_srv_conf’:

11:41:41|root@SkeetMeet-1> openssl version
OpenSSL 1.0.1c 10 May 2012

It looks like that you have two different versions of OpenSSL installed, or
at least the headers from the old one.

Oh, it’s a linker error. That means libs.

wbr, Valentin V. Bartenev

Hi,

do you have installed the libraries too? On ubuntu (for example) you
need to install the package libssl-dev too. The binaries are not enough
in this case.

Regards,
Chris

Am 14.08.2012 um 23:10 schrieb “DenisTRUFFAUT” [email protected]:

Hexa → yep, libssl-dev was installed before the compilation

Posted at Nginx Forum:

Thanks for your reply,

So, what to do ?

1] apt-get remove open-ssl, then compile the 1.0.1c ?

2] specify the the lib path in the configure ?

3] ?

I succeed to compile it, but it was another machine, another NginX
version
and another SPDY patch, and I don’t really know what are the differences
that could produce these errors. I just know OpenSSL version was the
same :
1.0.1c. And it was installed in the same way, on a 0.9xx-something :

OPENSSL_VERSION=‘1.0.1c’
cd /usr/local/src
sudo rm -fr openssl-$OPENSSL_VERSION
sudo wget -O openssl-$OPENSSL_VERSION.tar.gz
http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
sudo tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
sudo rm -fr openssl-$OPENSSL_VERSION.tar.gz
cd openssl-$OPENSSL_VERSION
sudo ./config threads
zlib
–prefix=/usr
&& sudo make && sudo make install && cd
/usr/local/src
sudo rm -fr openssl-$OPENSSL_VERSION

Posted at Nginx Forum: