Bug 291245 - www/nginx: compile erros with njs and zstd options selected
Summary: www/nginx: compile erros with njs and zstd options selected
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jochen Neumeister
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-27 12:11 UTC by Krzysztof
Modified: 2026-03-09 19:49 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (joneum)


Attachments
update patch (4.09 KB, patch)
2025-11-27 12:11 UTC, Krzysztof
no flags Details | Diff
poudriere testport log (636.41 KB, text/plain)
2025-11-27 12:11 UTC, Krzysztof
no flags Details
poudrire buld log with error (522.21 KB, text/plain)
2026-02-24 09:42 UTC, Krzysztof
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof 2025-11-27 12:11:09 UTC
Created attachment 265671 [details]
update patch

* www/nginx with njs selected without zstd - no errors
* www/nginx with zstd selected without njs - no errors

when both options selected there are errors about quickjs.h missing.

After some debugging I've found, that lang/quickjs should be added as dependency. I've tried lang/quickjs-ng as dependency, but it seems that njs is using quickjs, not quickjs-ng.

So I've made a patch - when applied nginx compiled correctly with njs and zstd enabled.

It was tested with poudriere - logfile is attached also.
Comment 1 Krzysztof 2025-11-27 12:11:57 UTC
Created attachment 265672 [details]
poudriere testport log

testport or bulk logfile
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2025-11-27 15:04:09 UTC
Maybe www/angie and www/freenginx affected too.
Comment 3 Sebastian Oswald 2025-12-02 13:06:09 UTC
(In reply to Vladimir Druzenko from comment #2)

Thanks for bringing this to my attention.

I believe angie isn't affected as njs and zstd are external modules for angie. NJS is available via www/angie-module-njs and builds fine (just did a poudriere bulk on 14.3-RELEASE + latest); the zstd module is not yet in ports.
I already have the zstd module on my list and even a working Makefile (at least it built a few weeks ago...), but wanted to postprone adding a new port until I reworked/untangled the Makefiles for angie and its modules to properly reflect upstream versions (It's almost finished, but $life was rather busy the last 2 months).
Comment 4 Krzysztof 2025-12-15 09:59:10 UTC
I can see that www/angie was updated :-) And this bug? Will be reviewed? :-)

Thanks a lot for your time
Comment 5 Sebastian Oswald 2025-12-15 10:58:16 UTC
(In reply to Krzysztof from comment #4)

As said: angie handles those modules as spearate ports www/angie-module-njs and www/angie-module-zstd (added to ports on 10.12.2025). Both build fine and can be concurrently installed and loaded without errors.
This bugs seems to be specific to nginx, so the maintainer (Jochen Neumeier) needs to review your patch.
Comment 6 Jochen Neumeister freebsd_committer freebsd_triage 2025-12-19 10:06:28 UTC
This is not just a nginx problem, but also a problem with nginx-devel, freenginx, and freenginx-devel, since they all have njs as a third party. 
I will try to investigate this as soon as possible, but please excuse me if it takes a little longer due to Christmas and the holidays.
I am adding osa as the freenginx-devel maintainer to this PR.
Comment 7 Sergey A. Osokin freebsd_committer freebsd_triage 2025-12-23 13:29:45 UTC
(In reply to Jochen Neumeister from comment #6)

Hi,

I've just successfully built www/freenginx-devel with njs and zstd, all good, and here's the proof - https://people.freebsd.org/~osa/freenginx-devel-1.29.4_5.log
Comment 8 Jochen Neumeister freebsd_committer freebsd_triage 2026-02-23 18:38:04 UTC
I also couldn't find any problems.
Comment 9 Krzysztof 2026-02-24 09:42:01 UTC
Created attachment 268323 [details]
poudrire buld log with error

Unfortunatelly on my poudriere there is error about missing header - buli logfile attached
Comment 10 Krzysztof 2026-02-24 09:46:31 UTC
I've just attached poudriere logfile. Myabe it will be helpfull to find out where is a bug - maybe on my side?

I have such options set:
OPTIONS_FILE_SET+=DSO
OPTIONS_FILE_SET+=FILE_AIO
OPTIONS_FILE_SET+=IPV6
OPTIONS_FILE_SET+=NJS
OPTIONS_FILE_SET+=NJS_XML
OPTIONS_FILE_SET+=THREADS
OPTIONS_FILE_SET+=WWW
OPTIONS_FILE_SET+=HTTP
OPTIONS_FILE_SET+=HTTP_CACHE
OPTIONS_FILE_SET+=HTTP_DAV
OPTIONS_FILE_SET+=HTTP_GZIP_STATIC
OPTIONS_FILE_SET+=HTTP_MP4
OPTIONS_FILE_SET+=HTTP_SLICE
OPTIONS_FILE_SET+=HTTP_SSL
OPTIONS_FILE_SET+=HTTP_STATUS
OPTIONS_FILE_SET+=HTTP_XSLT
OPTIONS_FILE_SET+=HTTPV2
OPTIONS_FILE_SET+=HTTPV3
OPTIONS_FILE_SET+=STREAM
OPTIONS_FILE_SET+=STREAM_REALIP
OPTIONS_FILE_SET+=STREAM_SSL
OPTIONS_FILE_SET+=STREAM_SSL_PREREAD
OPTIONS_FILE_SET+=BROTLI
OPTIONS_FILE_SET+=CACHE_PURGE
OPTIONS_FILE_SET+=DEVEL_KIT
OPTIONS_FILE_SET+=FIPS_CHECK
OPTIONS_FILE_SET+=HEADERS_MORE
OPTIONS_FILE_SET+=HTTP_ACCEPT_LANGUAGE
OPTIONS_FILE_SET+=HTTP_AUTH_DIGEST
OPTIONS_FILE_SET+=HTTP_AUTH_LDAP
OPTIONS_FILE_SET+=HTTP_AUTH_PAM
OPTIONS_FILE_SET+=HTTP_DAV_EXT
OPTIONS_FILE_SET+=HTTP_FANCYINDEX
OPTIONS_FILE_SET+=HTTP_IP2LOCATION
OPTIONS_FILE_SET+=HTTP_IP2PROXY
OPTIONS_FILE_SET+=HTTP_JSON_STATUS
OPTIONS_FILE_SET+=HTTP_SLICE_AHEAD
OPTIONS_FILE_SET+=HTTP_UPLOAD
OPTIONS_FILE_SET+=HTTP_UPLOAD_PROGRESS
OPTIONS_FILE_SET+=LINK
OPTIONS_FILE_SET+=LUA
OPTIONS_FILE_SET+=MEMC
OPTIONS_FILE_SET+=ZSTD
Comment 11 Jochen Neumeister freebsd_committer freebsd_triage 2026-03-09 19:49:30 UTC
Unfortunately, I cannot reproduce the problem. The forum or the ML are better alternatives for solving your local problem.