Homebrew installation gives `bad CPU` error on M4 mac
Just installed v0.88.1 via Homebrew on an M4 MacBook Pro running macOS 15.2 and got this message:
bad CPU type in executable: replicated
I uninstalled and reinstalled - same error.
I am guessing that there is some issue with the architecture targeting going on since there is a universal binary. Is it possible to have architecture-specific builds within Homebrew?
I am building from source now, which I assume will fix the issue. I will report back.
Building this locally works fine.
Running otool -L on the downloaded cli binary yields the following:
replicated (architecture x86_64):
/usr/lib/libSystem.B.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libresolv.9.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 0.0.0, current version 0.0.0)
So this was clearly not built for the arm64 architecture that is required to run on a non-Intel mac. This lines up with the Homebrew recipe also:
https://github.com/replicatedhq/homebrew-replicated/blob/main/HomebrewFormula/cli.rb#L10-L17
Possibly this just needs to have the architecture added to https://github.com/replicatedhq/replicated/blob/main/.goreleaser.yaml?
Replicated CLI v0.119.0 and forward includes ARM64 builds