[Windows] Linker error "undefined symbol: quantize_i2_s" when building with -q i2_s or -q tl2 on Windows 11
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- cmake, cpp
- 領域
- build-system
調査の方向性
3rdparty/llama.cpp/ggml.c と、ggml-base.vcxproj を生成する CMake のターゲットから始め、次に setup_env.py で -q tl2 または -q i2_s を使って失敗を再現します。quantize_i2_s と dequantize_row_i2_s がどこで定義されているか、またそれらのソースファイルが Windows ターゲットに含まれているかを追跡します。両方のコマンドが未定義シンボルのリンカーエラーなしで CMake ビルドを完了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When attempting to build the project on Windows at 16da220ae2b510caff437d403288882687f44ae5 using python setup_env.py -md models/BitNet-b1.58-2B-4T -q tl2(or -q i2_s), the build fails during the CMake linking phase.
The linker (lld-link) reports undefined symbol errors for quantize_i2_s and dequantize_row_i2_s inside ggml-base.vcxproj.
It appears that recent updates in the 3rdparty/llama.cpp submodule (specifically ggml.c) reference the i2_s quantization symbols, but the source files implementing these i2_s functions are not included in the compilation target, causing a linker failure.
Terminal Output:
(.venv) PS D:\Projects\BitNet> python setup_env.py -md models/BitNet-b1.58-2B-4T -q tl2
INFO:root:Compiling the code using CMake.
ERROR:root:Error occurred while running command: Command '['cmake', '--build', 'build', '--config', 'Release']' returned non-zero exit status 1., check details in logs\compile.log
Relevant Section from logs/compile.log:
lld-link : error : undefined symbol: quantize_i2_s [D:\Projects\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml-base.vcxproj]
>>> referenced by ggml-base.dir\Release\ggml.c.obj:(ggml_quantize_chunk)
lld-link : error : undefined symbol: dequantize_row_i2_s [D:\Projects\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml-base.vcxproj]
>>> referenced by ggml-base.dir\Release\ggml.c.obj:(type_traits)
Building Custom Rule D:/Projects/BitNet/3rdparty/llama.cpp/common/CMakeLists.txt
llama-common-base.vcxproj -> D:\Projects\BitNet\build\3rdparty\llama.cpp\common\Release\llama-common-base.lib
Building Custom Rule D:/Projects/BitNet/3rdparty/llama.cpp/tools/mtmd/CMakeLists.txt
llama-gemma3-cli.vcxproj -> D:\Projects\BitNet\build\bin\Release\llama-gemma3-cli.exe
Building Custom Rule D:/Projects/BitNet/3rdparty/llama.cpp/tools/mtmd/CMakeLists.txt
llama-llava-cli.vcxproj -> D:\Projects\BitNet\build\bin\Release\llama-llava-cli.exe
Building Custom Rule D:/Projects/BitNet/3rdparty/llama.cpp/tools/mtmd/CMakeLists.txt
llama-minicpmv-cli.vcxproj -> D:\Projects\BitNet\build\bin\Release\llama-minicpmv-cli.exe
Building Custom Rule D:/Projects/BitNet/3rdparty/llama.cpp/tools/mtmd/CMakeLists.txt
llama-qwen2vl-cli.vcxproj -> D:\Projects\BitNet\build\bin\Release\llama-qwen2vl-cli.exe
Building Custom Rule D:/Projects/BitNet/3rdparty/llama.cpp/tools/ui/CMakeLists.txt
llama-ui.vcxproj -> D:\Projects\BitNet\build\3rdparty\llama.cpp\tools\ui\Release\llama-ui.lib
Environment:
- OS: Windows 11 Home (Build 10.0.26200)
- Compiler / Toolchain: Visual Studio 2026 + Clang 22.1.3 (x86_64-pc-windows-msvc)
- CMake Version: 4.3.1-msvc1
- Python Version: 3.10.11
- 主要言語
- C++
- スター
- 40.3k
- フォーク
- 3.7k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/BitNet のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
i2_s SIGSEGVs at n_ubatch >= 32: BLAS backend dequantises by a row stride 4x the real packed rowオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/BitNet の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hyprwm/aquamarine#426 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
amnezia-vpn/amnezia-client#3222 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
valkey-io/valkey-search#1465 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
KhronosGroup/Vulkan-Tutorial#524 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/onnxruntime-genai#2633 ·
メンテナーはふだん 1 日以内に返信