[GH-ISSUE #3277] Can not build ollama on windows 11 #2020

Closed
opened 2026-04-12 12:14:25 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @linkerlin on GitHub (Mar 21, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3277

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

D:\gos\ollama>go build .
# github.com/jmorganca/ollama/llm
llm\llm.go:52:17: undefined: gpu.CheckVRAM
llm\llm.go:68:14: undefined: gpu.GetGPUInfo
llm\llm.go:166:15: undefined: newDynExtServer

What did you expect to see?

Succ build

Steps to reproduce

No response

Are there any recent changes that introduced the issue?

No response

OS

No response

Architecture

No response

Platform

No response

Ollama version

No response

GPU

No response

GPU info

No response

CPU

No response

Other software

No response

Originally created by @linkerlin on GitHub (Mar 21, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3277 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? ``` D:\gos\ollama>go build . # github.com/jmorganca/ollama/llm llm\llm.go:52:17: undefined: gpu.CheckVRAM llm\llm.go:68:14: undefined: gpu.GetGPUInfo llm\llm.go:166:15: undefined: newDynExtServer ``` ### What did you expect to see? Succ build ### Steps to reproduce _No response_ ### Are there any recent changes that introduced the issue? _No response_ ### OS _No response_ ### Architecture _No response_ ### Platform _No response_ ### Ollama version _No response_ ### GPU _No response_ ### GPU info _No response_ ### CPU _No response_ ### Other software _No response_
GiteaMirror added the bug label 2026-04-12 12:14:25 -05:00
Author
Owner

@dhiltgen commented on GitHub (Mar 21, 2024):

Unfortunately the failure mode is a bit confusing, but this is the result of not setting $env:CGO_ENABLED="1" (assuming powershell). The gpu package uses CGO.

For development environment setup instructions, see https://github.com/ollama/ollama/blob/main/docs/development.md#windows

<!-- gh-comment-id:2011940966 --> @dhiltgen commented on GitHub (Mar 21, 2024): Unfortunately the failure mode is a bit confusing, but this is the result of not setting `$env:CGO_ENABLED="1"` (assuming powershell). The gpu package uses CGO. For development environment setup instructions, see https://github.com/ollama/ollama/blob/main/docs/development.md#windows
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#2020