Error with "brew install openblas" in macOS

879 views
Skip to first unread message

Sim

unread,
Aug 12, 2021, 11:45:07 AM8/12/21
to OpenBLAS-users
I am trying to install openblas on a macOS HighSierra 10.13.6 with the following command

brew install openblas

Unfortunately, I get this error...

brew install openblas
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 1 cask.

Warning: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
old version.

Already downloaded: /Users/JohnRambo/Library/Caches/Homebrew/downloads/54106543af17b56e0603879978f1cc3f09459952d7a716fa5168ae43bef77a4e--OpenBLAS-0.3.17.tar.gz
==> make CC=gcc-11 FC=gfortran libs netlib shared
Last 15 lines from /Users/JohnRambo/Library/Logs/Homebrew/openblas/01.make:
                             ^
<stdin>:618:27: error: unexpected token in argument list
        vfmadd231ps     (%r12,%rsi,4){1to16}, %zmm2, %zmm1
                                     ^
<stdin>:623:23: error: unexpected token in argument list
        vmovups (%rcx), %zmm2{%k1}{z}
                             ^
<stdin>:624:2: error: instruction requires: AVX-512 ISA
        vfmadd132ps     %zmm0, %zmm2, %zmm1
        ^
<stdin>:625:23: error: unexpected token in argument list
        vmovups %zmm1, (%rcx){%k1}
                             ^
make[1]: *** [sgemv_n_SKYLAKEX.o] Error 1
make: *** [libs] Error 1

Do not report this issue to Homebrew/brew or Homebrew/core!


Error: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
old version.

What can I do to fix this error?

martin-frbg

unread,
Aug 27, 2021, 4:38:58 AM8/27/21
to OpenBLAS-users
Looks like the assembler available in your OSX installation does not understand AVX512 instructions, or your cpu was not autodetected correctly. Try building with either NO_AVX512=1 or TARGET=HASWELL. (Strange message as it does appear to realize that it needs AVX512, and the build system should automatically add -march=skylake-avx512 to the compile flags if it detected
an AVX512-capable cpu)

Sim

unread,
Aug 27, 2021, 5:03:00 AM8/27/21
to OpenBLAS-users
Thanks a lot for your message! Btw, I updated macOS to Big Sur, Version 11.5.2 and I was able to install OpenBLAS.. All the best

Benny Istanto

unread,
Aug 27, 2021, 5:52:50 AM8/27/21
to OpenBLAS-users
Hi, I am also experiencing same problem and same error, can't install openblas via homebrew on my macOS 10.13.6. The problem I couldn't upgrade to latest macOS version as my MBP is 2011 version and the latest is 10.13.6 High Sierra.

Dear martin-frbg, may I know how to do your procedure? As I am not familiar with that.

martin-frbg

unread,
Aug 27, 2021, 7:29:52 AM8/27/21
to OpenBLAS-users
I am not really familiar with homebrew - maybe it works if you add the extra arguments to the environment of the "brew" command, that is call "NO_AVX512=1 brew install openblas" instead of just "brew install openblas".
(If that does not work, you would probably have to find the homebrew "formula" (command file) openblas.rb on your system and edit it to add that option to the line "make CC=gcc FC=gfortran libs netlib shared" somewhere in that file.)

Sim

unread,
Aug 27, 2021, 8:12:57 AM8/27/21
to OpenBLAS-users
Dear Benny, at least, are you able to update to macOS 10.14 (Mojave) or macOS 10.15 (Catalina)? I guess it can solve the issue with openBLAS

Benny Istanto

unread,
Aug 27, 2021, 7:58:37 PM8/27/21
to OpenBLAS-users
Dear martin-frbg,
Thank you for the suggestion, it's worked. I edited file /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/openblas.rb and added "NO_AVX512=1" in line 43 to 

system "make", "CC=#{ENV.cc}", "FC=gfortran", "libs", "netlib", "shared", "NO_AVX512=1"

Then reinstalling openblas.

Dear Sim, unfortunately my Mac is 2011 version, and the latest OS supported is 10.13.6. I know its possible to upgrade to Mojave using patch, but I don't prefer to use it.

Reply all
Reply to author
Forward
0 new messages