brunophilipe / Cakebrew

Manage your Homebrew formulas with style using Cakebrew.
http://www.cakebrew.com
GNU General Public License v3.0
4.8k stars 253 forks source link

Missing support for Apple Silicon / M1 #227

Closed itnok closed 3 years ago

itnok commented 3 years ago

It looks like the binary available for download is not Universal (it's Intel only) hence on M1-equipped Macs Cakebrew runs via Rosetta2. Cakebrew reads and interprets correctly the packages installed for Apple Silicon, but when it's time to update a formula it fails because it's trying to target a Homebrew Intel installation _(arch x86_64 rather than arm64)_.

Thanks! 🙏

brunophilipe commented 3 years ago

👍 I will try including this in the upcoming Big Sur update

brunophilipe commented 3 years ago

Hello, version 1.3 is out now and it is a universal app. Please open a new issue if you experience problems with the AS version. For now I will close this issue. Thank you!

asip commented 3 years ago

When Rosetta2 is not used, Homebrew is installed in /opt/homebrew on M1-equipped Macs. https://brew.sh/2021/02/05/homebrew-3.0.0/

Does Cakebrew 1.3 is took this into account?

Cakebrew 2021-03-14 00-18-32
itnok commented 3 years ago

@asip In my personal experience, with the latest release of Cakebrew on my MacBook Air (M1, 2020) running macOS Big Sur 11.2.3 and brew 3.0.5 only (I do NOT have a double installation like many for both Apple Silicon AND Intel support but just one installation in /opt/homebrew for Apple Silicon only) everything works as expected and the /opt/homebrew installation directory is handled seamlessly without any problem of sort.

brunophilipe commented 3 years ago

@asip Cakebrew relies entirely on command line calls to interact with homebrew. Please make sure your login shell is properly configured. You can try running /bin/zsh -l -c "which brew" (replace /bin/zsh with the shell you use, if different). If you installed brew using the arch command (arch -x86_64) to force Homebrew to be installed in Rosetta, or if you have the "Open using Rosetta" option checked for your Terminal app, you will need to enable this option for Cakebrew too.

asip commented 3 years ago

@brunophilipe

Homebrew is running fine on the terminal.

% /bin/zsh -l -c "which brew" /opt/homebrew/bin/brew

% brew up
Updated 1 tap (homebrew/core). No changes to formulae.

% brew --version Homebrew 3.0.5 Homebrew/homebrew-core (git revision 77a0f2c34f; last commit 2021-03-13) Homebrew/homebrew-cask (git revision 6d35b1d1c5; last commit 2021-03-13)

% brew doctor Your system is ready to brew.

Cakebrew 2021-03-14 08-11-56
brunophilipe commented 3 years ago

@asip How did you install brew? Which terminal app do you use?

asip commented 3 years ago

@brunophilipe

I added the following sentence to ~/.zprofile, and Cakebrew now works correctly. If the following sentence is not in ~/.zprofile, Cakebrew does not seem to be able to find the brew command. Cakebrew does not work correctly if the following sentence is present in ~/.zshrc.

eval "$(/opt/homebrew/bin/brew shellenv)"

Cakebrew 2021-03-15 04-52-36 Cakebrew 2021-03-15 04-53-11