We’re hitting a Windows MSVC linker conflict when llama-cpp-sys-2 is linked in the same binary graph as v8 (via deno_core in our
project).
Environment
- Target: x86_64-pc-windows-msvc
- Toolchain: Rust stable MSVC
- llama-cpp-2: 0.1.136 (also reproduced on 0.1.133)
- llama-cpp-sys-2: 0.1.136 (also reproduced on 0.1.133)
- Linker: MSVC link.exe
Error (key lines)
- libv8-...rlib(exception.obj) : error LNK2005 ... 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
- fatal error LNK1169: one or more multiply defined symbols found
This happens across multiple binaries in the same build (e.g. generate_acp_schema, build_canonical_models, goosed).
What we already tried
- Force dynamic CRT on Windows build:
- RUSTFLAGS=-C target-feature=-crt-static
- CMAKE_POLICY_DEFAULT_CMP0091=NEW
- CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL
- LLAMA_STATIC_CRT=0
- Upgraded from
0.1.133 to 0.1.136
Result: still reproduces with the same v8 vs llama-model-loader duplicate symbols.
PR and build to attempt fixing this issue in our code base
We’re hitting a Windows MSVC linker conflict when
llama-cpp-sys-2is linked in the same binary graph asv8(via deno_core in ourproject).
Environment
Error (key lines)
model-loader.obj)
This happens across multiple binaries in the same build (e.g. generate_acp_schema, build_canonical_models, goosed).
What we already tried
0.1.133to0.1.136Result: still reproduces with the same v8 vs llama-model-loader duplicate symbols.
PR and build to attempt fixing this issue in our code base