nodejs 26.8.2 fails to build with clang/LLVM
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 88/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
研究方向
從 deps/LIEF/third-party/frozen/include/frozen/map.h 開始,然後使用 Clang 在 Linux 上重現 Node.js 26.8.2 的建置。檢查錯誤中回報的標準函式庫相依性,並驗證使用 Clang 的建置能夠成功完成,且不會出現 std::less 未定義錯誤。
由索引模型根據 Issue 內容生成。
描述
Version
26.8.2
Platform
Linux (Gentoo with LLVM profile)
Subsystem
LIEF (or forzen)
What steps will reproduce the bug?
- Build nodejs version 26.8.2 with clang
- Observe failure
How often does it reproduce? Is there a required condition?
Always while building with clang
What is the expected behavior? Why is that the expected behavior?
Successful build with clang
What do you see instead?
Build failure while building with Clang
A snippet from the build log:
...
In file included from ../../deps/LIEF/src/platforms/android/version.cpp:17:
In file included from ../../deps/LIEF/src/frozen.hpp:22:
../../deps/LIEF/third-party/frozen/include/frozen/map.h:40:20: error: implicit instantiation of undefined template 'std::less<LIEF::Android::ANDROID_VERSIONS>'
40 | Comparator const comparator_;
| ^
../../deps/LIEF/third-party/frozen/include/frozen/map.h:75:29: note: in instantiation of template class 'frozen::impl::CompareKey<std::less<LIEF::Android::ANDROID_VERSIONS>>' requested here
75 | impl::CompareKey<Compare> less_than_;
| ^
../../deps/LIEF/src/platforms/android/version.cpp:22:47: note: in instantiation of template class 'frozen::map<LIEF::Android::ANDROID_VERSIONS, const char *, 8>' requested here
22 | CONST_MAP(ANDROID_VERSIONS, const char*, 8) version2code {
| ^
/usr/include/c++/v1/__fwd/functional.h:25:8: note: template is declared here
25 | struct less;
| ^
In file included from ../../deps/LIEF/src/platforms/android/version.cpp:17:
In file included from ../../deps/LIEF/src/frozen.hpp:22:
../../deps/LIEF/third-party/frozen/include/frozen/map.h:110:20: error: implicit instantiation of undefined template 'std::less<LIEF::Android::ANDROID_VERSIONS>'
110 | : map{items, Compare{}} {}
| ^
../../deps/LIEF/src/platforms/android/version.cpp:22:47: note: in instantiation of member function 'frozen::map<LIEF::Android::ANDROID_VERSIONS, const char *, 8>::map' requested here
22 | CONST_MAP(ANDROID_VERSIONS, const char*, 8) version2code {
| ^
/usr/include/c++/v1/__fwd/functional.h:25:8: note: template is declared here
25 | struct less;
| ^
../../deps/LIEF/src/platforms/android/version.cpp:22:47: error: constexpr variable 'version2code' must be initialized by a constant expression
22 | CONST_MAP(ANDROID_VERSIONS, const char*, 8) version2code {
...
Additional information
I think this is due to stricter include requirements on clang
I was able to build by adding #include <functional> in deps/LIEF/third-party/frozen/include/frozen/map.h
- 主要語言
- JavaScript
- 星號
- 122k
- 分支
- 37.4k
- 平均合併
- 4 天 3 小時
- 30 天內合併 PR
- 272
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
nodejs/node 的其他 Issue
-
doc
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 84/100
-
難度 1/5 1 小時以內 新手友好度 90/100
-
feature request
難度 2/5 1-3 小時 新手友好度 68/100
-
stale
難度 2/5 1-3 小時 新手友好度 68/100
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
avniproject/avni-client#2135 ·
-
enhancement
難度 2/5 1-3 小時 新手友好度 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
難度 2/5 1-3 小時 新手友好度 72/100
bevyengine/bevy-website#2595 ·
-
ecosystem wording
難度 1/5 1 小時以內 新手友好度 90/100
matrix-org/matrix.org#3649 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
vadimdemedes/ink#1029 ·