Support Apple M1 ARM by releasing Universal Binaries #7338

Open
opened 2021-12-10 17:53:22 +01:00 by robd003 · 18 comments
robd003 commented 2021-12-10 17:53:22 +01:00 (Migrated from github.com)

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.

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 commented 2021-12-10 18:46:35 +01:00 (Migrated from github.com)

Here's a quick fix to get lbrynet working as a universal binary: https://github.com/lbryio/lbry-sdk/issues/3515

Here's a quick fix to get lbrynet working as a universal binary: https://github.com/lbryio/lbry-sdk/issues/3515
robd003 commented 2021-12-10 18:47:31 +01:00 (Migrated from github.com)

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

@jessopb I'd be happy to help debug on M1 & x64 macOS systems if you need anyone to test.
jessopb commented 2021-12-10 23:32:33 +01:00 (Migrated from github.com)

It seems like electron-builder docs don't reference this yet?
https://github.com/electron-userland/electron-builder/issues/5392
https://github.com/electron-userland/electron-builder/issues/5392#issuecomment-754239349 process seems to be here.
Will look into it more. May have to move some build scripts around.

It seems like electron-builder docs don't reference this yet? https://github.com/electron-userland/electron-builder/issues/5392 https://github.com/electron-userland/electron-builder/issues/5392#issuecomment-754239349 process seems to be here. Will look into it more. May have to move some build scripts around.
robd003 commented 2021-12-11 01:50:09 +01:00 (Migrated from github.com)

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

Check out this ticket: https://github.com/electron-userland/electron-builder/issues/5689#issuecomment-946528612

Looks like it's working using electron-builder >= 22.14.2 Check out this ticket: https://github.com/electron-userland/electron-builder/issues/5689#issuecomment-946528612
darrenmhill commented 2022-07-13 23:03:20 +02:00 (Migrated from github.com)

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

Any updates on this please? M1 Macs have been out for a long time now.
robd003 commented 2022-07-13 23:30:56 +02:00 (Migrated from github.com)

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: https://github.com/lbryio/lbry-sdk/pull/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

It's stalled because lbry-sdk needs to upgrade to atleast Python 3.9.1 before [M1 support is available](https://docs.python.org/3/whatsnew/3.9.html#macos-11-0-big-sur-and-apple-silicon-mac-support) Here's a pull request to look at: https://github.com/lbryio/lbry-sdk/pull/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 commented 2022-07-19 02:58:43 +02:00 (Migrated from github.com)

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.

> It's stalled because lbry-sdk needs to upgrade to atleast Python 3.9.1 before [M1 support is available](https://docs.python.org/3/whatsnew/3.9.html#macos-11-0-big-sur-and-apple-silicon-mac-support) Ah ok, given that's the dependency, it makes sense. Thanks for the update.
darrenmhill commented 2022-10-30 02:43:54 +02:00 (Migrated from github.com)

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

Any updates on this? I don't see any recent activity on the thread above.
robd003 commented 2022-11-01 21:29:34 +01:00 (Migrated from github.com)

@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

@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 commented 2022-11-02 13:32:27 +01:00 (Migrated from github.com)

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.
https://github.com/lbryio/lbry-sdk/issues/3669
https://github.com/arvidn/libtorrent/issues/7131

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. https://github.com/lbryio/lbry-sdk/issues/3669 https://github.com/arvidn/libtorrent/issues/7131
darrenmhill commented 2022-11-21 18:53:52 +01:00 (Migrated from github.com)

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.

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 commented 2022-11-21 18:56:46 +01:00 (Migrated from github.com)

@darrenmhill I'm working on fixing https://github.com/arvidn/libtorrent/issues/7131 so hopefully we can move ahead soon!

@darrenmhill I'm working on fixing https://github.com/arvidn/libtorrent/issues/7131 so hopefully we can move ahead soon!
darrenmhill commented 2023-02-04 00:51:50 +01:00 (Migrated from github.com)

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?

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 commented 2023-02-18 02:12:26 +01:00 (Migrated from github.com)

Bouncing following the latest release.

Bouncing following the latest release.
moodyjon commented 2023-02-18 13:21:09 +01:00 (Migrated from github.com)

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:
https://github.com/arvidn/libtorrent/pull/7292

but it doesn't get uploaded automatically to pypi

Next steps would be:

  1. https://github.com/lbryio/lbry-sdk/pull/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 (https://github.com/actions/runner-images/issues/2187). So number (4) requires either using Cirrus CI or waiting for GitHub to provide M1 runners.

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: https://github.com/arvidn/libtorrent/pull/7292 **but it doesn't get uploaded automatically to pypi** Next steps would be: 1) https://github.com/lbryio/lbry-sdk/pull/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 (https://github.com/actions/runner-images/issues/2187). So number (4) requires either using Cirrus CI or waiting for GitHub to provide M1 runners.
robd003 commented 2023-02-19 14:47:23 +01:00 (Migrated from github.com)

Upvoting this ticket https://github.com/arvidn/libtorrent/issues/7308 might help expedite uploading the wheels to pypi

Upvoting this ticket https://github.com/arvidn/libtorrent/issues/7308 might help expedite uploading the wheels to pypi
darrenmhill commented 2023-04-06 00:44:00 +02:00 (Migrated from github.com)

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!

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 commented 2023-06-17 18:59:22 +02:00 (Migrated from github.com)

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

Bumping this. Is this project still progressing, since I notice there have been no new releases in ~4 months.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#7338
No description provided.