-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Apple M1 native build #960
Comments
+1000 this |
+2000 on this. |
more than being "nice to have", barrier 2.3.3 release will not start on my m1 macbook air. does it work at all for others? |
... sorry for the distraction: this was a configuration + gatekeeper problem. i've got it running now on my m1 laptop. |
I believe Homebrew/brew#7857 (comment) may resolve the |
I just tried building from source on an M1 but it fails after some time. ld: symbol(s) not found for architecture x86_64 |
I have been using barrier mostly fine between windows (server) and mini m1 (client), but the CPU usage spikes sometimes up to 25% and I get severe lag if the CPU is otherwise stressed. |
I just built 2.3.3 on my M1 mac. You need to fix the OPENSSL_ROOT definition in CMakeLists.txt. Here's a diff that removes the hard-coded path for homebrew:
Also, I modified clean_build.sh to target 11.1 instead of 10.9. Not sure if it matters; I had just changed that prior to discovering the root cause of the OPENSSL issue, and never bothered changing it back, since I'm just building for my personal M1 MacBook, which obviously does not run MacOS 10.9.
|
I was able to build barrier on my M1 MacBook without making the clean_build.sh changes. It does throw a few warnings related to mismatching build targets between 11.1 and releases in the 10.X series, but it builds and seems to run just fine. |
I was unable to make an M1 native build that launched. I was able to get it to compile, but then got the following error when attempting to launch it (by double clicking on the built
I needed to make @caparomula's suggested changes to Install both
Tell CMake about the location of
Issue both of @caparomula's suggested patches. Then build!
Any thoughts on how to fix this? |
You need to sign the binary. I'm pretty new to development on Apple devices, and it took me a while to figure it out. Unfortunately, I don't recall the actual steps I took to sign my binary. But basically you need to get a certificate from Apple (I think I did this via xcode using my free developer account), then use the 'codesign' command line tool to sign the binary. Be sure to do a 'deep' signing so it gets all of the contents. I wish I could give you more specific details, but it's one of those things I just sort of figured out and then promptly forgot. But you should be able to figure it out with a little googling and experimentation. Or maybe someone with a bit more savvy can chime in. |
@zachlatta I'm trying to build it too... gets me to the same error... PD: your building for DEBUG, for release, you really gonna need Signing as @caparomula is saying. Maybe someone more savvy can help us (im not a PC/Mac programmer so y really don't know). I'm using this wiki: Same |
Hi all, ➜ bundle git:(master) ✗ codesign --force --deep --sign - /Applications/Barrier.app
/Applications/Barrier.app: replacing existing signature
➜ bundle git:(master) ✗ Then you can launch /Applications/Barrier.app and everything should work. |
YES! It work flawless!!! |
Unable to build.
|
I just got it to work with the modifications suggested above. In
In
Then once it's built:
Should be all you have to do to get it working. If you enable 20 threads on the |
I run it,but terminal tell me "Please install xcode" ,if i want to build it ,i have to install more than 60gb xocde? |
Obviously, you need Xcode for all macOS development. |
I am trying to compile it on M1 mac using the instruction above but I am getting the following error: |
The build is working now after some modification to the path of SDK in
It worked when I build with release which gave the file |
Would it be possible for those who was able to compile it for apple silicon, to share the dmg version. |
Added a version/SDK test to this and just opened a pull request for the changes -- works perfectly here on my M1 MacBook Air as an Apple Silicon app in macOS Monterey 12.2.1. Published a pre-release off my fork that someone can test: |
thank you Jason. it works perfectly and can confirm that it uses apple silicon on my Macbook Pro with M1 chip in Monterey 12.1. |
@thejasonfisher thank you! |
Please add support as soon as possible. It is showing system call error when I try to use my Macbook air with M1 chip as a server on client's side. |
This works perfectly, Thanks Jason |
This works on my Mac M1 Mini running 12.3 Thanks Jason, you are a legend |
Confirming Jason is a legend. Feels smoother too, less laggy. @thejasonfisher |
I can confirm it also works on a M1 Max Here is the exact command sequence: Then copy the build/bin/barrier.app to /Applications: You might need to go to developer.apple.com and get your developer certificate if you haven't compiled an apple app before. |
^^ This seemed to work for me, except I also had to Then I did:
And seems good! |
This worked for me combining all above.
|
how to do if no 'TYPE_YOUR_DEVELOPER_SIG_HERE' |
can someone please, compile it, and upload it to a google drive or whatever? :D |
#1395. |
I've successfully built both barrier, and now InputLeap (the supported fork) on M1 Mac w/o too much trouble. If you have all the bits and pieces needed to build installed with HomeBrew, I think all I had to do was to change the Deployment Target to 13.1 in the "clean_build.sh" file. Edited to add: I don't really know what I'm doing, but if you want to join the fun, here's my most recent build: https://1drv.ms/f/s!AioKbdTrI-m1gZxLsCeYXmHIo0wkdQ?e=aLBq78 Download the .app file, and install it in Applications. Please have a backup and don't yell at me if it turns your dog into a sloth Edit 2: I tried creating a 'Release Build' - DMG file here -> https://1drv.ms/u/s!AioKbdTrI-m1gZ0VfUFNH-fIR2xDog?e=vAimV3 -J |
@joshin42 the 'Release Build' crashs for me because the signature is invalid. Didn't tested the debug build tho. Edit: I just codesign it with my self signed dev certificate. Works fine now. |
Tanks for its. Works for me. |
Would be nice to have a native M1 build please. Is it as simple as recompiling on an M1 machine?
Thanks.
The text was updated successfully, but these errors were encountered: