Hello all,

I’m trying to build Nginx with NJS so we can start experimenting with it.  I do 
need to build our own Nginx for a variety of reasons so I can’t opt for 
pre-compiled packages.  I’ve tested all sorts of different build options from 
our standard customized build all the way down to almost the most basic build.  
No matter what options I specify, if I provide OpenSSL 3.0.1 (haven’t tried 
plain old 3.0) at all, NJS falls to compile with Nginx ending with this generic 
error:

        build/src/njs_diyfp.o build/src/njs_dtoa.o build/src/njs_dtoa_fixed.o 
build/src/njs_str.o build/src/njs_strtod.o build/src/njs_murmur_hash.o 
build/src/njs_djb_hash.o build/src/njs_utf8.o build/src/njs_utf16.o 
build/src/njs_arr.o build/src/njs_rbtree.o build/src/njs_lvlhsh.o 
build/src/njs_trace.o build/src/njs_random.o build/src/njs_md5.o 
build/src/njs_sha1.o build/src/njs_sha2.o build/src/njs_time.o 
build/src/njs_file.o build/src/njs_malloc.o build/src/njs_mp.o 
build/src/njs_sprintf.o build/src/njs_utils.o build/src/njs_chb.o 
build/src/njs_value.o build/src/njs_vm.o build/src/njs_vmcode.o 
build/src/njs_boolean.o build/src/njs_number.o build/src/njs_symbol.o 
build/src/njs_string.o build/src/njs_object.o build/src/njs_object_prop.o 
build/src/njs_array.o build/src/njs_json.o build/src/njs_function.o 
build/src/njs_regexp.o build/src/njs_date.o build/src/njs_error.o 
build/src/njs_math.o build/src/njs_timer.o build/src/njs_module.o 
build/src/njs_event.o build/src/njs_extern.o build/src/njs_variable.o 
build/src/njs_builtin.o build/src/njs_lexer.o build/src/njs_lexer_keyword.o 
build/src/njs_parser.o build/src/njs_generator.o build/src/njs_disassembler.o 
build/src/njs_array_buffer.o build/src/njs_typed_array.o 
build/src/njs_promise.o build/src/njs_encoding.o build/src/njs_iterator.o 
build/src/njs_scope.o build/src/njs_async.o build/src/njs_buffer.o 
build/external/njs_crypto_module.o build/external/njs_fs_module.o 
build/external/njs_query_string_module.o build/build/njs_modules.o
make[2]: Leaving directory `/root/njs-0.7.2'
make[1]: Leaving directory `/root/nginx-1.21.6'
make: *** [build] Error 2

As soon as I remove OpenSSL 3.0.1 from the build, it compiles - even if I 
compile in OpenSSL with a different static library than the system default.  
All variations of the regular build that I do work fine.  I can compile regular 
Nginx with all sorts of other stuff (e.g. Lua, Brotli, etc) and it all works 
just fine 100% of the time until we add in NJS (even if we remove all of the 
3rd party extensions from the build).  At the moment, I’m sort of stuck between 
either using OpenSSL 3.0.1 or using Nginx + NJS.  Is NJS 0.7.2 suffering from 
some sort of OpenSSL 3.0.1 incompatibility?  Or are there special build 
directives that we need to pass in to make it compatible?  Or does the final 
error output from above mean something else?

Just to avoid potential red herrings with this, here is one of the most basic 
configure/build commands that we’re using.  I’ve intentionally stripped most 
tweaks that we would usually use and it still fails.  If it matters, this is 
being compiled on CentOS 7 with Linux kernel 5.14 or greater (tried this on 
multiple systems).  Nginx version is 1.21.6, NJS is 0.7.2, and OpenSSL is 
3.0.1.  GCC version is 10.2.1 (but I’ve tried with other versions as well).

./configure \
--prefix=/usr/share/nginx \
--user=nobody \
--group=nobody \
--with-pcre-jit \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-openssl=$STATICLIBSSL \
--with-http_realip_module \
--with-http_auth_request_module \
--with-http_gzip_static_module \
--with-http_v2_module \
--with-http_sub_module \
--with-libatomic \
--with-file-aio \
--with-http_xslt_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-threads \
--add-dynamic-module=/root/njs-${NJS}/nginx


Any insights that you can share would help immensely.


--
Lance Dockins

_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-le...@nginx.org

Reply via email to