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

'NSScreen *' Build Error #1200

Closed
bubersome opened this issue Mar 18, 2022 · 8 comments
Closed

'NSScreen *' Build Error #1200

bubersome opened this issue Mar 18, 2022 · 8 comments

Comments

@bubersome
Copy link

/usr/bin/make -f /Users/thundermac/CLionProjects/yabai/makefile all
rm -rf ./bin
xcrun clang ./src/osax/loader.m -shared -O2 -mmacosx-version-min=10.13 -arch x86_64 -o ./src/osax/loader -framework Foundation
xcrun clang ./src/osax/payload.m -shared -fPIC -O2 -mmacosx-version-min=10.13 -arch x86_64 -arch arm64e -o ./src/osax/payload -framework Foundation -framework Carbon
xcrun clang ./src/osax/mach_loader.m -O2 -mmacosx-version-min=10.13 -arch x86_64 -arch arm64e -o ./src/osax/mach_loader -framework Cocoa
xxd -i -a ./src/osax/loader ./src/osax/loader_bin.c
xxd -i -a ./src/osax/payload ./src/osax/payload_bin.c
xxd -i -a ./src/osax/mach_loader ./src/osax/mach_loader_bin.c
rm -f ./src/osax/loader
rm -f ./src/osax/payload
rm -f ./src/osax/mach_loader
mkdir -p ./bin
xcrun clang src/manifest.m src/osax/loader_bin.c src/osax/payload_bin.c src/osax/mach_loader_bin.c -std=c99 -Wall -g -O0 -fvisibility=hidden -mmacosx-version-min=10.13 -fno-objc-arc -arch x86_64 -arch arm64 -F/System/Library/PrivateFrameworks -framework Carbon -framework Cocoa -framework CoreServices -framework SkyLight -framework ScriptingBridge -o bin/yabai
In file included from src/manifest.m:72:
src/workspace.m:109:31: error: property 'safeAreaInsets' not found on object of type 'NSScreen *'
return screen.safeAreaInsets.top;
^
1 error generated.
make: *** [bin/yabai] Error 1

Process finished with exit code 2

@bubersome bubersome changed the title Build Error 'NSScreen *' Build Error Mar 18, 2022
@thomaschrstnsn
Copy link

I have the same experience, aarch64 mac:

❯ g show --raw head
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
commit 98f91b68c9c33cc7ebeb71609532ca5fe1e4c856 (HEAD, tag: v4.0.0) ┃
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Author: koekeishiya <[email protected]>
Date:   Wed Mar 16 23:21:17 2022 +0100

    v4.0.0

:100644 100644 eabf435 d716701 M        CHANGELOG.md
❯ make
rm -rf ./bin
xcrun clang ./src/osax/loader.m -shared -O2 -mmacosx-version-min=10.13 -arch x86_64 -o ./src/osax/loader -framework Foundation
xcrun clang ./src/osax/payload.m -shared -fPIC -O2 -mmacosx-version-min=10.13 -arch x86_64 -arch arm64e -o ./src/osax/payload -framework Foundation -framework Carbon
xcrun clang ./src/osax/mach_loader.m -O2 -mmacosx-version-min=10.13 -arch x86_64 -arch arm64e -o ./src/osax/mach_loader -framework Cocoa
xxd -i -a ./src/osax/loader ./src/osax/loader_bin.c
xxd -i -a ./src/osax/payload ./src/osax/payload_bin.c
xxd -i -a ./src/osax/mach_loader ./src/osax/mach_loader_bin.c
rm -f ./src/osax/loader
rm -f ./src/osax/payload
rm -f ./src/osax/mach_loader
mkdir -p ./bin
xcrun clang src/manifest.m src/osax/loader_bin.c src/osax/payload_bin.c src/osax/mach_loader_bin.c -std=c99 -Wall -g -O0 -fvisibility=hidden -mmacosx-version-min=10.13 -fno-objc-arc -arch x86_64 -arch arm64 -F/System/Library/PrivateFrameworks -framework Carbon -framework Cocoa -framework CoreServices -framework SkyLight -framework ScriptingBridge -o bin/yabai
In file included from src/manifest.m:72:
src/workspace.m:109:31: error: property 'safeAreaInsets' not found on object of type 'NSScreen *'
                return screen.safeAreaInsets.top;
                              ^
1 error generated.
make: *** [bin/yabai] Error 1

@thomaschrstnsn
Copy link

However it works on x64.

I am not an expert in Apple dev-tools, so I may have different versions installed there.

❯ uname -a
Darwin REDACTED 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_X86_64 x86_64

  ~/src/yabai  #v4.0.0
❯ g show --raw head
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
commit 98f91b68c9c33cc7ebeb71609532ca5fe1e4c856 (HEAD, tag: v4.0.0) ┃
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Author: koekeishiya <[email protected]>
Date:   Wed Mar 16 23:21:17 2022 +0100

    v4.0.0

:100644 100644 eabf435 d716701 M        CHANGELOG.md

  ~/src/yabai  #v4.0.0
