Skip to content

26.0.0 fails to build on NetBSD: missing include #63146

Description

@moubctez

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>

Activity

  1. changed the title [-]26.0.0 fails to build: missing include[/-] [+]26.0.0 fails to build on NetBSD: missing include[/+] on May 7, 2026
  2. bschnei commented on May 11, 2026

    @bschnei

    If helpful, I believe this is related to building with GCC 16. I believe in earlier GCC versions, including <vector> or <algorithm> would transitively include <climits>. With 16, if a file uses CHAR_BIT, it must now explicitly #include <climits>.

  3. tjuhaszrh commented on May 13, 2026

    @tjuhaszrh
    Contributor

    The same failure is also present when building with clang on aarch64 architecture.

  4. Renegade334 commented on May 13, 2026

    @Renegade334
    Member

    Didn't look like anyone had opened an upstream issue yet.

    https://issues.chromium.org/issues/512749476

  5. added
    buildIssues and PRs related to Node.js builds or CI infrastructure.
    v8 engineIssues and PRs related to the V8 dependency.
    armIssues and PRs related to the ARM architecture.
    on May 13, 2026
  6. github-actions commented on Aug 12, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 90 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.

  7. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Aug 12, 2026
  8. A6GibKm commented on Aug 15, 2026

    @A6GibKm

    Just to keep this from autoclosing: This is still an issue when building 26.7.0 on aarch64 with gcc 16.

  9. removed
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Aug 16, 2026
  10. linked a pull request that will close this issuedeps: V8: cherry-pick 8d14d49c4040 #66627on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    armIssues and PRs related to the ARM architecture.buildIssues and PRs related to Node.js builds or CI infrastructure.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions