Closed
Description
Expected Behavior
llama-cpp-python
correctly builds with latest MSVC compiler.
Current Behavior
The build dies with errors building llama.cpp
due to issues with std::chrono
in log.cpp
.
Environment and Context
Windows 11
Visual Studio Community Edition v17.13.1
Steps to Reproduce
Follow standard or development (pip install -e .
) build in readme.md
Failure Logs
(ClCompile target) ->
...\llama-cpp-python\vendor\llama.cpp\common\log.cpp(28,79): error C2039: 'system_clock': is not a member of 'std::chrono' [...\build\vendor\llama.cpp\common\common.vcxproj]
...\llama-cpp-python\vendor\llama.cpp\common\log.cpp(28,79): error C3083: 'system_clock': the symbol to the left of a '::' must be a type [...\build\vendor\llama.cpp\common\common.vcxproj]
...\llama-cpp-python\vendor\llama.cpp\common\log.cpp(28,93): error C2039: 'now': is not a member of 'std::chrono' [...\build\vendor\llama.cpp\common\common.vcxproj]
...\llama-cpp-python\vendor\llama.cpp\common\log.cpp(28,93): error C3861: 'now': identifier not found [...\build\vendor\llama.cpp\common\common.vcxproj]
...\llama-cpp-python\vendor\llama.cpp\common\log.cpp(28,25): error C2672: 'std::chrono::duration_cast': no matching overloaded function found [...\build\vendor\llama.cpp\common\common.vcxproj]
Cause and resolution
This is apparently caused by a breaking change in MSVC (see ggml-org/llama.cpp#11834) and is fixed in PR ggml-org/llama.cpp#11836 with commit tinglou/llama.cpp@4e3db1e
Running git submodule update --remote vendor\llama.cpp
locally fixes the issue.
Metadata
Metadata
Assignees
Labels
No labels