Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build flake's package in nix darwin. #3261

Closed
tpdns90321 opened this issue Sep 19, 2023 · 0 comments · Fixed by #3262
Closed

Can't build flake's package in nix darwin. #3261

tpdns90321 opened this issue Sep 19, 2023 · 0 comments · Fixed by #3262

Comments

@tpdns90321
Copy link
Contributor

Expected Behavior

After run 'nix flake update' that include 'llama.cpp' repository.
Build flake's default package, and migration newer version from older version.

Current Behavior

Nix can't build this flake's default package.
Because missing library named Apple's 'Accelerate'.

Environment and Context

Apple M2 MacBook Air(24GB RAM)

Failure Information (for bugs)

This seems to have happened after added the previous 'ROCM' support to flake.

Steps to Reproduce

  1. Install nix-darwin in MacOS.
  2. Run "nix flake new llama-cpp-test"(Use nix's experimental feature: nix-command flakes)
  3. Add this line in flake.nix: inputs = { llama-cpp = "github:ggerganov/llama.cpp"; };
  4. Add argument "llama-cpp" in output.
  5. Add this line in output's property(Replace "aarch64" to your cpu architecture): packages.aarch64-darwin.default = llama-cpp.packages.aarch64-darwin.default;
  6. Run "nix run build '.#packages.aarch64-darwin.default'"

Failure Logs

error: builder for '/nix/store/5bbdid776grhvh6haj7p00z8h2v1n8wr-llama.cpp.drv' failed with exit code 1;
last 10 log lines:
> /nix/store/037jis73nzmp6g1y1ngddxdkf0kjsrzx-clang-wrapper-11.1.0/bin/clang -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -DGGML_USE_MPI -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/tmp/nix-build-llama.cpp.drv-0/fnv9jqcbbn1vp0dlrzqfml4rxg4f68zn-source/. -D__ARM_FEATURE_DOTPROD=1 -O3 -DNDEBUG -std=gnu11 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT CMakeFiles/ggml.dir/ggml.c.o -MF CMakeFiles/ggml.dir/ggml.c.o.d -o CMakeFiles/ggml.dir/ggml.c.o -c /tmp/nix-build-llama.cpp.drv-0/fnv9jqcbbn1vp0dlrzqfml4rxg4f68zn-source/ggml.c
> /tmp/nix-build-llama.cpp.drv-0/fnv9jqcbbn1vp0dlrzqfml4rxg4f68zn-source/ggml.c:259:10: fatal error: 'Accelerate/Accelerate.h' file not found
> #include <Accelerate/Accelerate.h>
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> 1 error generated.
> [5/72] Building CXX object common/CMakeFiles/common.dir/console.cpp.o
> [6/72] Building C object CMakeFiles/ggml.dir/k_quants.c.o
> [7/72] Building CXX object common/CMakeFiles/common.dir/common.cpp.o
> [8/72] Building CXX object CMakeFiles/llama.dir/llama.cpp.o
> ninja: build stopped: subcommand failed.
For full logs, run 'nix log /nix/store/5bbdid776grhvh6haj7p00z8h2v1n8wr-llama.cpp.drv'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant