Octave on Mac Homebrew error with mkoctfile
When I compile from source on my Macbook Air (M1), I run into several issues with Octave. For instance, if I run walsh.mod
, mkoctfile
calls clang instead of gcc
. This is most likely a Homebrew-specific problem.
Computing static model derivatives (order 1).
Computing dynamic model derivatives (order 1).
Processing outputs ...
Compiling static MEX...
"/usr/local/Cellar/octave/6.2.0_3/bin/mkoctfile" -O3 -g0 --param ira-max-conflict-table-size=1 -fno-forward-propagate -fno-gcse -fno-dce -fno-dse -fno-tree-fre -fno-tree-pre -fno-tree-cselim -fno-tree-dse -fno-tree-dce -fno-tree-pta -fno-gcse-after-reload --mex "walsh/model/src/static.c" -o "+walsh/static.mex"
clang: error: unknown argument: '-fno-forward-propagate'
clang: error: unknown argument: '-fno-dce'
clang: error: unknown argument: '-fno-dse'
clang: error: unknown argument: '-fno-tree-fre'
clang: error: unknown argument: '-fno-tree-pre'
clang: error: unknown argument: '-fno-tree-cselim'
clang: error: unknown argument '-fno-tree-dse'; did you mean '-fno-tree-dce'?
clang: error: unknown argument: '-fno-tree-pta'
clang: warning: optimization flag '-fno-gcse' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-fno-tree-dce' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-fno-gcse-after-reload' is not supported [-Wignored-optimization-argument]
Compilation failed
error: Dynare: preprocessing failed
error: called from
dynare at line 269 column 5