macOS Build fails with binutils before /usr/bin in PATH
Basically the title. I was having a ton of trouble figuring out why I kept getting strange errors about incorrect architectures, but eventually I realized that my PATH was basically set up as follows:
export PATH='/usr/local/bin:/various/other/things:/usr/bin
And for some reason, I had the regular Homebrew binutils
' linked to /usr/local/bin
. This meant that which ar
returned /usr/local/bin/ar
(GNU), but which clang
returned /usr/bin/clang
(Apple). Setting an alias for Apple ar
fixed the issue. It would be a good idea to check that ar
works while configuring the prefix, that would have saved me a lot of time figuring out what went wrong.