shaunsingh / nix-darwin-dotfiles

Dotfiles managed via Nix-Darwin and Mk-Darwin-System, for schoolwork and kotlin, lua, and rust programming
391 stars 27 forks source link

Did your yabai install successfully? #4

Closed ghost closed 2 years ago

ghost commented 2 years ago

I get the same error whether I install XCode CLT or nix-shell -p xcodebuild clang(macOS 12 beta 9):

@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
clang-11: error: no such file or directory: 'Foundation'
clang-11: warning: no such sysroot directory: '-framework' [-Wmissing-sysroot]
clang-11: warning: no such sysroot directory: '-framework' [-Wmissing-sysroot]
make: *** [makefile:34: src/osax/sa_loader.c] Error 1
ghost commented 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:
./src/osax/x86_64/loader.m:1:9: fatal error: 'Foundation/Foundation.h' file not found
#import <Foundation/Foundation.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~
./src/osax/x86_64/loader.m:1:9: note: did not find header 'Foundation.h' in framework 'Foundation' (loaded from '/System/Library/Frameworks')
1 error generated.
make: *** [makefile:34: src/osax/sa_loader.c] Error 1
shaunsingh commented 2 years ago

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.

ghost commented 2 years ago

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!

luxus commented 2 years ago

I didn't get it build too on a m1 with Monterey..

shaunsingh commented 2 years ago

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?