kmonad / kmonad

An advanced keyboard manager
MIT License
3.9k stars 318 forks source link

Build failure on MacOS Sequoia #885

Open sooheon opened 2 hours ago

sooheon commented 2 hours ago
$ stack install

Warning: nix (Nix) 2.23.3 is on the PATH (at /nix/var/nix/profiles/default/bin/nix) but Stack's Nix
         integration is disabled. To mute this message in future, set notify-if-nix-on-path: false in
         Stack's configuration.

kmonad-0.4.3: unregistering (flags changed from
["-fdext","-f-kext","--extra-include-dirs=/Users/sooheon/code/kmonad/c_src/mac/Karabiner-VirtualHIDDevice/dist/include"]
to ["-f-dext","-f-kext"])
kmonad> configure (lib + exe)
Configuring kmonad-0.4.3...
kmonad> build (lib + exe) with ghc-9.6.6
Preprocessing library for kmonad-0.4.3..
Building library for kmonad-0.4.3..
[ 1 of 35] Compiling KMonad.Prelude.Imports

...

[2 of 2] Linking .stack-work/dist/aarch64-osx/ghc-9.6.6/build/kmonad/kmonad [Objects changed]
ld: warning: search path '/usr/local/gfortran/lib' not found
Undefined symbols for architecture arm64:
  "_grab_kb", referenced from:
       in libHSkmonad-0.4.3-1fZVv7QycZ97pjeP2S2kqT.a[34](IOKitSource.o)
       in libHSkmonad-0.4.3-1fZVv7QycZ97pjeP2S2kqT.a[34](IOKitSource.o)
  "_release_kb", referenced from:
       in libHSkmonad-0.4.3-1fZVv7QycZ97pjeP2S2kqT.a[34](IOKitSource.o)
  "_send_key", referenced from:
       in libHSkmonad-0.4.3-1fZVv7QycZ97pjeP2S2kqT.a[35](KextSink.o)
  "_wait_key", referenced from:
       in libHSkmonad-0.4.3-1fZVv7QycZ97pjeP2S2kqT.a[34](IOKitSource.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ghc-9.6.6: `gcc' failed in phase `Linker'. (Exit code: 1)

Error: [S-7282]
       Stack failed to execute the build plan.

       While executing the build plan, Stack encountered the error:

       [S-7011]
       While building package kmonad-0.4.3 (scroll up to its section to see the error) using:
       /Users/sooheon/.stack/setup-exe-cache/aarch64-osx/Cabal-simple_DY68M0FN_3.10.3.0_ghc-9.6.6 --verbose=1 --builddir=.stack-work/dist/aarch64-osx/ghc-9.6.6 build lib:kmonad exe:kmonad --ghc-options " -fdiagnostics-color=always"
       Process exited with code: ExitFailure 1
sooheon commented 1 hour ago
$ defaults read /Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/Info.plist CFBundleVersion
5.0.0

also tried with 3.1.0 as recommended in #334 , same error.

$ systemextensionsctl list
2 extension(s)
--- com.apple.system_extension.driver_extension (Go to 'System Settings > General > Login Items & Extensions > Driver Extensions' to modify these system extension(s))
enabled active  teamID  bundleID (version)  name    [state]
*   *   G43BCU2T37  org.pqrs.Karabiner-DriverKit-VirtualHIDDevice (1.8.0/1.8.0) org.pqrs.Karabiner-DriverKit-VirtualHIDDevice   [activated enabled]

weird how here the version number shows as 1.8.0, not the 5.0.0 expected.