Using pcre_jit

Hello,

To use pcre_jit ( Core functionality ), is it mandatory to
compile
nginx with “–with-pcre-jit”?
On FreeBSD, nginx isn’t compiled with “–with-pcre-jit”, but I can still
use
“pcre_jit on;” without nginx throwing errors. So, does nginx really use
PCRE
JIT in this case?

This bug report:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200793
mention “–with-pcre-jit” isn’t needed.

Best Regards

Posted at Nginx Forum:

On Tuesday 16 February 2016 11:29:32 Alt wrote:

Hello,

To use pcre_jit ( Core functionality ), is it mandatory to compile
nginx with “–with-pcre-jit”?
On FreeBSD, nginx isn’t compiled with “–with-pcre-jit”, but I can still use
“pcre_jit on;” without nginx throwing errors. So, does nginx really use PCRE
JIT in this case?

If there’s no warning in error log about JIT, then it is used.

This bug report: 200793 – www/nginx: allow pcre_jit in options
mention “–with-pcre-jit” isn’t needed.

[…]

As it’s written in the documentation, the flag is needed only if the
PCRE
library is built with nginx (i.e. the --with-pcre=… parameter is
used).

wbr, Valentin V. Bartenev

Hello!

On Tue, Feb 16, 2016 at 11:29:32AM -0500, Alt wrote:

Hello,

To use pcre_jit ( Core functionality ), is it mandatory to compile
nginx with “–with-pcre-jit”?
On FreeBSD, nginx isn’t compiled with “–with-pcre-jit”, but I can still use
“pcre_jit on;” without nginx throwing errors. So, does nginx really use PCRE
JIT in this case?

This bug report: 200793 – www/nginx: allow pcre_jit in options
mention “–with-pcre-jit” isn’t needed.

Sergey Osokin’s response is correct.

The “–with-pcre-jit” is only needed when you compile PCRE library
using nginx configure (./configure --with-pcre= …). When
using a system PCRE library whether or not JIT is supported
depends on how the library was compiled.

On FreeBSD PCRE is compiled with JIT enabled except on few archs
where it’s not available.

If you’ll try to use “pcre_jit on” without JIT available, nginx
will warn you during configuration parsing:

nginx: [warn] nginx was built without PCRE JIT support in …

Or, if nginx was compiled with JIT available, but currently loaded
PCRE library does not support JIT:

nginx: [warn] PCRE library does not support JIT in …

If you don’t see these messages - this means that JIT is used.


Maxim D.
http://nginx.org/

Hello,

Thanks Valentin for your answer!

Best Regards

Posted at Nginx Forum:

Hello,

Thanks also Maxim for your answer!

Best Regards

Posted at Nginx Forum: