-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Cannot find xcrun when building with Nix flakes on Darwin/MacOS #6117
Labels
Comments
josephst
added a commit
to josephst/llama.cpp
that referenced
this issue
Mar 17, 2024
Suspect it's related to this change #6015 |
josephst
added a commit
to josephst/llama.cpp
that referenced
this issue
Mar 17, 2024
josephst
added a commit
to josephst/llama.cpp
that referenced
this issue
Mar 18, 2024
is usable during build (used for compiling Metal shaders) Fixes ggerganov#6117
josephst
added a commit
to josephst/llama.cpp
that referenced
this issue
Mar 18, 2024
is usable during build (used for compiling Metal shaders) Fixes ggerganov#6117
josephst
added a commit
to josephst/llama.cpp
that referenced
this issue
Mar 19, 2024
is usable during build (used for compiling Metal shaders) Fixes ggerganov#6117
josephst
added a commit
to josephst/llama.cpp
that referenced
this issue
Mar 19, 2024
is usable during build (used for compiling Metal shaders) Fixes ggerganov#6117
josephst
added a commit
to josephst/llama.cpp
that referenced
this issue
Mar 19, 2024
is usable during build (used for compiling Metal shaders) Fixes ggerganov#6117
josephst
added a commit
to josephst/llama.cpp
that referenced
this issue
Mar 21, 2024
is usable during build (used for compiling Metal shaders) Fixes ggerganov#6117
josephst
added a commit
to josephst/llama.cpp
that referenced
this issue
Mar 25, 2024
is usable during build (used for compiling Metal shaders) Fixes ggerganov#6117
philiptaron
pushed a commit
that referenced
this issue
Mar 26, 2024
…rs (#6118) * Symlink to /usr/bin/xcrun so that `xcrun` binary is usable during build (used for compiling Metal shaders) Fixes #6117 * cmake - copy default.metallib to install directory When metal files are compiled to default.metallib, Cmake needs to add this to the install directory so that it's visible to llama-cpp Also, update package.nix to use absolute path for default.metallib (it's not finding the bundle) * add `precompileMetalShaders` flag (defaults to false) to disable precompilation of metal shader Precompilation requires Xcode to be installed and requires disable sandbox on nix-darwin
github-actions bot
pushed a commit
to KerfuffleV2/ggml-sys-bleedingedge
that referenced
this issue
Mar 26, 2024
== Relevant log messages from source repo: commit e190f1fca6f60d80944f9e8709d343a025c4d245 Author: Joseph Stahl <1269177+josephst@users.noreply.github.com> Date: Mon Mar 25 20:51:46 2024 -0400 nix: make `xcrun` visible in Nix sandbox for precompiling Metal shaders (#6118) * Symlink to /usr/bin/xcrun so that `xcrun` binary is usable during build (used for compiling Metal shaders) Fixes ggerganov/llama.cpp#6117 * cmake - copy default.metallib to install directory When metal files are compiled to default.metallib, Cmake needs to add this to the install directory so that it's visible to llama-cpp Also, update package.nix to use absolute path for default.metallib (it's not finding the bundle) * add `precompileMetalShaders` flag (defaults to false) to disable precompilation of metal shader Precompilation requires Xcode to be installed and requires disable sandbox on nix-darwin commit 280345968dabc00d212d43e31145f5c9961a7604 Author: slaren <slarengh@gmail.com> Date: Tue Mar 26 01:16:01 2024 +0100 cuda : rename build flag to LLAMA_CUDA (#6299)
hodlen
pushed a commit
to hodlen/llama.cpp
that referenced
this issue
Apr 1, 2024
…rs (ggerganov#6118) * Symlink to /usr/bin/xcrun so that `xcrun` binary is usable during build (used for compiling Metal shaders) Fixes ggerganov#6117 * cmake - copy default.metallib to install directory When metal files are compiled to default.metallib, Cmake needs to add this to the install directory so that it's visible to llama-cpp Also, update package.nix to use absolute path for default.metallib (it's not finding the bundle) * add `precompileMetalShaders` flag (defaults to false) to disable precompilation of metal shader Precompilation requires Xcode to be installed and requires disable sandbox on nix-darwin
hodlen
pushed a commit
to hodlen/llama.cpp
that referenced
this issue
Apr 3, 2024
…rs (ggerganov#6118) * Symlink to /usr/bin/xcrun so that `xcrun` binary is usable during build (used for compiling Metal shaders) Fixes ggerganov#6117 * cmake - copy default.metallib to install directory When metal files are compiled to default.metallib, Cmake needs to add this to the install directory so that it's visible to llama-cpp Also, update package.nix to use absolute path for default.metallib (it's not finding the bundle) * add `precompileMetalShaders` flag (defaults to false) to disable precompilation of metal shader Precompilation requires Xcode to be installed and requires disable sandbox on nix-darwin
tybalex
pushed a commit
to tybalex/function.cpp
that referenced
this issue
Apr 17, 2024
…rs (ggerganov#6118) * Symlink to /usr/bin/xcrun so that `xcrun` binary is usable during build (used for compiling Metal shaders) Fixes ggerganov#6117 * cmake - copy default.metallib to install directory When metal files are compiled to default.metallib, Cmake needs to add this to the install directory so that it's visible to llama-cpp Also, update package.nix to use absolute path for default.metallib (it's not finding the bundle) * add `precompileMetalShaders` flag (defaults to false) to disable precompilation of metal shader Precompilation requires Xcode to be installed and requires disable sandbox on nix-darwin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On latest version of llama.cpp, building from flake (ie
nix build github:ggerganov/llama.cpp
) produces error with latest commit (d01b3c4 at time of writing).The key error is
/bin/sh: xcrun: command not found
-- Nix provides a clean$PATH
to CMake which does not include/usr/bin
and so Cmake is unable to locate or run/usr/bin/xcrun
. This behavior is specific to the combination of MacOS and Nix.This can be fixed by either manually adding
/usr/bin
to$PATH
prior to configuration & build steps, or by using absolute path (/usr/bin/xcrun
) and settingdontFixCmake = true;
in package.nix.System details:
Nix 2.21 (sandbox = off), MacOS 14.4 Sonoma
The text was updated successfully, but these errors were encountered: