From ca8555f6adab8a702a4d93eebe61ea9111499ba8 Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 21 Mar 2026 15:49:38 +0000 Subject: [PATCH] fix(build): add /FORCE:MULTIPLE for ggml duplicate symbol collision whisper-rs-sys and llama-cpp-sys-2 both bundle ggml statically, causing LNK2005/LNK1169 on MSVC. This flag tells the linker to accept duplicates. TEMPORARY: replace with shared system ggml or process separation before release. Co-Authored-By: Claude Opus 4.6 (1M context) --- .cargo/config.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..9723673 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,11 @@ +# TEMPORARY WORKAROUND: whisper-rs-sys and llama-cpp-sys-2 both bundle ggml +# statically, causing duplicate symbol errors on MSVC (LNK2005/LNK1169). +# +# /FORCE:MULTIPLE tells the linker to accept duplicate symbols and pick the +# first definition. This is safe for development since both ggml copies are +# from recent crate versions with compatible ABIs. +# +# DO NOT SHIP WITH THIS FLAG. Replace with shared system ggml or process +# separation before release. See: input/tasks/kon-ggml-dedup.md (in CORBEL repo) +[target.x86_64-pc-windows-msvc] +rustflags = ["-C", "link-arg=/FORCE:MULTIPLE"]