-
Notifications
You must be signed in to change notification settings - Fork 321
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
Fixed MacOS build #893
Fixed MacOS build #893
Conversation
51522e6
to
bbf9185
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compilation succeeds, and a working binary is generated! \o/ 🎉
There's still an error message being emitted during the compilation step though, I made a comment in the relevant code and will leave to your discretion the decision if this completely solves #885.
Thank you so much for such promptly reply and fix! 🙇♂️🙏
Hmm, weird my comment on the code was not added. sending here again. Compilation succeeds, but the changes in the header file do not get rid of the error messages being emitted during the installation step. I'm not sure if this is a major problem since the end goal is accomplished, so will leave to your discretion deciding if it fixes #885 or not. $ stack install --flag kmonad:dext --extra-include-dirs=c_src/mac/Karabiner-DriverKit-VirtualHIDDevice/include/pqrs/karabiner/driverkit:c_src/mac/Karabiner-DriverKit-VirtualHIDDevice/src/Client/vendor/include
Preparing to install GHC to an isolated location. This will not interfere with any system-level installation.
Downloaded ghc-9.6.6.
ld: unknown option: --version
/Users/mcs/.stack/programs/aarch64-osx/ghc-9.6.6.temp/ghc-9.6.6-aarch64-apple-darwin/configure: line 7006: FP_PROG_LD_BUILD_ID: command not found
Installed GHC.
[1 of 3] Compiling Main ( /Users/mcs/.stack/setup-exe-src/setup-DY68M0FN.hs, /Users/mcs/.stack/setup-exe-src/setup-DY68M0FN.o )
[2 of 3] Compiling StackSetupShim ( /Users/mcs/.stack/setup-exe-src/setup-shim-DY68M0FN.hs, /Users/mcs/.stack/setup-exe-src/setup-shim-DY68M0FN.o )
[3 of 3] Linking /Users/mcs/.stack/setup-exe-cache/aarch64-osx/tmp-Cabal-simple_DY68M0FN_3.10.3.0_ghc-9.6.6
# ... snip more logs ... #
/Users/mcs/git/github/jokesper/kmonad/In file included from c_src/mac/dext.cpp:3:0: error:
/Users/mcs/git/github/jokesper/kmonad/c_src/mac/keyio_mac.hpp:168:39: error:
warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
kr = IOServiceGetMatchingServices(kIOMainPortDefault,
^~~~~~~~~~~~~~~~~~
kIOMainPortDefault
|
168 | kr = IOServiceGetMatchingServices(kIOMainPortDefault,
| ^
/Users/mcs/git/github/jokesper/kmonad/c_src/mac/keyio_mac.hpp:13:32: error:
note: expanded from macro 'kIOMainPortDefault'
#define kIOMainPortDefault kIOMasterPortDefault
^
|
13 | #define kIOMainPortDefault kIOMasterPortDefault
| ^
/Users/mcs/git/github/jokesper/kmonad//Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:133:19: error:
note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
|
133 | const mach_port_t kIOMasterPortDefault
| ^
const mach_port_t kIOMasterPortDefault
^
/Users/mcs/git/github/jokesper/kmonad/In file included from c_src/mac/dext.cpp:3:0: error:
/Users/mcs/git/github/jokesper/kmonad/c_src/mac/keyio_mac.hpp:177:72: error:
warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
IONotificationPortRef notification_port = IONotificationPortCreate(kIOMainPortDefault);
^~~~~~~~~~~~~~~~~~
kIOMainPortDefault
|
177 | IONotificationPortRef notification_port = IONotificationPortCreate(kIOMainPortDefault);
| ^
/Users/mcs/git/github/jokesper/kmonad/c_src/mac/keyio_mac.hpp:13:32: error:
note: expanded from macro 'kIOMainPortDefault'
#define kIOMainPortDefault kIOMasterPortDefault
^
|
13 | #define kIOMainPortDefault kIOMasterPortDefault
| ^
/Users/mcs/git/github/jokesper/kmonad//Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:133:19: error:
note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
|
133 | const mach_port_t kIOMasterPortDefault
| ^
const mach_port_t kIOMasterPortDefault
^
2 warnings generated.
/Users/mcs/git/github/jokesper/kmonad/In file included from c_src/mac/dext.cpp:3:0: error:
/Users/mcs/git/github/jokesper/kmonad/c_src/mac/keyio_mac.hpp:168:39: error:
warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
kr = IOServiceGetMatchingServices(kIOMainPortDefault,
^~~~~~~~~~~~~~~~~~
kIOMainPortDefault
|
168 | kr = IOServiceGetMatchingServices(kIOMainPortDefault,
| ^
/Users/mcs/git/github/jokesper/kmonad/c_src/mac/keyio_mac.hpp:13:32: error:
note: expanded from macro 'kIOMainPortDefault'
#define kIOMainPortDefault kIOMasterPortDefault
^
|
13 | #define kIOMainPortDefault kIOMasterPortDefault
| ^
/Users/mcs/git/github/jokesper/kmonad//Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:133:19: error:
note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
|
133 | const mach_port_t kIOMasterPortDefault
| ^
const mach_port_t kIOMasterPortDefault
^
/Users/mcs/git/github/jokesper/kmonad/In file included from c_src/mac/dext.cpp:3:0: error:
/Users/mcs/git/github/jokesper/kmonad/c_src/mac/keyio_mac.hpp:177:72: error:
warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
IONotificationPortRef notification_port = IONotificationPortCreate(kIOMainPortDefault);
^~~~~~~~~~~~~~~~~~
kIOMainPortDefault
|
177 | IONotificationPortRef notification_port = IONotificationPortCreate(kIOMainPortDefault);
| ^
/Users/mcs/git/github/jokesper/kmonad/c_src/mac/keyio_mac.hpp:13:32: error:
note: expanded from macro 'kIOMainPortDefault'
#define kIOMainPortDefault kIOMasterPortDefault
^
|
13 | #define kIOMainPortDefault kIOMasterPortDefault
| ^
/Users/mcs/git/github/jokesper/kmonad//Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:133:19: error:
note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
|
133 | const mach_port_t kIOMasterPortDefault
| ^
const mach_port_t kIOMasterPortDefault
^
2 warnings generated.
Preprocessing executable 'kmonad' for kmonad-0.4.3..
Building executable 'kmonad' for kmonad-0.4.3..
[1 of 1] Compiling Main
[2 of 2] Linking .stack-work/dist/aarch64-osx/ghc-9.6.6/build/kmonad/kmonad
kmonad > copy/register
Installing library in /Users/mcs/git/github/jokesper/kmonad/.stack-work/install/aarch64-osx/71532902493321573c5aa4b4a9765e2bc259d3976d16f32bac7ae5c56ab61f51/9.6.6/lib/aarch64-osx-ghc-9.6.6/kmonad-0.4.3-A3EvYAihvh86b3TLnQfncK
Installing executable kmonad in /Users/mcs/git/github/jokesper/kmonad/.stack-work/install/aarch64-osx/71532902493321573c5aa4b4a9765e2bc259d3976d16f32bac7ae5c56ab61f51/9.6.6/bin
Registering library for kmonad-0.4.3..
Completed 56 action(s).
Copying from /Users/mcs/git/github/jokesper/kmonad/.stack-work/install/aarch64-osx/71532902493321573c5aa4b4a9765e2bc259d3976d16f32bac7ae5c56ab61f51/9.6.6/bin/kmonad to /Users/mcs/.local/bin/kmonad.
Copied executables to /Users/mcs/.local/bin/:
* kmonad |
Hmmm this is wierd... |
This fixes kmonad#885. It contained two problems: 1. `MAC_OS_X_VERSION_12_0` is not set (why? It was before, was it?). 2. The last `stack install` in the build instructions detects, that the flag `kmonad:dext` / `kmonad:kext` is not set and would recompile without it.
bbf9185
to
53d5460
Compare
Ahhh, the kext github CI also had an error. I don't get the same warning as you did in the CI pipeline for dext. |
Right? We're in the same boat. I have no idea either |
Are you sure you are using my branch? As I said before the CI pipeline didn't show any errors |
@jokesper I'm sorry - I just recheck it and I was on Sorry for the confusion!
|
This fixes #885.
It contained two problems:
MAC_OS_X_VERSION_12_0
is not set (why? It was before).stack install
in the build instructions detects, that the flagkmonad:dext
/kmonad:kext
is not set and would recompile without it.I could not test this PR since I don't have access to a mac.
(Therefore marked as Draft)(sorry Github but I am testing this via the CI)