Compile NGINX with Openssl statically

Hi members…

I need your help.

I’m trying to compile NGINX 1.4.4 with openssl 1.0.1e statically but
the make process fail.

Step 1:
./configure --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf
–sbin-path=/usr/bin/nginx --pid-path=/run/nginx.pid
–lock-path=/run/lock/nginx.lock --user=http --group=http
–http-log-path=/var/log/nginx/access.log
–error-log-path=/var/log/nginx/error.log
–http-client-body-temp-path=/var/lib/nginx/client-body
–http-proxy-temp-path=/var/lib/nginx/proxy
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi
–http-scgi-temp-path=/var/lib/nginx/scgi
–http-uwsgi-temp-path=/var/lib/nginx/uwsgi
–with-openssl=/tmp/compile/openssl-1.0.1e
–with-md5=/tmp/compile/openssl-1.0.1e --with-md5-asm
–with-sha1=/tmp/compile/openssl-1.0.1e --with-sha1-asm
–with-pcre=/tmp/compile/pcre-8.33 --with-zlib=/tmp/compile/zlib-1.2.8
–with-imap --with-imap_ssl_module --with-pcre-jit --with-file-aio
–with-http_dav_module --with-http_gunzip_module
–with-http_gzip_static_module --with-http_realip_module
–with-http_spdy_module --with-http_ssl_module
–with-http_stub_status_module --with-http_addition_module
–with-http_degradation_module --with-http_flv_module
–with-http_mp4_module --with-http_secure_link_module
–with-http_sub_module

Step2:
make

… and I get the GCC error message:


making all in tools…
make[3]: Entering directory ‘/tmp/compile/openssl-1.0.1e/tools’
make[3]: Nothing to be done for ‘all’.
make[3]: Leaving directory ‘/tmp/compile/openssl-1.0.1e/tools’
installing man1/asn1parse.1
installing man1/CA.pl.1
installing man1/ca.1
installing man1/ciphers.1
installing man1/cms.1
cms.pod around line 457: Expected text after =item, not a number
cms.pod around line 461: Expected text after =item, not a number
cms.pod around line 465: Expected text after =item, not a number
cms.pod around line 470: Expected text after =item, not a number
cms.pod around line 474: Expected text after =item, not a number
POD document had syntax errors at /usr/bin/core_perl/pod2man line 71.
Makefile:639: recipe for target ‘install_docs’ failed
make[2]: *** [install_docs] Error 1
make[2]: Leaving directory ‘/tmp/compile/openssl-1.0.1e’
objs/Makefile:1395: recipe for target
‘/tmp/compile/openssl-1.0.1e/.openssl/include/openssl/ssl.h’ failed
make[1]: ***
[/tmp/compile/openssl-1.0.1e/.openssl/include/openssl/ssl.h]
Error 2
make[1]: Leaving directory ‘/tmp/compile/nginx-1.4.4’
Makefile:8: recipe for target ‘build’ failed
make: *** [build] Error 2

What I am doing wrong?

Thanks in advance and sorry about my poor english.

Fabiano

Hello!

On Fri, Nov 22, 2013 at 12:24:44PM -0200, Fabiano Furtado Pessoa Coelho
wrote:

[…]

cms.pod around line 457: Expected text after =item, not a number
make[1]: *** [/tmp/compile/openssl-1.0.1e/.openssl/include/openssl/ssl.h]
Error 2
make[1]: Leaving directory ‘/tmp/compile/nginx-1.4.4’
Makefile:8: recipe for target ‘build’ failed
make: *** [build] Error 2

What I am doing wrong?

Errors suggest compilation of the OpenSSL library fails as pod2man
on your system (perl 5.18?) doesn’t like one of OpenSSL’s pod
files. Try looking, e.g., here:

There seems to be a patch for OpenSSL there. Alternatively,
do something like

cd /tmp/compile/openssl-1.0.1e && make install_sw

and then continue building nginx. It should bypass OpenSSL’s
documentation processing this way, and nginx should be built
without problems (not tested though).


Maxim D.
http://nginx.org/en/donation.html

Hi Maxim!

It worked! I applyed de openssl-1.0.1e-fix_pod_syntax-1.patch and the
openssl compiled!

Now, I will try this procedure on my RHEL6.

Thanks.