Open dtaivpp opened 2 years ago
modify face.go at this project
package face
// #cgo CXXFLAGS: -std=c++1z -Wall -O3 -DNDEBUG -mcpu=apple-m1
another solutions is update clang with brew
lang: error: the clang compiler does not support '-march=native'
1° - Install llvm con brew
brew install llvm
2° - Check clang version
cd /opt/homebrew/opt/llvm
.clang --version
Result:
Homebrew clang version 15.0.6
Target: arm64-apple-darwin22.2.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin
3° - modify path with the new version, for example add to .zshrc
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
I tried the solution above, and now it gets an error
classify.cc:2:10: fatal error: 'dlib/graph_utils.h' file not found
I tried the solution above, and now it gets an error
classify.cc:2:10: fatal error: 'dlib/graph_utils.h' file not found
try
CPLUS_INCLUDE_PATH=/opt/homebrew/Cellar/jpeg/9d/include/:/opt/homebrew/Cellar/dlib/19.24_1/include LD_LIBRARY_PATH=/opt/homebrew/Cellar/dlib/19.24_1/lib/:/opt/homebrew/Cellar/jpeg/9d/lib/ LIBRARY_PATH=/opt/homebrew/Cellar/dlib/19.24_1/lib/:/opt/homebrew/Cellar/jpeg/9d/lib/ go build
Same error here, even with setting LIBRARY_PATH
(for me, CPLUS_INCLUDE_PATH
and LD_LIBRARY_PATH
were already setup correctly).
Any hints @chaosue @Kagami @gougo @Exegetech @nodoyuna @dtaivpp ?
Fixed by copying dlib in $GOPATH/pkg/path/to/go-face
and changing import in classify.cc
Hey all, pretty new to go and having a problem with go get on MacOS 12.2/Go 1.17.6 on M1.
Here is what I am facing:
I am not sure if I am missing some flag that would allow this to build. Here is my go env:
Any recommendations? I am not seeing where -march=native is set. There was a stack overflow thread that suggested using -mcpu=apple-m1 however I am not seeing where to put that.