brew gist-logs <formula> link OR brew config AND brew doctor output
HOMEBREW_VERSION: >=4.3.0 (shallow or no git repository)
ORIGIN: (none)
HEAD: (none)
Last commit: never
Branch: (none)
Core tap JSON: 01 Nov 13:19 UTC
Core cask tap JSON: 01 Feb 22:25 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.7 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.7/bin/ruby
CPU: deca-core 64-bit arm_firestorm_icestorm
Clang: 16.0.0 build 1600
Git: 2.39.5 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.3.1-arm64
CLT: 16.2.0.0.1.1733547573
Xcode: 16.1
Rosetta 2: false
(I'm not root on the machine, so I can't meaningfully run brew doctor)
I asked a root for the output of brew gist-logs openblas, still waiting.
EDIT: the root replied with
% brew gist-logs openblas
> Error: No logs.
Verification
What were you trying to do (and why)?
I am trying to use Homebrew's openblas with XCode C compiler, Apple's clang:
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: arm64-apple-darwin24.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Openblas is located in /opt/homebrew/Cellar/openblas/0.3.29/ and its openblas.pc produces the following CFLAGS:
% PKG_CONFIG_PATH="/opt/homebrew/Cellar/openblas/0.3.29/lib/pkgconfig" pkg-config -cflags openblas
-I/opt/homebrew/Cellar/openblas/0.3.29/include -fopenmp
Such flags are not accepted by Apple's clang.
Specifically, on gets:
% clang -c foobar.c -fopenmp
clang: error: unsupported option '-fopenmp'
The correct format for the OpenMP option is -Xclang -fopenmp,
as can be checked directly, or read on the R Project website: https://mac.r-project.org/openmp/
Thus, openblas.pc has to be fixed, but it's probably only opening a can of worms, as I have no idea whether
libgomp, against which libopenblas is linked, is not compatible with Apple clang's support of OpenMP.
What happened (include all command output)?
% export PKG_CONFIG_PATH="/opt/homebrew/Cellar/openblas/0.3.29/lib/pkgconfig"
% clang -c foobar.c `pkg-config -cflags openblas`
clang: error: unsupported option '-fopenmp'
What did you expect to happen?
It should work.
Step-by-step reproduction instructions (by running brew commands)
let `foobar.c` contain valid C code.
brew install openblas
export PKG_CONFIG_PATH=<path to libopenblas.dylib location>/pkgconfig
clang -c foobar.c `pkg-config -cflags openblas`
One needs a recent XCode on arm64 (I tested on M1, other people tell me that on M4 it's the same).
brew gist-logs <formula>link ORbrew configANDbrew doctoroutput(I'm not root on the machine, so I can't meaningfully run
brew doctor)I asked a root for the output of
brew gist-logs openblas, still waiting.EDIT: the root replied with
Verification
brew doctoroutput saysYour system is ready to brew.and am still able to reproduce my issue.brew updateand am still able to reproduce my issue.brew doctorand that did not fix my problem.What were you trying to do (and why)?
I am trying to use Homebrew's openblas with XCode C compiler, Apple's clang:
Openblas is located in
/opt/homebrew/Cellar/openblas/0.3.29/and itsopenblas.pcproduces the following CFLAGS:Such flags are not accepted by Apple's clang.
Specifically, on gets:
The correct format for the OpenMP option is
-Xclang -fopenmp,as can be checked directly, or read on the R Project website: https://mac.r-project.org/openmp/
Thus,
openblas.pchas to be fixed, but it'sprobablyonly opening a can of worms, asI have no idea whetherlibgomp, against whichlibopenblasis linked, is not compatible with Apple clang's support of OpenMP.What happened (include all command output)?
What did you expect to happen?
It should work.
Step-by-step reproduction instructions (by running
brewcommands)