1

In my M1 macbook, when I use terminal to install anything, I am getting lots of errors because the binaries are being installed for x86 architecture when I need arm64. For example, when I write the makecommand in terminal I get:

make
Makefile:24: Your arch is announced as x86_64, but it seems to actually be ARM64. Not fixing that can lead to bad performance. For more info see: https://github.com/ggerganov/whisper.cpp/issues/66#issuecomment-1282546789
sysctl: unknown oid 'machdep.cpu.leaf7_features'
I llama.cpp build info:
I UNAME_S:  Darwin
I UNAME_P:  i386
I UNAME_M:  x86_64
I CFLAGS:   -I.              -O3 -DNDEBUG -std=c11   -fPIC -pthread -mf16c -DGGML_USE_ACCELERATE
I CXXFLAGS: -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -pthread
I LDFLAGS:   -framework Accelerate
I CC:       Apple clang version 12.0.5 (clang-1205.0.22.9)
I CXX:      Apple clang version 12.0.5 (clang-1205.0.22.9)

What can I do to fix this?

PS: Some additions from the comments:

$ type brew
brew is /usr/local/bin/brew 
$ echo $PATH
/Users/user/anaconda3/bin:/Users/user/opt/miniconda3/bin:/Users/user/opt/miniconda3/condabin:/Users/user/gsutil/google-cloud-sdk/bin:/opt/local/bin:/opt/local/sbin:/bin:/usr/local/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/usr/local/go/bin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
1
  • I found an easier way to cleanup /usr/local, see answer below.
    – nohillside
    Apr 15, 2023 at 12:57

1 Answer 1

2

It seems that you have Homebrew installed in /opt/homebrew (where it should be, for ARM) but your PATH still points to /usr/local/bin and picks up the x86 versions.

To fix:

  • in your shell profile, change PATH to have /opt/homebrew/bin near the beginning, and restart Terminal
  • cd /tmp; curl -O https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh
  • bash ./uninstall -p /usr/local to remove the Intel version

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .