nodejs 26.8.2 fails to build with clang/LLVM
オープン
初心者向け
まだ誰も着手していません。
build
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず deps/LIEF/third-party/frozen/include/frozen/map.h から始め、Linux 上で Clang を使って Node.js 26.8.2 のビルドを再現します。エラーに報告されている標準ライブラリの依存関係を確認し、未定義の std::less エラーなしで Clang によるビルドが正常に完了することを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp, linux, nodejs
- 領域
- build-system, operating-systems
- issue の種類
- バグ
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 活発
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 88/100