Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RedTheReader

macrumors 6502a
Original poster
Nov 18, 2019
532
1,312
Hey guys,

I recently moved to an ARM machine using Migration Assistant, bringing over everything but applications. It's only afterwards that I remembered that I had Homebrew installed on the system, and some of the applications on the machine were installed through it. Now, Homebrew still works, and I was able to use it "uninstall" those applications that weren't actually on the machine. My terminal utilities installed through it (that don't live in the applications folder) worked fine too.

My questions for you guys are, can I just continue using my migrated Intel Homebrew to install ARM packages? Is there some benefit to purging the install and using the AS version? If I want to install Intel packages (for use through Rosetta), can I do that through the AS version, or would I need the Intel version for that?

Thanks!
 

Gnattu

macrumors 65816
Sep 18, 2020
1,107
1,671
can I just continue using my migrated Intel Homebrew to install ARM packages? Is there some benefit to purging the install and using the AS version?
No you cannot. The two versions actually co-exists. You have to use arm version of homebrew to install arm packages and x86 version to install x86 packages.
 

ksj1

macrumors 6502
Jul 17, 2018
294
535
Check and see if you are using a universal build before you do anything. I also moved from an Intel Mac using the assistant and thought I blew it. Turns out I had the universal build already.
 

RedTheReader

macrumors 6502a
Original poster
Nov 18, 2019
532
1,312
No you cannot. The two versions actually co-exists. You have to use arm version of homebrew to install arm packages and x86 version to install x86 packages.
Really? Suppose I went and installed the ARM Homebrew… how would I use them separately? The commands for both are the same, aren't they?
 

Gnattu

macrumors 65816
Sep 18, 2020
1,107
1,671
Really? Suppose I went and installed the ARM Homebrew… how would I use them separately? The commands for both are the same, aren't they?
They are installed to different location. The x86 one is located in /usr/local/bin/brew and the arm one is in /opt/homebrew/bin/brew. You use arch -x86_64 /usr/local/bin/brew to invoke the x86 one because the arm one is used by default. You can create an alias for that command to ease your life.
 
  • Like
Reactions: asdex

RedTheReader

macrumors 6502a
Original poster
Nov 18, 2019
532
1,312
They are installed to different location. The x86 one is located in /usr/local/bin/brew and the arm one is in /opt/homebrew/bin/brew. You use arch -x86_64 /usr/local/bin/brew to invoke the x86 one because the arm one is used by default. You can create an alias for that command to ease your life.
As of right now, the x86 version I migrated seems to be doing a great job of installing universal binaries. My understanding is that I should install the ARM version and it'll take over from here onwards. Is that right? Is that all there is to it?
 

Gnattu

macrumors 65816
Sep 18, 2020
1,107
1,671
As of right now, the x86 version I migrated seems to be doing a great job of installing universal binaries. My understanding is that I should install the ARM version and it'll take over from here onwards. Is that right? Is that all there is to it?
Are they really universal though? I don’t think homebrew provides universal bottles, and you may be running through Rosetta.
 

RedTheReader

macrumors 6502a
Original poster
Nov 18, 2019
532
1,312
Are they really universal though? I don’t think homebrew provides universal bottles, and you may be running through Rosetta.
I installed the most generic application I could think of, Google Chrome, and Homebrew said it was downloading it from https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechr. It's got universal in the source, so I assumed it was universal.
EDIT: I checked the installed Chrome's kind; it is indeed universal.
 

ksj1

macrumors 6502
Jul 17, 2018
294
535
Highlight in finder and hit cmd-i

Edit - This opens the getInfo dialog about the app, which includes the processor arch
 
Last edited:

RedTheReader

macrumors 6502a
Original poster
Nov 18, 2019
532
1,312
Highlight in finder and hit cmd-i

Edit - This opens the getInfo dialog about the app, which includes the processor arch
Yup, it's universal. Have you just been using your migrated/x86 Homebrew install? How's it worked out for you? Are all your applications universal, or maybe running through rosetta?

At this point all I'm trying to figure out is whether installing the ARM Homebrew will actually take over for my current install, or whether I need to totally wipe my current one before installing the ARM variant.
 

ksj1

macrumors 6502
Jul 17, 2018
294
535
I actually ended up uninstalling the universal and reinstalling the AS only version. Mainly because almost everything I use now has an AS build available. It's just a smaller package at that point.

Edit - Oh, and just seems faster, but I bet that's just me wanting it to be, lol
 

Gnattu

macrumors 65816
Sep 18, 2020
1,107
1,671
I installed the most generic application I could think of, Google Chrome, and Homebrew said it was downloading it from https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechr. It's got universal in the source, so I assumed it was universal.
EDIT: I checked the installed Chrome's kind; it is indeed universal.
Chrome is a cask, not bottle. You NEED arm version to install arm bottles. You can try something like git and use file command to check its arch.
 

leman

macrumors Core
Oct 14, 2008
19,521
19,678
I installed the most generic application I could think of, Google Chrome, and Homebrew said it was downloading it from https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechr. It's got universal in the source, so I assumed it was universal.
EDIT: I checked the installed Chrome's kind; it is indeed universal.

Homebrew is most often used to install command line tools and libraries. Those are not universal. If you are using Homebrew extensions (casks) to install pre-packaged software, you might indeed get universal binaries for certain programs.

At any rate, I would recommend you to purge your homebrew installation and install the ARM version from scratch. Using migration assistant for these things is more likely to leave you with unmaintable misconfigured mess at some point.
 
  • Like
Reactions: jdb8167

mr_roboto

macrumors 6502a
Sep 30, 2020
856
1,866
Homebrew is most often used to install command line tools and libraries. Those are not universal.
Fyi, that's not universally (;)) true. Any Mach-O binary can be a Universal binary, including command line tools and libraries.

Now, I wouldn't be surprised if Homebrew defaults to building and installing binaries specific to your computer's architecture. But I wouldn't be surprised if there's also a way to make it build things Universal. I know MacPorts (which is what I use) has that option.
 

Gnattu

macrumors 65816
Sep 18, 2020
1,107
1,671
But I wouldn't be surprised if there's also a way to make it build things Universal.
This will be a disaster to manage the libraries. You will need to install libraries for both architecture, and one of it is unlikely to be used.
 

RedTheReader

macrumors 6502a
Original poster
Nov 18, 2019
532
1,312
Homebrew is most often used to install command line tools and libraries. Those are not universal.
Neofetch (and by extension, it's dependencies) worked fine when I tested them. ¯\_(ツ)_/¯

In any case, I've taken the advice here and am working on purging all the files associated with the old install since I don't need it for anything. Thank you all.
 

leman

macrumors Core
Oct 14, 2008
19,521
19,678
Fyi, that's not universally (;)) true. Any Mach-O binary can be a Universal binary, including command line tools and libraries.

Now, I wouldn't be surprised if Homebrew defaults to building and installing binaries specific to your computer's architecture. But I wouldn't be surprised if there's also a way to make it build things Universal. I know MacPorts (which is what I use) has that option.

Oh, you are certainly right. The problem is simply that brew uses the builds scripts etc. of the projects directly, and those very rarely are set up to build universal binaries on macOS. So homebrew maintainers have (justifiably) decided that trying to provide universal builds scripts for each formula is outside the scope of the project.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.