nginx / njs

A subset of JavaScript language to use in nginx
http://nginx.org/en/docs/njs/
BSD 2-Clause "Simplified" License
1.14k stars 148 forks source link

Configuration of unit is incomplete (due to unable to find njs library) #733

Closed kvelaro closed 3 months ago

kvelaro commented 3 months ago

Describe the bug

Trying to link unit with njs, but its not configuring.

./configure: error: no NJS library >= 0.8.0 found.

To reproduce

Cloning njs (git clone https://github.com/nginx/njs.git), cloning unit repo (git clone https://github.com/nginx/unit.git unit-src)

Entering njs (/opt/njs) and making ./configure && make - everything is good Entering unit (/opt/unit-src) and issuing ./configure --njs --openssl --cc-opt="-I../njs/src/ -I../njs/build/" --ld-opt="-L../njs/build/" (https://unit.nginx.org/howto/source/#source-config-src-njs)

checking for NJS ... not found
./configure: error: no NJS library >= 0.8.0 found.
root@5fba902bf42c:/opt/unit-src# 

Expected behavior

Configuration with success message

Your environment

Additional context

Docker

lcrilly commented 3 months ago

Please note that njs must be configured as

./configure --no-libxml2 --no-zlib

(this is in the docs)

Also note that the latest version of njs that Unit supports is 0.8.2, so be sure to checkout that version (not the master branch).

kvelaro commented 3 months ago

Works like a charm, thank you so much. Didn't even think that optional parameters should be present to compile with njs