M1 使用openface

安装大纲

具体看图

这里要注意提前安装 Command Line Tools for Xcode。在安装完成后,如果你的mac安装过Xcode,记得要执行以下命令!

sudo xcode-select -s /Library/Developer/CommandLineTools

原因:xcode的存在会让你的mac在使用某些共享库时链接到xcode的文件目录,而问题就出在有些函数中的内容xcode并不存在!

问题1:Cmake -d失败!

如果提示你openblas找不到,请不要一直尝试卸载你的openblas。进行以下操作:

1、打开findablas.cmake并添加以下语句(注意查看你自己的版本号)。

为什么这么干,因为m1的homebrew会把文件安装在opt/homebrew目录下,并非/usr/local目录。

问题2:make出错

如果你在make编译时出现以下错误,那你大概率给自己的mac装了Xcode。

In file included from /users/Crilias/openface/OpenFace/lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp:35:

In file included from /users/Crilias/openface/OpenFace/lib/local/LandmarkDetector/include/stdafx.h:27:

In file included from /opt/homebrew/include/dlib/image_processing/frontal_face_detector.h:7:

In file included from /opt/homebrew/include/dlib/image_processing/../image_processing/object_detector.h:7:

In file included from /opt/homebrew/include/dlib/image_processing/../geometry.h:10:

In file included from /opt/homebrew/include/dlib/image_processing/../geometry/point_transforms.h:9:

In file included from /opt/homebrew/include/dlib/image_processing/../geometry/../matrix/../optimization/../matrix.h:11:

In file included from /opt/homebrew/include/dlib/image_processing/../matrix/matrix_la.h:9:

/opt/homebrew/include/dlib/image_processing/../geometry/../matrix/../optimization/optimization_line_search.h:218:31: error: expected unqualified-id

if (temp == 0 || std::fpclassify(temp) == FP_SUBNORMAL)

^

/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/math.h:127:5: note: expanded from macro 'fpclassify'

( sizeof(x) == sizeof(float) ? __fpclassifyf((float)(x)) \

^

1 error generated.

make[2]: *** [lib/local/LandmarkDetector/CMakeFiles/LandmarkDetector.dir/src/CCNF_patch_expert.cpp.o] Error 1

make[1]: *** [lib/local/LandmarkDetector/CMakeFiles/LandmarkDetector.dir/

这个时候不要怕,删了Xcode就行了!!!(开玩笑哈哈哈当然不是不行)

真实做法要执行以下命令!

sudo xcode-select -s /Library/Developer/CommandLineTools

原因:xcode的存在会让你的mac在使用某些共享库时链接到xcode的文件目录,而问题就出在有些函数中的内容xcode并不存在!

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值