From exp-run with OpenSSL 3 in the base system (PR271656), www/node16, www/node18, www/node19 fail node18 log: https://pkg-status.freebsd.org/gohan05/data/mainamd64openssl3-default/2023-06-05_08h50m07s/logs/errors/node18-18.16.0.log Thousands of deprecation warnings like In file included from ../src/crypto/crypto_keys.h:6: ../src/crypto/crypto_util.h:66:37: warning: 'RSA_free' is deprecated [-Wdeprecated-declarations] using RSAPointer = DeleteFnPtr<RSA, RSA_free>; ^ /usr/include/openssl/rsa.h:293:1: note: 'RSA_free' has been explicitly marked deprecated here OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r); ^ /usr/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0' # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0) ^ /usr/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED' # define OSSL_DEPRECATED(since) __attribute__((deprecated)) ^ And later linking fails with: ld: error: undefined symbol: ERR_load_ENGINE_strings >>> referenced by crypto_util.cc >>> crypto_util.o:(node::crypto::InitCryptoOnce()) in archive /wrkdirs/usr/ports/www/node18/work/node-v18.16.0/out/Release/obj.target/libnode.a c++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: *** [cctest.target.mk:222: /wrkdirs/usr/ports/www/node18/work/node-v18.16.0/out/Release/cctest] Error 1 rm 63902a0a73e4cd25d7b288ca7cc2e339f1989c42.intermediate ac92fe3c0491fac2032ef0a23325a804b073a653.intermediate 584f7070114ac3f87e6ddd27ba408d8aa8e5883c.intermediate 7b4664fcbb8ea14f25490b16ba2a7472c215e7cb.intermediate
Just to add my note I have tried to build these ports with: CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L but that did not yield any optimistic results.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=6370a26a67152c1fe012832f86a59dae39150f24 commit 6370a26a67152c1fe012832f86a59dae39150f24 Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2023-06-07 05:48:13 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2023-06-07 07:25:09 +0000 www/node20: Fix build with OpenSSL 3 - This was tested only with OpenSSL 3 from base but not with openssl30 or openssl31 ports - Refresh patches PR: 271868 Reported by: emaste Approved by: portmgr (blanket) ...eps_openssl_config_archs_linux-elf_no-asm_openssl.gypi | 4 ++-- www/node20/files/patch-deps_openssl_openssl__no__asm.gypi | 6 +++--- www/node20/files/patch-deps_v8_src_libsampler_sampler.cc | 4 ++-- www/node20/files/patch-node.gypi | 4 ++-- www/node20/files/patch-src_cares__wrap.h | 4 ++-- www/node20/files/patch-src_crypto_crypto__util.cc (new) | 15 +++++++++++++++ www/node20/files/patch-tools_v8__gypfiles_v8.gyp | 4 ++-- 7 files changed, 28 insertions(+), 13 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b29e56a84d27ac914faa3cab5343e492018e842f commit b29e56a84d27ac914faa3cab5343e492018e842f Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2023-06-07 05:45:00 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2023-06-07 07:25:08 +0000 www/node18: Fix build with OpenSSL 3 - This was tested only with OpenSSL 3 from base but not with openssl30 or openssl31 ports - Refresh patches PR: 271868 Reported by: emaste Approved by: portmgr (blanket) ...eps_openssl_config_archs_linux-elf_no-asm_openssl.gypi | 4 ++-- www/node18/files/patch-deps_openssl_openssl__no__asm.gypi | 6 +++--- www/node18/files/patch-node.gypi | 4 ++-- www/node18/files/patch-src_cares__wrap.h | 4 ++-- www/node18/files/patch-src_crypto_crypto__util.cc (new) | 15 +++++++++++++++ 5 files changed, 24 insertions(+), 9 deletions(-)
node16 will not receive any upstream support for openssl 3 so ignoring that for now.