[GH-ISSUE #9745] Build Failure #52879

Closed
opened 2026-04-29 01:15:28 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @eyadsibai on GitHub (Mar 13, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9745

What is the issue?

Unable to build ollama with CUDA on my machine

Relevant log output

error: builder for '/nix/store/vily1yyf5s3ajkbzw9z7rhq91w89b867-ollama-0.6.0.drv' failed with exit code 2;
       last 25 log lines:
       > [ 76%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_64-ncols2_1.cu.o
       > [ 77%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_1.cu.o
       > [ 78%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_2.cu.o
       > [ 78%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_4.cu.o
       > [ 79%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_8.cu.o
       > [ 80%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq1_s.cu.o
       > [ 80%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq2_s.cu.o
       > [ 81%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq2_xs.cu.o
       > [ 82%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq2_xxs.cu.o
       > [ 82%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq3_s.cu.o
       > [ 83%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq3_xxs.cu.o
       > [ 84%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq4_nl.cu.o
       > [ 84%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq4_xs.cu.o
       > [ 85%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q2_k.cu.o
       > [ 86%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q3_k.cu.o
       > [ 86%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q4_0.cu.o
       > [ 87%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q4_1.cu.o
       > [ 88%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q4_k.cu.o
       > [ 88%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q5_0.cu.o
       > nvcc error   : 'ptxas' died due to signal 11 (Invalid memory reference)
       > nvcc error   : 'ptxas' core dumped
       > make[2]: *** [ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/build.make:800: ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_4-ncols2_4.cu.o] Error 139
       > make[2]: *** Waiting for unfinished jobs....
       > make[1]: *** [CMakeFiles/Makefile2:623: ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/all] Error 2
       > make: *** [Makefile:136: all] Error 2
       For full logs, run 'nix log /nix/store/vily1yyf5s3ajkbzw9z7rhq91w89b867-ollama-0.6.0.drv'.
error: 1 dependencies of derivation '/nix/store/9ascyvqyxdqh4s3qhmx0lrklqrkk5l41-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/bwpmrgjxxxyh7by8cy8pnwcbdpv09yav-unit-ollama.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8p856qqq81s76zc29c8qx4d919gv6928-nixos-system-workstation-25.05.20250313.6607cf7.drv' failed to build

OS

NixOS 25.05.20250313.6607cf7 (Warbler) x86_64

GPU

NVIDIA GeForce RTX 4090

CPU

13th Gen Intel i9-13900K (32) @ 5.500GHz

Ollama version

0.6.0

https://github.com/NixOS/nixpkgs/issues/389661

Originally created by @eyadsibai on GitHub (Mar 13, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9745 ### What is the issue? Unable to build ollama with CUDA on my machine ### Relevant log output ```shell error: builder for '/nix/store/vily1yyf5s3ajkbzw9z7rhq91w89b867-ollama-0.6.0.drv' failed with exit code 2; last 25 log lines: > [ 76%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_64-ncols2_1.cu.o > [ 77%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_1.cu.o > [ 78%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_2.cu.o > [ 78%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_4.cu.o > [ 79%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_8.cu.o > [ 80%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq1_s.cu.o > [ 80%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq2_s.cu.o > [ 81%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq2_xs.cu.o > [ 82%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq2_xxs.cu.o > [ 82%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq3_s.cu.o > [ 83%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq3_xxs.cu.o > [ 84%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq4_nl.cu.o > [ 84%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-iq4_xs.cu.o > [ 85%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q2_k.cu.o > [ 86%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q3_k.cu.o > [ 86%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q4_0.cu.o > [ 87%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q4_1.cu.o > [ 88%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q4_k.cu.o > [ 88%] Building CUDA object ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/mmq-instance-q5_0.cu.o > nvcc error : 'ptxas' died due to signal 11 (Invalid memory reference) > nvcc error : 'ptxas' core dumped > make[2]: *** [ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/build.make:800: ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-f16-instance-ncols1_4-ncols2_4.cu.o] Error 139 > make[2]: *** Waiting for unfinished jobs.... > make[1]: *** [CMakeFiles/Makefile2:623: ml/backend/ggml/ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/all] Error 2 > make: *** [Makefile:136: all] Error 2 For full logs, run 'nix log /nix/store/vily1yyf5s3ajkbzw9z7rhq91w89b867-ollama-0.6.0.drv'. error: 1 dependencies of derivation '/nix/store/9ascyvqyxdqh4s3qhmx0lrklqrkk5l41-system-path.drv' failed to build error: 1 dependencies of derivation '/nix/store/bwpmrgjxxxyh7by8cy8pnwcbdpv09yav-unit-ollama.service.drv' failed to build error: 1 dependencies of derivation '/nix/store/8p856qqq81s76zc29c8qx4d919gv6928-nixos-system-workstation-25.05.20250313.6607cf7.drv' failed to build ``` ### OS NixOS 25.05.20250313.6607cf7 (Warbler) x86_64 ### GPU NVIDIA GeForce RTX 4090 ### CPU 13th Gen Intel i9-13900K (32) @ 5.500GHz ### Ollama version 0.6.0 https://github.com/NixOS/nixpkgs/issues/389661
GiteaMirror added the bug label 2026-04-29 01:15:28 -05:00
Author
Owner

@YonTracks commented on GitHub (Mar 14, 2025):

not sure, but I'm commenting for learning purposes, hope that is ok.

is this NixOS detecting cuda driver/lib and the sync of all this, and it knows it's not quite, correct? similar to make and building, but extra?
epic.
Nix seems good.

<!-- gh-comment-id:2723185304 --> @YonTracks commented on GitHub (Mar 14, 2025): not sure, but I'm commenting for learning purposes, hope that is ok. is this NixOS detecting cuda driver/lib and the sync of all this, and it knows it's not quite, correct? similar to make and building, but extra? epic. Nix seems good.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#52879