<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Which NGINX are you attempting to compile? Last I checked only
the 1.21.x branch (Mainline) has support for PRCE2, unless I
missed a stable branch release note...</p>
<p><br>
</p>
<p>Thomas</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 1/11/22 15:45, Jeffrey Walton wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAH8yC8=2LOGdrKdgkGVnfTapjLM=d8-oCUoYLt4w5zmdQCKA0w@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">On Tue, Jan 11, 2022 at 8:27 AM Maxim Dounin <a class="moz-txt-link-rfc2396E" href="mailto:mdounin@mdounin.ru"><mdounin@mdounin.ru></a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
Hello!
On Mon, Jan 10, 2022 at 10:40:09PM -0500, Jeffrey Walton wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">I need to build a modern Nginx from sources on an older platform. The
need arises because the organization can't upgrade a particular set of
machines. We want to set up a Nginx proxy to handle the front-end
work.
I've got Bzip, zLib and OpenSSL built and installed in /opt, but I am
having trouble getting Nginx to compile and [presumably] link against
them. In this case we don't want Nginx building them from sources.
Rather, we want Nginx to use the includes in /opt/include, and the
libraries in /opt/lib.
Typically GNU software using Autotools use an option like
--with-openssl-prefix. Nginx does not provide the option. Nginx also
does not provide the customary --includedir and --libdir. (And I
understand Nginx is not GNU).
How do we tell Nginx the prefix path for the libraries?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
The --with-cc-opt and --with-ld-opt should work:
./configure --with-cc-opt="-I /opt/include" --with-ld-opt="-L /opt/lib" ...
See docs for details:
<a class="moz-txt-link-freetext" href="http://nginx.org/en/docs/configure.html">http://nginx.org/en/docs/configure.html</a>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Ok, I think I see what the problem is... I used --with-cc-opt and
--with-ld-opt, but configure still failed:
...
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found
I'm using PCRE2, not PCRE:
$ ls $HOME/tmp/include
autosprintf.h idn2.h pcre2.h unigbrk.h uniwbrk.h
bzlib.h libcharset.h pcre2posix.h unilbrk.h uniwidth.h
db_cxx.h libxml2 readline uniname.h zconf.h
db.h localcharset.h textstyle uninorm.h zlib.h
dbm.h ncurses textstyle.h unistdio.h
gdbm.h ncursesw unicase.h unistr.h
gettext-po.h ndbm.h uniconv.h unistring
iconv.h openssl unictype.h unitypes.h
PCRE was end-of-life last year. PCRE also has several open bugs
against it. I tried to get the maintainer to take patches for PCRE and
release one more version but he did not. There's no reason to use PCRE
nowadays since PCRE is unmaintained and PCRE2 is available.
So I guess the question now is, can I tell Nginx to use PCRE2?
Jeff
_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a>
</pre>
</blockquote>
</body>
</html>