BitNet
BitNet copied to clipboard
error while executing python setup_env.py -md models/BitNet-b1.58-2B-4T -q i2_s
system: windows11pro shell: developer powershell for vs 18 generate_build_files.log:
-- OpenMP found
-- Using llamafile
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- CMAKE_GENERATOR_PLATFORM:
-- x86 detected
-- Configuring done (0.4s)
-- Generating done (3.8s)
-- Build files have been written to: D:/BitNet/build
compile.log:
适用于 .NET Framework MSBuild 版本 18.0.0-preview-25474-03+5480b47bb
1>Checking Build System
build_info.vcxproj -> D:\BitNet\build\3rdparty\llama.cpp\common\build_info.dir\Release\build_info.lib
In file included from D:\bitnet\src\ggml-bitnet-lut.cpp:10:
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(1127,54): warning : 'backend' is deprecated: use the buffer type to find the storage location of the tensor [-Wdeprecated-declarations] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\include\ggml.h(585,9): message : 'backend' has been explicitly marked deprecated here [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\include\ggml.h(194,52): message : expanded from macro 'GGML_DEPRECATED' [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\src\ggml-bitnet-lut.cpp(137,15): warning : 'backend' is deprecated: use the buffer type to find the storage location of the tensor [-Wdeprecated-declarations] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\include\ggml.h(585,9): message : 'backend' has been explicitly marked deprecated here [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\include\ggml.h(194,52): message : expanded from macro 'GGML_DEPRECATED' [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
In file included from D:\bitnet\src\ggml-bitnet-lut.cpp:10:
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(279,19): warning : unused variable 'vec_sign_mask' [-Wunused-variable] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(1046,17): message : in instantiation of function template specialization 'three_qgemm_lut_3200_8640<1>' requested here [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(280,19): warning : unused variable 'vec_zero' [-Wunused-variable] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(281,19): warning : unused variable 'vec_one' [-Wunused-variable] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(523,19): warning : unused variable 'vec_sign_mask' [-Wunused-variable] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(1078,17): message : in instantiation of function template specialization 'three_qgemm_lut_3200_3200<1>' requested here [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(524,19): warning : unused variable 'vec_zero' [-Wunused-variable] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(525,19): warning : unused variable 'vec_one' [-Wunused-variable] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(767,19): warning : unused variable 'vec_sign_mask' [-Wunused-variable] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(1110,17): message : in instantiation of function template specialization 'three_qgemm_lut_8640_3200<1>' requested here [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(768,19): warning : unused variable 'vec_zero' [-Wunused-variable] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(769,19): warning : unused variable 'vec_one' [-Wunused-variable] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(19,13): warning : unused function 'aligned_free' [-Wunused-function] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(657,16): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
D:\bitnet\3rdparty\llama.cpp\ggml\src\..\..\..\..\include\bitnet-lut-kernels.h(901,16): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [D:\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]
Auto build dll exports
ggml.vcxproj -> D:\BitNet\build\bin\Release\ggml.dll
Auto build dll exports
llama.vcxproj -> D:\BitNet\build\bin\Release\llama.dll
llava.vcxproj -> D:\BitNet\build\3rdparty\llama.cpp\examples\llava\llava.dir\Release\llava.lib
sha1.vcxproj -> D:\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\sha1.dir\Release\sha1.lib
sha256.vcxproj -> D:\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\sha256.dir\Release\sha256.lib
xxhash.vcxproj -> D:\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\xxhash.dir\Release\xxhash.lib
D:\bitnet\3rdparty\llama.cpp\common\common.cpp(445,32): error : no type named 'system_clock' in namespace 'std::chrono' [D:\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]
D:\bitnet\3rdparty\llama.cpp\common\common.cpp(447,11): error : 'clock' is not a class, namespace, or enumeration [D:\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26): message : 'clock' declared here [D:\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]
D:\bitnet\3rdparty\llama.cpp\common\common.cpp(447,44): error : 'clock' is not a class, namespace, or enumeration [D:\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26): message : 'clock' declared here [D:\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]
D:\bitnet\3rdparty\llama.cpp\common\common.cpp(448,30): error : 'clock' is not a class, namespace, or enumeration [D:\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26): message : 'clock' declared here [D:\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]
llama-gguf.vcxproj -> D:\BitNet\build\bin\Release\llama-gguf.exe
llama-gguf-hash.vcxproj -> D:\BitNet\build\bin\Release\llama-gguf-hash.exe
llama-quantize-stats.vcxproj -> D:\BitNet\build\bin\Release\llama-quantize-stats.exe
llama-simple.vcxproj -> D:\BitNet\build\bin\Release\llama-simple.exe
llava_shared.vcxproj -> D:\BitNet\build\bin\Release\llava_shared.dll
llava_static.vcxproj -> D:\BitNet\build\3rdparty\llama.cpp\examples\llava\Release\llava_static.lib
i installed clang from vsinstaller cmake --help:
(.venv) PS D:\bitnet> cmake --help
Usage
cmake [options] <path-to-source>
cmake [options] <path-to-existing-build>
cmake [options] -S <path-to-source> -B <path-to-build>
Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.
Options
-S <path-to-source> = Explicitly specify a source directory.
-B <path-to-build> = Explicitly specify a build directory.
-C <initial-cache> = Pre-load a script to populate the cache.
-D <var>[:<type>]=<value> = Create or update a cmake cache entry.
-U <globbing_expr> = Remove matching entries from CMake cache.
-G <generator-name> = Specify a build system generator.
-T <toolset-name> = Specify toolset name if supported by
generator.
-A <platform-name> = Specify platform name if supported by
generator.
--toolchain <file> = Specify toolchain file
[CMAKE_TOOLCHAIN_FILE].
--install-prefix <directory> = Specify install directory
[CMAKE_INSTALL_PREFIX].
--project-file <project-file-name>
= Specify an alternate project file name.
-Wdev = Enable developer warnings.
-Wno-dev = Suppress developer warnings.
-Werror=dev = Make developer warnings errors.
-Wno-error=dev = Make developer warnings not errors.
-Wdeprecated = Enable deprecation warnings.
-Wno-deprecated = Suppress deprecation warnings.
-Werror=deprecated = Make deprecated macro and function warnings
errors.
-Wno-error=deprecated = Make deprecated macro and function warnings
not errors.
--preset <preset>,--preset=<preset>
= Specify a configure preset.
--list-presets[=<type>] = List available presets.
--workflow [<options>] = Run a workflow preset.
-E = CMake command mode. Run "cmake -E" for a
summary of commands.
-L[A][H] = List non-advanced cached variables.
-LR[A][H] <regex> = Show cached variables that match the regex.
--fresh = Configure a fresh build tree, removing any
existing cache file.
--build <dir> = Build a CMake-generated project binary tree.
Run "cmake --build" to see compatible
options and a quick help.
--install <dir> = Install a CMake-generated project binary
tree. Run "cmake --install" to see
compatible options and a quick help.
--open <dir> = Open generated project in the associated
application.
-N = View mode only.
-P <file> = Process script mode.
--find-package = Legacy pkg-config like mode. Do not use.
--graphviz=<file> = Generate graphviz of dependencies, see
CMakeGraphVizOptions.cmake for more.
--system-information [file] = Dump information about this system.
--print-config-dir = Print CMake config directory for user-wide
FileAPI queries.
--log-level=<ERROR|WARNING|NOTICE|STATUS|VERBOSE|DEBUG|TRACE>
= Set the verbosity of messages from CMake
files. --loglevel is also accepted for
backward compatibility reasons.
--log-context = Prepend log messages with context, if given
--debug-trycompile = Do not delete the try_compile build tree.
Only useful on one try_compile at a time.
--debug-output = Put cmake in a debug mode.
--debug-find = Put cmake find in a debug mode.
--debug-find-pkg=<pkg-name>[,...]
= Limit cmake debug-find to the
comma-separated list of packages
--debug-find-var=<var-name>[,...]
= Limit cmake debug-find to the
comma-separated list of result variables
--trace = Put cmake in trace mode.
--trace-expand = Put cmake in trace mode with variable
expansion.
--trace-format=<human|json-v1>
= Set the output format of the trace.
--trace-source=<file> = Trace only this CMake file/module. Multiple
options allowed.
--trace-redirect=<file> = Redirect trace output to a file instead of
stderr.
--warn-uninitialized = Warn about uninitialized values.
--no-warn-unused-cli = Don't warn about command line options.
--check-system-vars = Find problems with variable usage in system
files.
--compile-no-warning-as-error= Ignore COMPILE_WARNING_AS_ERROR property and
CMAKE_COMPILE_WARNING_AS_ERROR variable.
--link-no-warning-as-error = Ignore LINK_WARNING_AS_ERROR property and
CMAKE_LINK_WARNING_AS_ERROR variable.
--profiling-format=<fmt> = Output data for profiling CMake scripts.
Supported formats: google-trace
--profiling-output=<file> = Select an output path for the profiling data
enabled through --profiling-format.
-h,-H,--help,-help,-usage,/? = Print usage information and exit.
--version,-version,/V [<file>]
= Print version number and exit.
--help <keyword> [<file>] = Print help for one keyword and exit.
--help-full [<file>] = Print all help manuals and exit.
--help-manual <man> [<file>] = Print one help manual and exit.
--help-manual-list [<file>] = List help manuals available and exit.
--help-command <cmd> [<file>]= Print help for one command and exit.
--help-command-list [<file>] = List commands with help available and exit.
--help-commands [<file>] = Print cmake-commands manual and exit.
--help-module <mod> [<file>] = Print help for one module and exit.
--help-module-list [<file>] = List modules with help available and exit.
--help-modules [<file>] = Print cmake-modules manual and exit.
--help-policy <cmp> [<file>] = Print help for one policy and exit.
--help-policy-list [<file>] = List policies with help available and exit.
--help-policies [<file>] = Print cmake-policies manual and exit.
--help-property <prop> [<file>]
= Print help for one property and exit.
--help-property-list [<file>]= List properties with help available and
exit.
--help-properties [<file>] = Print cmake-properties manual and exit.
--help-variable var [<file>] = Print help for one variable and exit.
--help-variable-list [<file>]= List variables with help available and exit.
--help-variables [<file>] = Print cmake-variables manual and exit.
Generators
The following generators are available on this platform (* marks default):
* Visual Studio 18 2026 = Generates Visual Studio 2026 project files.
Use -A option to specify architecture.
Visual Studio 17 2022 = Generates Visual Studio 2022 project files.
Use -A option to specify architecture.
Visual Studio 16 2019 = Generates Visual Studio 2019 project files.
Use -A option to specify architecture.
Visual Studio 15 2017 = Generates Visual Studio 2017 project files.
Use -A option to specify architecture.
Visual Studio 14 2015 = Generates Visual Studio 2015 project files.
Use -A option to specify architecture.
Borland Makefiles = Generates Borland makefiles.
NMake Makefiles = Generates NMake makefiles.
NMake Makefiles JOM = Generates JOM makefiles.
MSYS Makefiles = Generates MSYS makefiles.
MinGW Makefiles = Generates a make file for use with
mingw32-make.
Green Hills MULTI = Generates Green Hills MULTI files
(experimental, work-in-progress).
Unix Makefiles = Generates standard UNIX makefiles.
Ninja = Generates build.ninja files.
Ninja Multi-Config = Generates build-<Config>.ninja files.
Watcom WMake = Generates Watcom WMake makefiles.
CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files
(deprecated).
CodeBlocks - NMake Makefiles = Generates CodeBlocks project files
(deprecated).
CodeBlocks - NMake Makefiles JOM
= Generates CodeBlocks project files
(deprecated).
CodeBlocks - Ninja = Generates CodeBlocks project files
(deprecated).
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files
(deprecated).
CodeLite - MinGW Makefiles = Generates CodeLite project files
(deprecated).
CodeLite - NMake Makefiles = Generates CodeLite project files
(deprecated).
CodeLite - Ninja = Generates CodeLite project files
(deprecated).
CodeLite - Unix Makefiles = Generates CodeLite project files
(deprecated).
Eclipse CDT4 - NMake Makefiles
= Generates Eclipse CDT 4.0 project files
(deprecated).
Eclipse CDT4 - MinGW Makefiles
= Generates Eclipse CDT 4.0 project files
(deprecated).
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files
(deprecated).
Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files
(deprecated).
Kate - MinGW Makefiles = Generates Kate project files (deprecated).
Kate - NMake Makefiles = Generates Kate project files (deprecated).
Kate - Ninja = Generates Kate project files (deprecated).
Kate - Ninja Multi-Config = Generates Kate project files (deprecated).
Kate - Unix Makefiles = Generates Kate project files (deprecated).
Sublime Text 2 - MinGW Makefiles
= Generates Sublime Text 2 project files
(deprecated).
Sublime Text 2 - NMake Makefiles
= Generates Sublime Text 2 project files
(deprecated).
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files
(deprecated).
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files
(deprecated).
i forgot to paste the err it's here:
(.venv) PS D:\bitnet> python setup_env.py -md models/BitNet-b1.58-2B-4T -q i2_s
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
i found whats wrong
add #include<chrono>to common.cpp to fix this problem
can anyone help me to fix this bug in llama.cpp, i don't know how to use git