I've been following this guide to install on my El Capitan macbook pro, using CMake to build the makefile. However, when I attempt to make, I run into the error of missing the cblas.h file. I successfully reinstalled openblas with:
$ brew uninstall openblas; brew install --fresh -vd openblas
and adding the two build flags:
LDFLAGS: -L/usr/local/opt/openblas/lib
CPPFLAGS: -I/usr/local/opt/openblas/include
However I still get the error. Then I reinstalled CUDA and xcode-select install tools as recommended here.
Any recommendations/further speculation about why make doesn't see my cblas.h file is appreciated!
In your question I see cmake
, but in provided link Makefile.config
.
If you're still want to proceed with cmake:
first of all, build script is NOT broken - I tried it on Yosemite with the latest master branch (2016-02-25), but you should slightly adjust it if you already made
brew uninstall openblas; brew install --fresh -vd openblas
Just run your cmake with additional arguments:
cmake -DCMAKE_CXX_FLAGS=-I/usr/local/opt/openblas/include <path to your sources>
and then usual make or xcode build (depends on what generator you use).
After this it was successfully built on my system.
UPD: you can also use libraries in Accelerate.framework
(vecLib
) instead of openblas.
Go to the Makefile.config
and edit the following lines with the path where your openblas is located, in my case the version is 0.2.18_2
Be sure to uncomment these lines:
BLAS_INCLUDE := /usr/local/Cellar/openblas/0.2.18_2/include
BLAS_LIB := /usr/local/Cellar/openblas/0.2.18_2/lib
Uncomment this lines in Makefile.config:
# Homebrew puts openblas in a directory that is not on the standard search path
BLAS_INCLUDE := $(shell brew --prefix openblas)/include
BLAS_LIB := $(shell brew --prefix openblas)/lib
I ran into this issue myself today and submitted a pull request to mainline Caffe:
https://github.com/BVLC/caffe/pull/4247
For me, the issue was that Caffe was finding the deprecated vecLib framework (which doesn't ship cblas.h) instead of the new Accelerate framework (which does ship cblas.h).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With