Skip to content
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

Support Apple M1 ARM by releasing Universal Binaries #7338

Open
robd003 opened this issue Dec 10, 2021 · 18 comments
Open

Support Apple M1 ARM by releasing Universal Binaries #7338

robd003 opened this issue Dec 10, 2021 · 18 comments
Labels
consider soon Discuss this issue at the next planning meeting, then remove this label sdk dependent Requires work on lbry-sdk repo type: new feature New functionality that does not exist yet

Comments

@robd003
Copy link

robd003 commented Dec 10, 2021

Could you please release universal binaries for macOS so that it's optimized for M1 users? Apple is transitioning to ARM-only over the next year and there will only be legacy devices running on x86_64.

It looks like doing this should be pretty simple with this: https://github.com/electron/universal

Another idea would be to build a darwin-x64 release and a darwin-arm64 release and let the user choose which might help save on disk space.

@robd003 robd003 added the type: new feature New functionality that does not exist yet label Dec 10, 2021
@robd003
Copy link
Author

robd003 commented Dec 10, 2021

Here's a quick fix to get lbrynet working as a universal binary: lbryio/lbry-sdk#3515

@robd003
Copy link
Author

robd003 commented Dec 10, 2021

@jessopb I'd be happy to help debug on M1 & x64 macOS systems if you need anyone to test.

@jessopb
Copy link
Member

jessopb commented Dec 10, 2021

It seems like electron-builder docs don't reference this yet?
electron-userland/electron-builder#5392
electron-userland/electron-builder#5392 (comment) process seems to be here.
Will look into it more. May have to move some build scripts around.

@jessopb jessopb added consider soon Discuss this issue at the next planning meeting, then remove this label sdk dependent Requires work on lbry-sdk repo labels Dec 10, 2021
@robd003
Copy link
Author

robd003 commented Dec 11, 2021

Looks like it's working using electron-builder >= 22.14.2

Check out this ticket: electron-userland/electron-builder#5689 (comment)

@darrenmhill
Copy link

darrenmhill commented Jul 13, 2022

Any updates on this please? M1 Macs have been out for a long time now.

@robd003
Copy link
Author

robd003 commented Jul 13, 2022

It's stalled because lbry-sdk needs to upgrade to atleast Python 3.9.1 before M1 support is available

Here's a pull request to look at: lbryio/lbry-sdk#3623

I'd love it if we could go straight to Python 3.10 since it'll still be getting bugfixes whereas I think 3.9 is only getting security fixes now

@darrenmhill
Copy link

darrenmhill commented Jul 19, 2022

It's stalled because lbry-sdk needs to upgrade to atleast Python 3.9.1 before M1 support is available

Ah ok, given that's the dependency, it makes sense. Thanks for the update.

@darrenmhill
Copy link

Any updates on this? I don't see any recent activity on the thread above.

@robd003
Copy link
Author

robd003 commented Nov 1, 2022

@darrenmhill I'd ask @moodyjon how it's going

If you have any idea how to fix these issues that'd be a huge help: https://github.com/lbryio/lbry-sdk/files/9315430/py39_2.ci.failures.txt

@moodyjon
Copy link

moodyjon commented Nov 2, 2022

The original Python 3.9 effort was pretty close to completion. Just waiting on one more lbryio/hub fix and I can submit a third batch of test fixes to lbry-sdk. I fixed a lot of intermittent test failures which were happening even with Python 3.7, including the ones in the py39_2.ci.failures.txt file.

Unfortunately, a new thing popped up with our libtorrent dependency. Now that module is required not optional. And I can't get it on MacOS aarch64.
lbryio/lbry-sdk#3669
arvidn/libtorrent#7131

@darrenmhill
Copy link

Good to hear progress is being made on this! I can't wait for the day my Mac is running only native apps. LBRY is quite sluggish under Rosetta 2, so really looking forward to this.

@robd003
Copy link
Author

robd003 commented Nov 21, 2022

@darrenmhill I'm working on fixing arvidn/libtorrent#7131 so hopefully we can move ahead soon!

@darrenmhill
Copy link

Any more updates on an M1/M2 release please? It would be great to get an optimised version of LBRY up and running soon! What are the current roadblocks/dependencies?

@darrenmhill
Copy link

Bouncing following the latest release.

@moodyjon
Copy link

There is now a build of "wheels" for libtorrent. I was only able to get the libtorrent build to work for python 3.9 and 3.10:
arvidn/libtorrent#7292

but it doesn't get uploaded automatically to pypi

Next steps would be:

  1. Bump to Python 3.9 attempt 3. lbry-sdk#3711 bump lbry-sdk to python 3.9
  2. Convince libtorrent project to a) make a new release and b) upload macOS ARM64 wheels to pypi manually?
  3. bump lbry-sdk to use latest libtorrent
  4. Work out how to change the lbry-sdk workflows (.github/worflows/main.yml) to produce a macOS ARM64 build.

Note that for libtorrent build on MacOS ARM64, I had to use an alternate build/test mechanism called "Cirrus CI" which is quite different than ordinary GitHub actions, but offers MacOS M1 runners. GitHub has been slow in providing public M1 runners (actions/runner-images#2187). So number (4) requires either using Cirrus CI or waiting for GitHub to provide M1 runners.

@robd003
Copy link
Author

robd003 commented Feb 19, 2023

Upvoting this ticket arvidn/libtorrent#7308 might help expedite uploading the wheels to pypi

@darrenmhill
Copy link

Really looking forward to an M1 build release. It's been a few years now since the M1 Mac was released, so a LBRY build is very much welcome!

@darrenmhill
Copy link

Bumping this. Is this project still progressing, since I notice there have been no new releases in ~4 months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consider soon Discuss this issue at the next planning meeting, then remove this label sdk dependent Requires work on lbry-sdk repo type: new feature New functionality that does not exist yet
Projects
None yet
Development

No branches or pull requests

4 participants