Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

26.0.0 fails to build on NetBSD: missing include

未關閉 適合新手
#63,146 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
85/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
冷清
技術堆疊
node.js

研究方向

從 deps/v8/src/base/memcopy.h 開始,NetBSD 建置在此回報 CHAR_BIT 未宣告。在 NetBSD 上重現 Node.js 26.0.0 建置,驗證該標頭宣告在那裡可用,並確認進行針對性變更後建置能夠成功繼續。

由索引模型根據 Issue 內容生成。

描述

arm build v8 engine
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>
主要語言
JavaScript
星號
122k
分支
38.4k
平均合併
3 天 23 小時
30 天內合併 PR
274

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

nodejs/node 的其他 Issue

查看 nodejs/node 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。