Nginx + NJS 0.7.2 Refusing to Compile

Lance Dockins lance at wordkeeper.com
Fri Feb 11 14:02:05 UTC 2022


Oh.  I should also mention that I have been able to get this to compile on CentOS 8.  But it has failed on multiple different CentOS 7 machines.


--
Lance Dockins
Minister of Magic
WordKeeper
Office: 405.585.2500
Cell: 405.306.7401
https://wordkeeper.com
On Feb 11, 2022, 7:49 AM -0600, Sergey Kandaurov <pluknet at nginx.com>, wrote:
>
> > On 11 Feb 2022, at 04:35, Lance Dockins <lance at wordkeeper.com> wrote:
> >
> > 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
> >
>
> What is the exact build error?
> Builds fine here with the reported nginx/njs/OpenSSL versions.
>
> --
> Sergey Kandaurov
>
> _______________________________________________
> nginx mailing list -- nginx at nginx.org
> To unsubscribe send an email to nginx-leave at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20220211/6f055c04/attachment.htm>


More information about the nginx mailing list