#1528 closed defect (invalid)
Cannot build OpenSSL 1.1.1pre4 on Nginx mainline 1.13.12?
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | blocker | Milestone: | nginx-1.15 |
| Component: | nginx-core | Version: | 1.13.x |
| Keywords: | openssl | Cc: | graymanflo@… |
| uname -a: | 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux | ||
| nginx -V: | 1.13.12-1~stretch | ||
Description
Good evening!
I am trying to compile OpenSSL 1.1.1pre4 with Nginx 1.13.12, for this I had to disable -Werror in auto/cc/gcc to omit a missing initializer warning which was treated as an error in OpenSSL, I believe this causes the build to fail since compiling with OpenSSL 1.0.2n works fine https://github.com/openssl/openssl/issues/5955.
Here is the Nginx build log for OpenSSL 1.1.1pre4: https://pastebin.com/ir2DkBTm. What could be wrong or is there a specific way I have to compile Nginx to use OpenSSL 1.1.1?
Change History (5)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Thanks, I tried commenting it out and even setting its value to 0 but the new rule did not do the trick here.
Could there be any other obstacle causing the error 2 as seen in the pastebin link above?
comment:3 by , 8 years ago
Quick update to this, adding --with-pcre=pcre2-10.31 is the cause of the build failing.
comment:4 by , 8 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Building with PCRE2 is not something nginx supports. You have to use PCRE, not PCRE2.

From the symptoms described, it looks like the CFLAGS value as constructed by nginx
./configureand set in nginx'sMakefileis somehow propagated to OpenSSL config and building, which shouldn't normally happen. Something like this can happen if somehowexport CFLAGSor .EXPORT_ALL_VARIABLES was added to make rules.In Debian packages, using
DPKG_EXPORT_BUILDFLAGS=1seems to have identical effect, and will be enough to screw things up if nginx is configured to build something with--with-openssl=...or similar options. If there isDPKG_EXPORT_BUILDFLAGS=1in yourdebian/rulesfile, try commenting it out.