Closed ghost closed 2 years ago
oh! not same error, this is install “xcode clt”:
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/kk79al6jiam8m2b2lp3yq3isackilg25-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
build flags: SHELL=/nix/store/bkp2nl65nbzjkvg2nypxxdjns7c13g8p-bash-5.1-p8/bin/bash
makefile:42: warning: overriding recipe for target 'src/osax/sa_payload.c'
makefile:34: warning: ignoring old recipe for target 'src/osax/sa_payload.c'
rm -rf ./bin
/nix/store/bkp2nl65nbzjkvg2nypxxdjns7c13g8p-bash-5.1-p8/bin/bash: line 1: xcrun: command not found
/nix/store/bkp2nl65nbzjkvg2nypxxdjns7c13g8p-bash-5.1-p8/bin/bash: line 1: xcrun: command not found
/Library/Developer/CommandLineTools/usr/bin/clang ./src/osax/loader.m -shared -O2 -mmacosx-version-min=10.13 -arch x86_64 -o ./src/osax/loader -isysroot "" -framework Foundation
In file included from ./src/osax/loader.m:2:
[1m./src/osax/x86_64/loader.m:1:9: [0m[0;1;31mfatal error: [0m[1m'Foundation/Foundation.h' file not found[0m
#import <Foundation/Foundation.h>
[0;1;32m ^~~~~~~~~~~~~~~~~~~~~~~~~
[0m[1m./src/osax/x86_64/loader.m:1:9: [0m[0;1;30mnote: [0mdid not find header 'Foundation.h' in framework 'Foundation' (loaded from '/System/Library/Frameworks')[0m
1 error generated.
make: *** [makefile:34: src/osax/sa_loader.c] Error 1
Looks like you need to install the command line tools (see: https://github.com/shaunsingh/nix-darwin-dotfiles#macos)
The command line tools should be optional, however the Nixpkg for yabai doesn't install Xcode, and only the apple sdk. once https://github.com/NixOS/nixpkgs/pull/131911 is merged then this shouldn't be an issue
For now just run the following:
xcode-select --install
Lmk if you run into any issues. I'm still quite inexperienced with nix, so errors might pop up from time to time.
Looks like you need to install the command line tools (see: https://github.com/shaunsingh/nix-darwin-dotfiles#macos)
The command line tools should be optional, however the Nixpkg for yabai doesn't install Xcode, and only the apple sdk. once NixOS/nixpkgs#131911 is merged then this shouldn't be an issue
For now just run the following:
xcode-select --install
Lmk if you run into any issues. I'm still quite inexperienced with nix, so errors might pop up from time to time.
I installed command line tools , but still “Foundation.h file not found” , now wait the pr merged, i will try, thank you!
I didn't get it build too on a m1 with Monterey..
I recently reinstalled my OS just to check, installed the latest developer commandline tools via xcode-select --install
, git cloned
than built and ran the configuration just fine. there is a nix package that handles the command line tools as well, I don't have much experience with it but maybe it would work?
I get the same error whether I install XCode CLT or
nix-shell -p xcodebuild clang
(macOS 12 beta 9):