Bug 291323 - www/node24: fails to build when sqlite3 dependency option SESSION=off
Summary: www/node24: fails to build when sqlite3 dependency option SESSION=off
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-01 08:46 UTC by Tassilo Philipp
Modified: 2025-12-01 15:01 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tassilo Philipp 2025-12-01 08:46:44 UTC
fails on link:

ld: error: undefined symbol: sqlite3session_delete
>>> referenced by node_sqlite.cc
>>>               node_sqlite.o:(node::sqlite::DatabaseSync::DeleteSessions()) in archive /wrkdirs/usr/ports/www/node24/work/node-v24.11.0/out/Release/obj.target/libnode.a
>>> referenced by node_sqlite.cc
>>>               node_sqlite.o:(node::sqlite::DatabaseSync::~DatabaseSync()) in archive /wrkdirs/usr/ports/www/node24/work/node-v24.11.0/out/Release/obj.target/libnode.a
>>> referenced by node_sqlite.cc
>>>               node_sqlite.o:(node::sqlite::DatabaseSync::Close(v8::FunctionCallbackInfo<v8::Value> const&)) in archive /wrkdirs/usr/ports/www/node24/work/node-v24.11.0/out/Release/obj.target/libnode.a
>>> referenced 1 more times

ld: error: undefined symbol: sqlite3session_create
>>> referenced by node_sqlite.cc
>>>               node_sqlite.o:(node::sqlite::DatabaseSync::CreateSession(v8::FunctionCallbackInfo<v8::Value> const&)) in archive /wrkdirs/usr/ports/www/node24/work/node-v24.11.0/out/Release/obj.target/libnode.a

ld: error: undefined symbol: sqlite3session_attach
>>> referenced by node_sqlite.cc
>>>               node_sqlite.o:(node::sqlite::DatabaseSync::CreateSession(v8::FunctionCallbackInfo<v8::Value> const&)) in archive /wrkdirs/usr/ports/www/node24/work/node-v24.11.0/out/Release/obj.target/libnode.a

ld: error: undefined symbol: sqlite3changeset_apply
>>> referenced by node_sqlite.cc
>>>               node_sqlite.o:(node::sqlite::DatabaseSync::ApplyChangeset(v8::FunctionCallbackInfo<v8::Value> const&)) in archive /wrkdirs/usr/ports/www/node24/work/node-v24.11.0/out/Release/obj.target/libnode.a

ld: error: undefined symbol: sqlite3session_changeset
>>> referenced by node_sqlite.cc
>>>               node_sqlite.o:(void node::sqlite::Session::Changeset<&sqlite3session_changeset>(v8::FunctionCallbackInfo<v8::Value> const&)) in archive /wrkdirs/usr/ports/www/node24/work/node-v24.11.0/out/Release/obj.target/libnode.a

ld: error: undefined symbol: sqlite3session_patchset
>>> referenced by node_sqlite.cc
>>>               node_sqlite.o:(void node::sqlite::Session::Changeset<&sqlite3session_patchset>(v8::FunctionCallbackInfo<v8::Value> const&)) in archive /wrkdirs/usr/ports/www/node24/work/node-v24.11.0/out/Release/obj.target/libnode.a
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [cctest.target.mk:251: /wrkdirs/usr/ports/www/node24/work/node-v24.11.0/out/Release/cctest] Error 1



I am not sure if there is a way to "fix" this within node24, or if there is a way to require that dependency's option to be on.
Comment 1 bsd 2025-12-01 09:34:45 UTC
Alternatively, could a port check whether a dependency port is built with some option set ON/OFF? This way we can provide a meaningful error message to user, i.e. 'this port requires www/node24 to be built with option SESSION=ON'. This would make much better user experience than a bunch of linker errors...

In the meantime, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290974 did (partially at least) solve the issue by making default option ON. Check I wrote about above would still be usefull...
Comment 2 Nuno Teixeira freebsd_committer freebsd_triage 2025-12-01 12:09:36 UTC
(In reply to bsd from comment #1)

Also, node24 doesn't build on recent main too:

../deps/v8/src/compiler/code-assembler.h:1747:3: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
 1747 |   CodeAssemblerLabel(
      |   ^
 1748 |       CodeAssembler* assembler,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~
 1749 |       std::initializer_list<CodeAssemblerVariable*> vars,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1750 |       CodeAssemblerLabel::Type type = CodeAssemblerLabel::kNonDeferred)
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Anyone experiencing same problem?
Comment 3 Tassilo Philipp 2025-12-01 15:01:12 UTC
(In reply to bsd from comment #1)

Thanks for pointing out PR290974 - I did a cursory search but failed to find that one. I am probably one of those where the options file was already written w/ the previous default, which was "off".