在MacOSX High Sierra上安装caffe / pycaffe

问题描述 投票:2回答:1

我正在按照此tutorial在我的OSX High Sierra上安装caffe。

我已完成所有步骤,但在此步骤中安装R-CNN示例时遇到了困难:

$ make -j8 && make pycaffe

LD -o .build_release/lib/libcaffe.so
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
ld: cannot link directly with /System/Library/Frameworks//vecLib.framework/vecLib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [.build_release/lib/libcaffe.so] Error 1

但是存在库veclib:

$ ls /System/Library/Frameworks//vecLib.framework/vecLib
/System/Library/Frameworks//vecLib.framework/vecLib

您能帮我解决这个问题吗?

python macos caffe pycaffe
1个回答
0
投票

我遇到了同样的问题。我安装了Xcode 9.3命令行工具,并将cmake / Modules / FindvecLib.cmake更改为如下所示,并且可以正常工作:

find_path(vecLib_INCLUDE_DIR cblas.h
      DOC "vecLib include directory"
      PATHS /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/
      NO_DEFAULT_PATH)

对于我来说,必须设置NO_DEFAULT_PATH,否则仍然会出现链接错误。您也可以参考this

© www.soinside.com 2019 - 2024. All rights reserved.