Skip to content

Apple Silicon support - #15

Closed
jspiro wants to merge 2 commits into
gitx:masterfrom
jspiro:jono/2021-11-26/m1-arm-support
Closed

jspiro wants to merge 2 commits into
gitx:masterfrom
jspiro:jono/2021-11-26/m1-arm-support

Conversation

@jspiro

@jspiro jspiro commented Nov 26, 2021

Copy link
Copy Markdown
Member

This is mostly additive/non-destructive, except the LD flags needs a better solution. Unlike a library search path, we cannot provide two possible locations for a static library to possibly exist.

A symlink could be added to /usr/local/lib, for backwards-compatibility, but that has a few drawbacks:

  • It's an inelegant hack that eventually is not needed
  • It prioritizes Intel over a native solution on ARM
  • It requires a script to create, and has the added complexity of what to do if there's already a file at that location

@hannesa2

Copy link
Copy Markdown

When I open this repo standalone with Xcode I see this
image

Maybe it's related to gitx/gitx#234 (comment)

@jspiro

jspiro commented Dec 4, 2021

Copy link
Copy Markdown
Member Author

@hannesa2 I won't be able to work on this for some time, as I'm recovering from a surgery for a few weeks. The unsupported swift version was not an issue in my experience, even though I got it as well.

The build script create symlinks in /usr/local if your brew installation is not found at that location. That's pretty hacky, which is why I'm not sure what the best approach is for supporting both arm and x86 on the same build system. So to fix your ability to build, you could try reverting the path changes in my PR and running the build script to generate the links.

I suppose it's not too bad, but perhaps we should instead move all symlinks to a common location, /opt/gitx/, for instance, and redirect all future builds/installations to that. I'm not sure if that will cause any problems with loading libraries at runtime, Will need somebody to check it on a nonbuild system.

@tcurdt

tcurdt commented Dec 4, 2021

Copy link
Copy Markdown

I suppose it's not too bad, but perhaps we should instead move all symlinks to a common location, /opt/gitx/, for instance, and redirect all future builds/installations to that. I'm not sure if that will cause any problems with loading libraries at runtime, Will need somebody to check it on a nonbuild system.

Not sure I read this correctly: objective-git is meant to be a framework with runtime deps to /opt?
That would be - not so great.

@hannesa2

hannesa2 commented Feb 9, 2022

Copy link
Copy Markdown

This pull request becomes more and more obsolete. There is now a solution which builds on x86 and arm64 #25

@hannesa2 hannesa2 mentioned this pull request Feb 12, 2022
@hannesa2

hannesa2 commented Feb 12, 2022 •

Copy link
Copy Markdown

I rebased this #37 and will continue there to solve the conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants