streamdal/plumber

Missing ARM release

phumberdroz opened this issue · 4 comments

i just recently got a new macbook and it has the m1 chip. I use plumber a fairbit I am wondering if it is possible to get arm releases out? :)

Further I also seem to be unable to build it myself due to the dependency to batchcorp/natty which is private.

@phumberdroz Sorry about that! Fixed the batchcorp/natty repo to be public.

Added arm builds in #280

You can download the build here: https://github.com/batchcorp/plumber/releases/download/v1.7.0/plumber-darwin-arm64

Please let me know if it is working correctly, I don't have an M1 mac to test the build on

The Brew install does not yet work correctly.

❯ brew install plumber
==> Downloading https://github.com/batchcorp/plumber/releases/download/v1.7.0/plumber-darwin
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/283047400/50d506a2-8832-4859-b007-936caf5721d2?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220516%
######################################################################## 100.0%
==> Installing plumber from batchcorp/public
🍺  /opt/homebrew/Cellar/plumber/1.7.0: 3 files, 52.8MB, built in 1 second
==> Running `brew cleanup plumber`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/phumberdroz/Library/Caches/Homebrew/plumber--1.6.1... (52.8MB)

❯ plumber
zsh: bad CPU type in executable: plumber

Same happens if I download the linked Binary up top.

Was able to confirm on a friends M1. Homebrew isn't downloading the correct binary due to ruby 2.6 reporting x86_64 as the architecture type when run on M1 Macs. It looks like brew uses the default system ruby that comes with OSX. So it might work if you update your local ruby to 3.1.

The downloadable binary is working for me however. Can you try again just to confirm? You might need to right-click open in finder to run it, as we don't have binary signing setup yet

It doesn't look like we'll be able to fix up brew. The underlying issue is that ruby on OSX sees its platform arch as x86_64 instead of arm. This is probably because ruby was installed itself as a universal binary, so to get around this you'd need to install a ruby version that is specifically for arm. At that point, brew would properly identify its platform as arm and would download the right binary.

I think your options are as follows:

  • Manually download the arm release
  • Install rosetta and use the x86_64 version of plumber (https://machow2.com/rosetta-mac/)
  • Install new ruby (from source, instead of brew); as long as brew is using the new ruby, it should properly download the right bin

I'd probably go with option 2 - least work and it'll work fine, even with emulation since plumber is a non-power hungry CLI app.