pkg-static: Unable to access file /tmp/ports/usr/ports/www/node/work/stage/usr/local/include/node/openssl/rand_drbg.h:No such file or directory
Looks to be a simple pkg-plist issue. The problematic file rand_drbg.h doesn't exist anywhere inside /usr/ports/www/node/work/. So it should be simply deleted. Looking into [1] listed in commit message, bundled OpenSSL is updated to 3 from 1.1.1 and maybe causing this problem. Possibly (not shure, though), some new files (mostly related to QUIC or FIPS support?) could be needed addition within %%BUNDLED_SSL%%include/node/openssl/ lines in pkg-plist. Only v8-related headers are handled with the commit git ports f7594b482c9b. [1] https://nodejs.org/en/blog/release/v17.0.0/
Setting BUNDLED_SSL=OFF allows to build/install fine. But this should be fixed unless this option is dropped (force OFF for everyone). IIRC, I've never changed this option, so the default would've been reversed at some revision. (Not enough sure as this was installed as a dependency.)
I use libressl so I have other way to build node.
(In reply to Ivan Rozhuk from comment #3) libressl is registered as BROKEN_SSL on www/node/Makefile, so Mk/Uses/ssl.mk would disallow to build www/node with it. You're forced to set option BUNDLED_SSL to OFF,right? Just a bandaid (and not tested), but would be worth trying commenting out %%BUNDLED_SSL%%include/node/openssl/rand_drbg.h line (430) on www/node/pkg-plist and see if it works fine or not.
Created attachment 229005 [details] www/node: fix pkg-plist issues with BUNDLED_SSL=on The attached patch fixes this issue.
*** Bug 259423 has been marked as a duplicate of this bug. ***
(In reply to Philipp Ost from comment #5) Watch out for the double "%%BUNDLED_SSL%%%%BUNDLED_SSL%%" :)
(In reply to Philipp Ost from comment #5) work for me, thanks!
(In reply to Tomoaki AOKI from comment #4) No, I use with BUNDLED_SSL=ON because only this work then libressl is used.
Created attachment 229022 [details] www/node: fix pkg-plist issues with BUNDLED_SSL=on (In reply to Jimmy Olgeni from comment #7) Good catch, thanks! The attached takes care of said duplicates, nothing else is changed.
Does files from %%BUNDLED_SSL%%include/node/openssl/ required to install?
These additional files are installed with BUNDLED_SSL enabled and caught in check-plist, so yes.
(In reply to Charlie Li from comment #12) "installed" is not a same as "used". I many times clean some crap from stage dir while making ports. Is these openssl files used by node after installation?
The 2021/10/25 patch worked for me. I have a DEFAULT_VERSIONS += ssl=libressl, thus a OPTIONS_FILE_SET += BUNDLED_SSL for www/node.
*** Bug 259489 has been marked as a duplicate of this bug. ***
I am incorporating this patch along with the upgrade to 17.0.1, which I hope to push shortly. Thanks for the report! :)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8de43db2771a9534f9a9d67c48c46152f2843128 commit 8de43db2771a9534f9a9d67c48c46152f2843128 Author: Bradley T. Hughes <bhughes@FreeBSD.org> AuthorDate: 2021-10-24 18:09:51 +0000 Commit: Bradley T. Hughes <bhughes@FreeBSD.org> CommitDate: 2021-10-29 13:40:45 +0000 www/node: Update 17.0.0_1 -> 17.0.1 https://nodejs.org/en/blog/release/v17.0.1/ While here, update pkg-plist to allow building with the BUNDLED_SSL option enabled, and add the patch from PR 259454 to fix the build on i386. PR: 259454, 259377 MFH: 2021Q4 Sponsored by: Miles AS www/node/Makefile | 3 +- www/node/distinfo | 6 +- ...openssl_openssl_crypto_threads__pthread.c (new) | 29 + www/node/pkg-plist | 2446 +++++++++++++++++++- 4 files changed, 2461 insertions(+), 23 deletions(-)