From 554172759ca56cbf2690fea50fbaa11fe2bfcd48 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Mon, 1 Dec 2025 15:36:47 -0800 Subject: [PATCH] win: warn if ggml-base detected in PATH (#13289) If the user has somehow installed another GGML based app which places a ggml-base lib somewhere in their PATH, we can experience runtime problems due to incompatibilities. This change adds a warning message if we detect a ggml-base outside of our install location to aid in troubleshooting. --- discover/runner.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/discover/runner.go b/discover/runner.go index fcac0225..44737aa2 100644 --- a/discover/runner.go +++ b/discover/runner.go @@ -65,6 +65,7 @@ func GPUDevices(ctx context.Context, runners []ml.FilteredRunnerDiscovery) []ml. } slog.Info("discovering available GPUs...") + detectIncompatibleLibraries() // Warn if any user-overrides are set which could lead to incorrect GPU discovery overrideWarnings() @@ -487,3 +488,16 @@ func overrideWarnings() { slog.Warn("if GPUs are not correctly discovered, unset and try again") } } + +func detectIncompatibleLibraries() { + if runtime.GOOS != "windows" { + return + } + basePath, err := exec.LookPath("ggml-base.dll") + if err != nil || basePath == "" { + return + } + if !strings.HasPrefix(basePath, ml.LibOllamaPath) { + slog.Warn("potentially incompatible library detected in PATH", "location", basePath) + } +}