Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Add support for arm64 for macos #78

Open
nickmeinhold opened this issue Nov 29, 2022 · 1 comment
Open

Add support for arm64 for macos #78

nickmeinhold opened this issue Nov 29, 2022 · 1 comment

Comments

@nickmeinhold
Copy link

Thanks for making this plugin!

I'm on an ARM mac and had build errors about needing an arm64 binary when I tried to use the plugin.

I checked and running file macos/libgit2-1.5.0.dylib gives:

macos/libgit2-1.5.0.dylib: Mach-O 64-bit dynamically linked shared library x86_64

I built a universal binary with libgit2 and replaced the libgit2dart/macos/libgit2-1.5.0.dylib but then the build wasn’t finding the dylib until I put a (slightly differently named) dylib in a folder the app was checking in but then was still getting a different error that said:

“Failed to open the library. Make sure that libgit2 library is bundled with the application.”

I did get a dylib that I built to work by putting it straight in an empty project (ie. no plugin) so I guess I must have messed up the libgit2dart project config somehow. I've given up for now but happy to have another go if it's helpful.

Thanks!

@SkinnyMind
Copy link
Owner

Hey! Support for arm64 macos would definitely be great to have.

I have a private repo setup for building libgit2 libraries, however github runners currently don't have support for apple m1/m2. I was thinking about making fat binary of libgit2 for macos, but it turned out to be quite challenging (at least as far as i remember it :). Github macos runner is x86_64, which leads to brew installation of libgit2 required packages (openssl and libssh2) to be x86_64, and frankly speaking i wasn't too happy about compiling those packages as fat binaries myself before compiling libgit2, so i just decided to wait until github will add m1/m2 runners.

As for the problem with the build you had, i'm not sure why that happened. Simply replacing library in libgit2dart/macos/ should be enough.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants