-
Notifications
You must be signed in to change notification settings - Fork 3.2k
bug(windows): MSVC link failure in goosed when v8 and llama-cpp are linked together (LNK2038/LNK2005/LNK1169) #7410
Description
Windows MSVC desktop builds fail at link stage when goosed links both v8/deno_core and llama-cpp-sys-2 in the same binary. Observed failures include CRT/runtime-library mismatch and duplicate C++ exception symbol definitions.
This appears to be a regression after local inference (llama.cpp) integration (commit ddd35f6d4, 2026-02-19).
To Reproduce
Steps to reproduce the behavior:
- Use Windows MSVC environment (
windows-latest/ VS2022). - Ensure build includes both dependency groups:
deno_core/v8llama-cpp-2/llama-cpp-sys-2
- Run:
rustup target add x86_64-pc-windows-msvccargo cleancargo build --release -p goose-server --target x86_64-pc-windows-msvc --verbose
- Observe linker failure near final
goosed.exelink step.
CI reproduction:
- Trigger desktop Windows workflow.
- Open Windows build job (
Build goosed (Windows)). - See linker signatures below.
Expected behavior
Windows MSVC build should complete successfully without runtime-library mismatch or duplicate symbol linker errors.
Screenshots
N/A (CI run/job links and log excerpt below).
System information
- OS & Arch: Windows Server 2025 x64 (
windows-latest) - Interface: CI / desktop workflow
- Version: 1.24.0 line
- Extensions enabled: N/A
- Provider & Model: N/A
Additional context
Relevant log excerpt:
error: linking with link.exe failed: exit code: 1169
libv8-...rlib(exception.obj) : error LNK2005:
std::exception_ptr::exception_ptr(...) already defined in
libllama_cpp_sys_2-...rlib(llama-model-loader.obj)
libv8-...rlib(exception.obj) : error LNK2005:
std::exception_ptr::~exception_ptr(void) already defined in
libllama_cpp_sys_2-...rlib(llama-model-loader.obj)
libv8-...rlib(exception.obj) : error LNK2005:
std::current_exception(void) already defined in
libllama_cpp_sys_2-...rlib(llama-model-loader.obj)
libv8-...rlib(exception.obj) : error LNK2005:
std::rethrow_exception(std::exception_ptr) already defined in
libllama_cpp_sys_2-...rlib(llama-model-loader.obj)
LINK : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs
...goosed.exe : fatal error LNK1169: one or more multiply defined symbols found
Also observed in another run:
LNK2038 mismatch detected for 'RuntimeLibrary': MT_StaticRelease vs MD_DynamicRelease
followed byLNK2005/LNK1169.
Notes:
- Forcing dynamic CRT in CI (
LLAMA_STATIC_CRT=OFF,CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL,CMAKE_ARGS=...) did not eliminate the failure. - This is a link-stage issue in
goosed.exe, not a compile-stage Rust error. - Separate run
22258803948failed for unrelated UI import resolution after local revert experimentation;Build goosed (Windows)passed there.