Bug 290533 - www/node22 update to LTS 22.21.0
Summary: www/node22 update to LTS 22.21.0
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: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-26 11:41 UTC by Jordan Ostreff
Modified: 2025-11-21 10:49 UTC (History)
4 users (show)

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


Attachments
Log of failing build of www/node22 (80.61 KB, application/octet-stream)
2025-11-12 19:53 UTC, George Mitchell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Ostreff 2025-10-26 11:41:55 UTC
https://github.com/nodejs/node/releases/tag/v22.21.0
Comment 1 George Mitchell 2025-11-12 19:53:33 UTC
Created attachment 265377 [details]
Log of failing build of www/node22

Compiling www/node22 as of 12 November with sqlite3-3.50.4_2,1.  Undefined symbols such as sqlite3session_delete, sqlite3session_create, sqlite3session_attach, sqlite3changeset_apply, sqlite3session_changeset, sqlite3session_patchset.  Discovered this problem while trying to update www/chromium to today's version.
Comment 2 Stephan Muhs 2025-11-13 16:23:15 UTC
Same issue here (FreeBSD 14-STABLE, amd64), attempting to update from node22.19 to 22.21 via ports:

c++ -o /usr/ports/www/node22/work/node-v22.21.0/out/Release/embedtest -pthread -rdynamic -Wl,--export-dynamic -Wl,-z,noexecstack -Wl,--whole-archive /usr/ports/www/n
ode22/work/node-v22.21.0/out/Release/obj.target/tools/v8_gypfiles/libv8_snapshot.a -Wl,--no-whole-archive -Wl,-z,relro -Wl,-z,now -m64    -Wl,--start-group /usr/ports/
www/node22/work/node-v22.21.0/out/Release/obj.target/embedtest/src/node_snapshot_stub.o /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/embedtest/test/
embedding/embedtest.o /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/libnode.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/deps/hi
stogram/libhistogram.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/deps/nbytes/libnbytes.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj
.target/tools/v8_gypfiles/libv8_snapshot.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/tools/v8_gypfiles/libv8_libplatform.a /usr/ports/www/node22/
work/node-v22.21.0/out/Release/obj.target/deps/uvwasi/libuvwasi.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/deps/ada/libada.a /usr/ports/www/node
22/work/node-v22.21.0/out/Release/obj.target/deps/simdutf/libsimdutf.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/tools/v8_gypfiles/libabseil.a /u
sr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/deps/inspector_protocol/libcrdtp.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/deps/n
crypto/libncrypto.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a /usr/ports/www/node22/work/node-v22
.21.0/out/Release/obj.target/tools/v8_gypfiles/libv8_libbase.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/tools/v8_gypfiles/libv8_zlib.a /usr/port
s/www/node22/work/node-v22.21.0/out/Release/obj.target/tools/v8_gypfiles/libv8_compiler.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/tools/v8_gypf
iles/libv8_turboshaft.a /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/tools/v8_gypfiles/libv8_initializers.a /usr/ports/www/node22/work/node-v22.21.0
/out/Release/obj.target/tools/v8_gypfiles/libv8_initializers_slow.a -L/lib -lz -lllhttp -L/usr/local/lib -luv -lsimdjson -lbrotlidec -lbrotlienc -lcares -lnghttp2 -lng
http3 -lngtcp2 -lsqlite3 -lzstd -lcrypto -lssl -licui18n -licuuc -lutil -lkvm -L/usr/local/lib -lexecinfo -Wl,--end-group
ld: error: undefined symbol: sqlite3session_delete
>>> referenced by node_sqlite.cc
>>>               node_sqlite.o:(node::sqlite::DatabaseSync::DeleteSessions()) in archive /usr/ports/www/node22/work/node-v22.21.0/out/Release/obj.target/libnode.a
>>> referenced by node_sqlite.cc
>>>               node_sqlite.o:(node::sqlite::DatabaseSync::~DatabaseSync()) in archive /usr/ports/www/node22/work/node-v22.21.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 /usr/ports/www/node22/work/node-v22.21.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 /usr/ports/www/node22/work/node-v22.
21.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 /usr/ports/www/node22/work/node-v22.
21.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 /usr/ports/www/node22/work/node-v22
.21.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 /usr/ports/ww
w/node22/work/node-v22.21.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 /usr/ports/www
/node22/work/node-v22.21.0/out/Release/obj.target/libnode.a
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [embedtest.target.mk:200: /usr/ports/www/node22/work/node-v22.21.0/out/Release/embedtest] Error 1
gmake[1]: *** Waiting for unfinished jobs....
Comment 3 Sigi 2025-11-14 12:56:59 UTC
Mi solution:
rebuild sqlite3

because:
databases/sqlite3: Enable SESSION option by default

With session enabled node22 built again ok
Comment 4 George Mitchell 2025-11-14 14:56:51 UTC
I can confirm that setting the SESSION option for sqlite3 allows the new version of node22 to compile and run.  Perhaps I should have figured that out given all the times the string "session" appeared in the list of undefined symbols, but I didn't know that sqlite3 has a SESSION option, nor what it does.  (The details are at https://www.sqlite.org/sessionintro.html)  Of course, I don't completely know what "node" does or why it's used to compile chromium.  Perhaps node should complain if the sqlite3 SESSION option is not set.
Comment 5 Stephan Muhs 2025-11-14 18:27:34 UTC
Sigi's solution worked for me as well, I rebuilt sqllite3 with the Session option enabled and was able to build node22 without errors.
Comment 6 John Hein 2025-11-18 01:54:37 UTC
This can be closed after ports 499a9a0aae26bc6e01e721c97f02296384288f03 and ports fe26dd975fd90e9851e505f0363efb826b8e6596.

Also note that the databases/sqlite3 now has the SESSION option turned on by default.  Re-config the options for sqlite3: 'sudo make -C databases/sqlite3 config' and turn the SESSION option on if you have a saved config.