pasky / pachi

A fairly strong Go/Baduk/Weiqi playing program
http://pachi.or.cz/
GNU General Public License v2.0
505 stars 117 forks source link

Build failed under Mac OSX #119

Closed Jendker closed 5 years ago

Jendker commented 5 years ago

Hello,

Did anyone succeed with building under MacOSX? I have installed Caffe and openblas with brew, executed:

export LDFLAGS="-L/usr/local/opt/openblas/lib"
export CPPFLAGS="-I/usr/local/opt/openblas/include"

in order to allow the compiler to find openblas, but I am still getting the error:

In file included from caffe.cpp:12:
In file included from /usr/local/include/caffe/caffe.hpp:9:
In file included from /usr/local/include/caffe/filler.hpp:13:
In file included from /usr/local/include/caffe/util/math_functions.hpp:11:
/usr/local/include/caffe/util/mkl_alternate.hpp:14:10: fatal error: 'cblas.h'
      file not found
#include <cblas.h>
         ^~~~~~~~~
1 error generated.

Any hints on that?

Jendker commented 5 years ago

I managed to get around this.

Had to modify: CXXFLAGS := -std=c++11 to CXXFLAGS := -std=c++11 -I/usr/local/opt/openblas/include in Makefile

then I had problem with linking and had to remove -lrt from Makefile.linux (for some reason I had to do it on Mac). Now I managed to compile, link and everything is working fine :)