FelixKratz / dotfiles

My personal macOS configuration
GNU General Public License v3.0
966 stars 92 forks source link

Failing to install fyabai *sorry* #41

Closed Bellavene closed 7 months ago

Bellavene commented 7 months ago

Sorry for writing here, but I didn't find a possibility to do it on fyabai page. I wanted to update, but for some reason now I have an error:

brew install --HEAD felixkratz/formulae/fyabai

==> Fetching felixkratz/formulae/fyabai
==> Cloning https://github.com/FelixKratz/yabai.git
Updating /Users/Klutchevski/Library/Caches/Homebrew/fyabai--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at eea5f01 document changes
==> Installing fyabai from felixkratz/formulae
==> make -j1 install
Last 15 lines from /Users/Klutchevski/Library/Logs/Homebrew/fyabai/01.make:
xxd -i -a ./src/osax/payload ./src/osax/payload_bin.c
xxd -i -a ./src/osax/loader ./src/osax/loader_bin.c
rm -f ./src/osax/payload
rm -f ./src/osax/loader
mkdir -p ./bin
xcrun clang src/manifest.m src/osax/payload_bin.c src/osax/loader_bin.c -std=c99 -Wall -DNDEBUG -O2 -fvisibility=hidden -mmacosx-version-min=11.0 -fno-objc-arc -arch x86_64 -arch arm64 -sectcreate __TEXT __info_plist ./assets/Info.plist -F/System/Library/PrivateFrameworks -framework Carbon -framework Cocoa -framework CoreServices -framework CoreVideo -framework SkyLight -o bin/yabai
src/osax/payload_bin.c:14429:1: error: unknown type name 'size_t'
size_t __src_osax_payload_len = 173104;
^
1 error generated.
src/osax/loader_bin.c:11123:1: error: unknown type name 'size_t'
size_t __src_osax_loader_len = 133440;
^
1 error generated.
make: *** [bin/yabai] Error 1
FelixKratz commented 7 months ago

It seems to compile fine for me, make sure you have installed the proper compiler toolchain. size_t is a very basic type.

Bellavene commented 7 months ago

Could you please describe about the "toolchain"? I have installed or didn't something that is causing this? I can't find anything useful about it.

FelixKratz commented 7 months ago

Try to compile the cloned repo:

git clone https://github.com/FelixKratz/yabai.git
cd yabai
make

and try to do the same with the upstream repo, because I don't think I have changed related to this error in my fork

Bellavene commented 7 months ago
git clone https://github.com/FelixKratz/yabai.git
cd yabai
make
rm -rf ./bin
xcrun clang ./src/osax/payload.m -shared -fPIC -O2 -mmacosx-version-min=11.0 -arch x86_64 -arch arm64e -o ./src/osax/payload -F/System/Library/PrivateFrameworks -framework SkyLight -framework Foundation -framework Carbon
xcrun clang ./src/osax/loader.m -O2 -mmacosx-version-min=11.0 -arch x86_64 -arch arm64e -o ./src/osax/loader -framework Cocoa
xxd -i -a ./src/osax/payload ./src/osax/payload_bin.c
xxd -i -a ./src/osax/loader ./src/osax/loader_bin.c
rm -f ./src/osax/payload
rm -f ./src/osax/loader
mkdir -p ./bin
xcrun clang src/manifest.m src/osax/payload_bin.c src/osax/loader_bin.c -std=c99 -Wall -g -O0 -fvisibility=hidden -mmacosx-version-min=11.0 -fno-objc-arc -arch x86_64 -arch arm64 -sectcreate __TEXT __info_plist ./assets/Info.plist -F/System/Library/PrivateFrameworks -framework Carbon -framework Cocoa -framework CoreServices -framework CoreVideo -framework SkyLight -o bin/yabai
src/osax/payload_bin.c:14429:1: error: unknown type name 'size_t'
size_t __src_osax_payload_len = 173104;
^
1 error generated.
src/osax/loader_bin.c:11123:1: error: unknown type name 'size_t'
size_t __src_osax_loader_len = 133440;
^
1 error generated.
make: *** [bin/yabai] Error 1
Bellavene commented 7 months ago

Still the same problem, yabai from Asmund's source is installing without problems. Is there a way to install older edition of your code? It was working ok, but unfortunately I tried to update it.

FelixKratz commented 7 months ago

So this works?

git clone https://github.com/koekeishiya/yabai.git
cd yabai
make
Bellavene commented 7 months ago

Nope https://github.com/FelixKratz/dotfiles/issues/41#issuecomment-1964023396

FelixKratz commented 7 months ago

Its a slightly different command. The command given in https://github.com/FelixKratz/dotfiles/issues/41#issuecomment-1964026719 builds upstream yabai from source. If this fails as well, your compiler setup is broken. Maybe try reinstalling xCode or commandline tools.

Bellavene commented 7 months ago

Ah yes! My bad, This one works well as expected And installs through brew also

FelixKratz commented 7 months ago

Ok, the next step in getting to the bottom of this is to do a bisection of all the commits that I made: https://github.com/koekeishiya/yabai/compare/master...FelixKratz:yabai:master By doing this we find the point at which it breaks, i.e. the problematic commit. If you need help with this, I can assist you.

Bellavene commented 7 months ago

It was some type of homebrew bug, updated homebrew today and it fixed it.