[Windows] Linker error "undefined symbol: quantize_i2_s" when building with -q i2_s or -q tl2 on Windows 11
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 62/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- cmake, cpp
- Domaine
- build-system
Piste de recherche
Commencez par 3rdparty/llama.cpp/ggml.c et les cibles CMake qui produisent ggml-base.vcxproj, puis reproduisez l’échec avec setup_env.py en utilisant -q tl2 ou -q i2_s. Suivez l’endroit où quantize_i2_s et dequantize_row_i2_s sont définies et vérifiez si leurs fichiers source sont inclus dans la cible Windows. C’est terminé lorsque les deux commandes terminent la compilation CMake sans erreurs de l’éditeur de liens dues à des symboles non définis.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- C++
- Étoiles
- 40.3k
- Forks
- 3.7k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/BitNet
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
-
i2_s SIGSEGVs at n_ubatch >= 32: BLAS backend dequantises by a row stride 4x the real packed rowOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Toutes les issues de microsoft/BitNet
Issues similaires
-
WaterHeaterManagement: tank_percent feature reports wrong feature id (FeatureMap corruption)Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
espressif/esp-matter#1867 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
cuAmpcorParameter.cpp (CPU pycuampcor) does not compile with libc++: EXIT_FAILURE is undeclaredOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
isce-framework/isce3#387 ·
-
[request] opencv/5.0.0Ouverteupstream update
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
conan-io/conan-center-index#31055 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour