Repository navigation
Problems building with --without-ssl and openssl-related options in NODE_OPTIONS #59435
Description
Activity
- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.configIssues and PRs related to Node.js configuration and feature settings.Issues and PRs related to Node.js configuration and feature settings.
on Aug 10, 2025 I think it makes sense to just copy the handling from
Lines 1494 to 1499 in 0bbe7c3
for (const std::string& error : result->errors()) { FPrintF(stderr, "%s: %s\n", result->args().at(0), error); } if (result->early_return()) { return result->exit_code_enum(); } over to
node/tools/snapshot/node_mksnapshot.cc
Lines 69 to 70 in c5cfdd4
CHECK(!result->early_return()); CHECK_EQ(result->exit_code(), 0); Well, that would certainly help but that output still is rather obscure. I think there are several things that would be significant improvements. For one, much of the code around this area is almost entirely undocumented. It's extremely difficult to know what it happening in here and what failure conditions may apply. Failures in the node_mksnapshot process are extremely difficult to debug. Even some basic explanations in the code about what the possible failure conditions are would be helpful, so I think when I'm able to I'll come back and try to add some documentation.
But just in general it is counter-intuitive that the NODE_OPTIONS env var would impact the build of node itself. Would there be any issues with enabling the
kDisableNodeOptionsEnvflag when initializing the platform innode_mksnapshot?PR: #59437
For one, much of the code around this area is almost entirely undocumented.
Are you looking for https://github.com/nodejs/node/blob/main/tools/snapshot/README.md?
Would there be any issues with enabling the kDisableNodeOptionsEnv flag when initializing the platform in node_mksnapshot?
If this gets serializad into/accessed JS land in anyway, it will be. For example, if the custom snapshot is used and the snapshot script uses the runtime options, or checks https://nodejs.org/api/process.html#processallowednodeenvironmentflags
- removedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
on Aug 18, 2025 From #59437, it doesn't look like a bug, more like a DX issue - node_mksnapshot could've printed the errors then exiting more gracefully instead of just asserting and crashing, but since it's a build tool, asserting is also correct, just that the DX is less nice.
As for the documentation, there's already one in https://github.com/nodejs/node/blob/main/tools/snapshot/README.md - not sure how to make that more visible to people looking for documentation, over the last collaboration summit some people suggested to use LLM tools to deal with the "there might have been a documentation, but I don't know how to find it" problem. If you are looking for specific debugging commands, this was documented in
src/README.md.Line 531 in 4eeb78b
$ lldb -- out/Release/node_mksnapshot out/Release/gen/node_snapshot.cc I suggest using this command to look for the documentation, not just for snapshot but it also works for any keyword (personally I use a similar search setting in vscode whenever I try to find docs as well).
grep -rni "snapshot" . --include="*.md" --exclude-dir=deps --exclude-dir=./doc/api --exclude-dir=./doc/changelogs --exclude-dir=outgithub-actions commented
on Apr 19, 2026 on Apr 19, 2026 – with GitHub ActionsContributorMore actionsThis issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Apr 19, 2026 github-actions commented
on May 19, 2026 on May 19, 2026 – with GitHub ActionsContributorMore actionsThis issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Just opening this to not forget.
There are a handful of command line arguments (like
--use-openssl-ca) that are only defined when Node.js is being built with openssl enabled. These CLI flags, however, are allowed inNODE_OPTIONSwhich may be set generally for a user. WhenNODE_OPTIONS=--use-openssl-caand we./configure --without-ssl, the build will fail with an obscure and unhelpful error in thenode_mksnapshotstep:It's probably a good idea to have
node_mksnapshoteither ignoreNODE_OPTIONSor print more helpful error messages; or, alternatively, allow openssl-related options like--use-openssl-cato be a defined non-op when building with--without-ssl/cc @joyeecheung