[GH-ISSUE #1694] Windows build is broken. #78633

Closed
opened 2026-05-09 00:47:56 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @vinjn on GitHub (Dec 24, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1694

go build .
# github.com/jmorganca/ollama/llm

llm\llm.go:83:17: undefined: gpu.GetGPUInfo
llm\llm.go:89:9: undefined: nativeInit
llm\llm.go:92:109: undefined: extServer
llm\llm.go:94:15: undefined: newDynamicShimExtServer
llm\llm.go:101:9: undefined: newDefaultExtServer
llm\llama.go:211:24: undefined: libEmbed
llm\llama.go:218:19: undefined: libEmbed
Originally created by @vinjn on GitHub (Dec 24, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1694 ```bash go build . # github.com/jmorganca/ollama/llm llm\llm.go:83:17: undefined: gpu.GetGPUInfo llm\llm.go:89:9: undefined: nativeInit llm\llm.go:92:109: undefined: extServer llm\llm.go:94:15: undefined: newDynamicShimExtServer llm\llm.go:101:9: undefined: newDefaultExtServer llm\llama.go:211:24: undefined: libEmbed llm\llama.go:218:19: undefined: libEmbed ```
GiteaMirror added the bug label 2026-05-09 00:47:56 -05:00
Author
Owner

@dhiltgen commented on GitHub (Dec 24, 2023):

I forgot to update the docs (I'll post a PR later today). Make sure to enable CGO. Assuming powershell - $env:CGO_ENABLED="1"

You'll also need to install MinGW so it can compile the C/C++ code with the GCC toolchain.

Note: things are still a bit rough around the edges for native windows. I'm working on some improvements to the windows build so we should wind up with a single binary that can run without any special PATH and operate either on the CPU or CUDA card natively.

<!-- gh-comment-id:1868554520 --> @dhiltgen commented on GitHub (Dec 24, 2023): I forgot to update the docs (I'll post a PR later today). Make sure to enable CGO. Assuming powershell - `$env:CGO_ENABLED="1"` You'll also need to install MinGW so it can compile the C/C++ code with the GCC toolchain. Note: things are still a bit rough around the edges for native windows. I'm working on some improvements to the windows build so we should wind up with a single binary that can run without any special PATH and operate either on the CPU or CUDA card natively.
Author
Owner

@vinjn commented on GitHub (Dec 24, 2023):

Thanks Daniel. Will rebuild with your instructions.

<!-- gh-comment-id:1868557612 --> @vinjn commented on GitHub (Dec 24, 2023): Thanks Daniel. Will rebuild with your instructions.
Author
Owner

@dhiltgen commented on GitHub (Dec 24, 2023):

Keep an eye on https://github.com/jmorganca/ollama/pull/1680 which is where I'm planning to post the windows native build improvements once I get them sorted out.

<!-- gh-comment-id:1868559827 --> @dhiltgen commented on GitHub (Dec 24, 2023): Keep an eye on https://github.com/jmorganca/ollama/pull/1680 which is where I'm planning to post the windows native build improvements once I get them sorted out.
Author
Owner

@vinjn commented on GitHub (Jan 5, 2024):

@dhiltgen great that #1680 is merged, does that mean I can also close this ticket?

<!-- gh-comment-id:1879375065 --> @vinjn commented on GitHub (Jan 5, 2024): @dhiltgen great that #1680 is merged, does that mean I can also close this ticket?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#78633