Created attachment 271498 [details] poudriere build log with failure for vscode-1.119.0
Created attachment 271499 [details] poudriere build log with failure for vscode-1.121.0
Build failures are not for the latest version in ports, my build machine is not catching up with the rate of updates! But, I have got 2 failures in a row in the same module, so the chances are high that the incompatibility is still there for the latest version as well! The error message is in node_modules/keytar: gmake[1]: Entering directory '/wrkdirs/usr/ports/editors/vscode/work/vscode-1.121.0/node_modules/keytar/build' CXX(target) Release/obj.target/keytar/src/async.o In file included from ../src/async.cc:4: ../node_modules/node-addon-api/napi.h:1147:39: error: in-class initializer for static data member is not a constant expression 1147 | static const napi_typedarray_type unknown_array_type = static_cast<napi_typedarray_type>(-1); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../node_modules/node-addon-api/napi.h:1147:60: note: integer value -1 is outside the valid range of values [0, 15] for the enumeration type 'napi_typedarray_type' 1147 | static const napi_typedarray_type unknown_array_type = static_cast<napi_typedarray_type>(-1); | ^ 1 error generated. gmake[1]: *** [keytar.target.mk:134: Release/obj.target/keytar/src/async.o] Error 1 gmake[1]: Leaving directory '/wrkdirs/usr/ports/editors/vscode/work/vscode-1.121.0/node_modules/keytar/build' gyp ERR! build error Probably the fallout from the import of llvm21 into main...
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3666da5f42ad79ebe317043e445502ac820e751d commit 3666da5f42ad79ebe317043e445502ac820e751d Author: Hiroki Tagato <tagattie@FreeBSD.org> AuthorDate: 2026-06-07 10:36:25 +0000 Commit: Hiroki Tagato <tagattie@FreeBSD.org> CommitDate: 2026-06-07 10:37:51 +0000 editors/vscode: Add patches to fix build error of keytar node module with clang 21 The error in question was: CXX(target) Release/obj.target/keytar/src/async.o In file included from ../src/async.cc:4: ../node_modules/node-addon-api/napi.h:1147:39: error: in-class initializer for static data member is not a constant expression 1147 | static const napi_typedarray_type unknown_array_type = static_cast<napi_typedarray_type>(-1); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../node_modules/node-addon-api/napi.h:1147:60: note: integer value -1 is outside the valid range of values [0, 15] for the enumeration type 'napi_typedarray_type' 1147 | static const napi_typedarray_type unknown_array_type = static_cast<napi_typedarray_type>(-1); | ^ 1 error generated. PR: 295862 Reported by: Alexey Shuvaev <bugsbeastie@gmail.com> .../patch-build_node__modules_node-addon-api_napi.h (new) | 11 +++++++++++ ...tensions_copilot_node__modules_node-addon-api_napi.h (new) | 11 +++++++++++ ...__modules_keytar_node__modules_node-addon-api_napi.h (new) | 11 +++++++++++ 3 files changed, 33 insertions(+)
I pushed a commit to fix the build issue with clang 21. Can you update the ports tree and try again to see if the issue is resolved?
(In reply to Hiroki Tagato from comment #4) Hi! Thank you for the quick fix! I will update the ports tree and give it a try! Unfortunately I can report back only in a few days, my build machine has only 4 cores and I am afraid that a recompilation of something as heavy as electron would be needed :/
(In reply to Hiroki Tagato from comment #4) I can confirm that vscode with this patch builds again on 16.0-CURRENT amd64. Many thanks for the fix!
(In reply to Rainer Hurling from comment #6) Thank you for the report! And...actually you were somehow lucky! My build machine is still building llvm19/llvm22, but it also just stumbled upon bug #295929, and without node24 it will not finish neither electron42 nor vscode. I have a bad luck last days :(
(In reply to Alexey Shuvaev from comment #7) After updating the main and successfully building www/node24 I have finally got to this issue! As of FreeBSD 16-CURRENT g23c99b64918e n286572 and ports top-level git hash f4d9b517af826b97ef5b06716f48b1af71b2740f, vscode-1.123_1 was built successfully! Thanks to everyone for the patches! I am closing this PR now!