❯ make
rm -rf ./bin
xcrun clang ./src/osax/loader.m -shared -O2 -mmacosx-version-min=10.13 -arch x86_64 -o ./src/osax/loader -framework Foundation
xcrun clang ./src/osax/payload.m -shared -fPIC -O2 -mmacosx-version-min=10.13 -arch x86_64 -arch arm64e -o ./src/osax/payload -framework Foundation -framework Carbon
xcrun clang ./src/osax/mach_loader.m -O2 -mmacosx-version-min=10.13 -arch x86_64 -arch arm64e -o ./src/osax/mach_loader -framework Cocoa
xxd -i -a ./src/osax/loader ./src/osax/loader_bin.c
xxd -i -a ./src/osax/payload ./src/osax/payload_bin.c
xxd -i -a ./src/osax/mach_loader ./src/osax/mach_loader_bin.c
rm -f ./src/osax/loader
rm -f ./src/osax/payload
rm -f ./src/osax/mach_loader
mkdir -p ./bin
xcrun clang src/manifest.m src/osax/loader_bin.c src/osax/payload_bin.c src/osax/mach_loader_bin.c -std=c99 -Wall -g -O0 -fvisibility=hidden -mmacosx-version-min=10.13 -fno-objc-arc -arch x86_64 -arch arm64 -F/System/Library/PrivateFrameworks -framework Carbon -framework Cocoa -framework CoreServices -framework SkyLight -framework ScriptingBridge -o bin/yabai

@AnanthVivekanand
Copy link

Same issue on x64.

Last 15 lines from /Users/raptor/Library/Logs/Homebrew/yabai/01.make:
xcrun clang ./src/osax/mach_loader.m -O2 -mmacosx-version-min=10.13 -arch x86_64 -arch arm64e -o ./src/osax/mach_loader -framework Cocoa
xxd -i -a ./src/osax/loader ./src/osax/loader_bin.c
xxd -i -a ./src/osax/payload ./src/osax/payload_bin.c
xxd -i -a ./src/osax/mach_loader ./src/osax/mach_loader_bin.c
rm -f ./src/osax/loader
rm -f ./src/osax/payload
rm -f ./src/osax/mach_loader
mkdir -p ./bin
xcrun clang src/manifest.m src/osax/loader_bin.c src/osax/payload_bin.c src/osax/mach_loader_bin.c -std=c99 -Wall -DNDEBUG -O2 -fvisibility=hidden -mmacosx-version-min=10.13 -fno-objc-arc -arch x86_64 -arch arm64 -F/System/Library/PrivateFrameworks -framework Carbon -framework Cocoa -framework CoreServices -framework SkyLight -framework ScriptingBridge -o bin/yabai
In file included from src/manifest.m:72:
src/workspace.m:109:31: error: property 'safeAreaInsets' not found on object of type 'NSScreen *'
                return screen.safeAreaInsets.top;
                              ^
1 error generated.
make: *** [bin/yabai] Error 1
~ % uname -a
Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64

@AnanthVivekanand
Copy link

Updating the command line tools using softwareupdate --all --install --force solved this for me.

@thomaschrstnsn
Copy link

No such luck on M1 / aarch64 🤷

softwareupdate --all --install --force
Software Update Tool

Finding available software
No updates are available.make
rm -rf ./bin
xcrun clang ./src/osax/loader.m -shared -O2 -mmacosx-version-min=10.13 -arch x86_64 -o ./src/osax/loader -framework Foundation
xcrun clang ./src/osax/payload.m -shared -fPIC -O2 -mmacosx-version-min=10.13 -arch x86_64 -arch arm64e -o ./src/osax/payload -framework Foundation -framework Carbon
xcrun clang ./src/osax/mach_loader.m -O2 -mmacosx-version-min=10.13 -arch x86_64 -arch arm64e -o ./src/osax/mach_loader -framework Cocoa
xxd -i -a ./src/osax/loader ./src/osax/loader_bin.c
xxd -i -a ./src/osax/payload ./src/osax/payload_bin.c
xxd -i -a ./src/osax/mach_loader ./src/osax/mach_loader_bin.c
rm -f ./src/osax/loader
rm -f ./src/osax/payload
rm -f ./src/osax/mach_loader
mkdir -p ./bin
xcrun clang src/manifest.m src/osax/loader_bin.c src/osax/payload_bin.c src/osax/mach_loader_bin.c -std=c99 -Wall -g -O0 -fvisibility=hidden -mmacosx-version-min=10.13 -fno-objc-arc -arch x86_64 -arch arm64 -F/System/Library/PrivateFrameworks -framework Carbon -framework Cocoa -framework CoreServices -framework SkyLight -framework ScriptingBridge -o bin/yabai
In file included from src/manifest.m:72:
src/workspace.m:109:31: error: property 'safeAreaInsets' not found on object of type 'NSScreen *'
                return screen.safeAreaInsets.top;
                              ^
1 error generated.
make: *** [bin/yabai] Error 1uname -a
Darwin aeris.lan 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101 arm64

@aerickson
Copy link

Upgrading to Monterey (OS X 12) solved this for me.

@shroomist
Copy link

I'm in the same boat here, no luck on mb air arm64

@2009
Copy link

2009 commented Jul 14, 2022

Upgrading also did not work for me. I had to download and install version 12 or later of the command line tools manually to get this to work: https://developer.apple.com/download/all/?q=command%20line%20tools

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

No branches or pull requests

7 participants