Using pcre_jit

Hello,

To use pcre_jit ( http://nginx.org/r/pcre_jit ), 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:
https://forum.nginx.org/read.php?2,264554,264554#msg-264554

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

Hello,

To use pcre_jit ( http://nginx.org/r/pcre_jit ), 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: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200793
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 ( http://nginx.org/r/pcre_jit ), 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.

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:
https://forum.nginx.org/read.php?2,264554,264558#msg-264558

Hello,

Thanks also Maxim for your answer!

Best Regards

Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,264554,264559#msg-264559

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs