#7019·caffe

How to run caffe in the M1 mac? I meet a problem.

Author: shadowwu1Created Sep 21, 2021Updated Aug 13, 2024

I use the homebrew in M1 mac to install the lib such as boost, hdm5. After I change the cmakelist and cmake successed , I try to run make, but I meet problem below:

Undefined symbols for architecture arm64: "boost::python::detail::init_module(char const*, void (*)())", referenced from: _init_caffe in _caffe.cpp.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [lib/_caffe.dylib] Error 1 make[1]: *** [python/CMakeFiles/pycaffe.dir/all] Error 2 make: *** [all] Error 2

when i install boost by homebrew, it look like boost supoort arm64, I try to find some solution or some problom just like I meet, but I thought I was the first one who try to use this simple solution to run caffe in the M1 mac which is arm core inside rather than x86. I hope someone can give me some help to make it. Thanks! This is my Cmakelist file. CMakeLists.txt