26.0.0 fails to build on NetBSD: missing include
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- node.js
- Domain
- build-system, operating-systems
Research direction
Start with deps/v8/src/base/memcopy.h, where the NetBSD build reports that CHAR_BIT is undeclared. Reproduce the Node.js 26.0.0 build on NetBSD, verify the header declaration is available there, and confirm the build proceeds successfully after the focused change.
Written by the indexing model from the issue text.
Description
Version
26.0.0
Platform
NetBSD virtual 11.99.6 NetBSD 11.99.6 (GENERIC64) #0: Mon May 4 09:49:31 CEST 2026
Subsystem
No response
What steps will reproduce the bug?
Build NodeJS 26.0.0 on NetBSD
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Build proceeds
What do you see instead?
Build fails with:
../deps/v8/src/base/memcopy.h: In function 'void v8::base::SimdMemCopy(void*, const void*, size_t)':
../deps/v8/src/base/memcopy.h:57:23: error: 'CHAR_BIT' was not declared in this scope
57 | sizeof(count) * CHAR_BIT - bits::CountLeadingZeros(count - 1);
| ^~~~~~~~
../deps/v8/src/base/memcopy.h:21:1: note: 'CHAR_BIT' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Additional information
Fix:
--- deps/v8/src/base/memcopy.h.orig 2026-05-06 07:22:58.678410124 +0000
+++ deps/v8/src/base/memcopy.h
@@ -5,6 +5,7 @@
#ifndef V8_BASE_MEMCOPY_H_
#define V8_BASE_MEMCOPY_H_
+#include <climits>
#include <stdlib.h>
#include <atomic>
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.4k
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 273
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nodejs/node
-
doc
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
build
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
feature request
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·