Bug 271868 - www/node*: fails to build with OpenSSL 3 in base
Summary: www/node*: fails to build with OpenSSL 3 in base
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 271656
  Show dependency treegraph
 
Reported: 2023-06-06 13:22 UTC by Ed Maste
Modified: 2023-06-07 07:28 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2023-06-06 13:22:41 UTC
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
Comment 1 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-06-06 19:32:51 UTC
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.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-06-07 07:25:47 UTC
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(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-06-07 07:25:48 UTC
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(-)
Comment 4 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-06-07 07:28:25 UTC
node16 will not receive any upstream support for openssl 3 so ignoring that for now.