Closed Bycob closed 1 year ago
TODO (possibly):
Almost working on M1 (first gen):
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/DiskArbitration.framework/Headers/DADisk.h:58:87: warning: declaration does not declare anything [-Wmissing-declarations]
extern const CFStringRef kDADiskDescriptionMediaPathKey; /* ( CFString ) */ API_AVAILABLE(macos(10.4));
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/os/availability.h:91:196: note: expanded from macro 'API_AVAILABLE'
#define API_AVAILABLE(...) __API_AVAILABLE_GET_MACRO(__VA_ARGS__,__API_AVAILABLE8, __API_AVAILABLE7, __API_AVAILABLE6, __API_AVAILABLE5, __API_AVAILABLE4, __API_AVAILABLE3, __API_AVAILABLE2, __API_AVAILABLE1, 0)(__VA_ARGS__)
^
10 warnings generated.
[100%] Linking CXX shared library ../lib/libtorch_cpu.dylib
Undefined symbols for architecture arm64:
"google::protobuf::internal::ThreadSafeArena::thread_cache_", referenced from:
google::protobuf::RepeatedField<long long>::GrowNoAnnotate(int, int) in libcaffe2_protos.a(torch.pb.cc.o)
google::protobuf::RepeatedField<long long>::GrowNoAnnotate(int, int) in libcaffe2_protos.a(caffe2.pb.cc.o)
google::protobuf::RepeatedField<float>::GrowNoAnnotate(int, int) in libcaffe2_protos.a(caffe2.pb.cc.o)
google::protobuf::RepeatedField<int>::GrowNoAnnotate(int, int) in libcaffe2_protos.a(caffe2.pb.cc.o)
google::protobuf::RepeatedField<double>::GrowNoAnnotate(int, int) in libcaffe2_protos.a(caffe2.pb.cc.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [lib/libtorch_cpu.dylib] Error 1
make[4]: *** [caffe2/CMakeFiles/torch_cpu.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [pytorch/src/pytorch-stamp/pytorch-build] Error 1
make[1]: *** [CMakeFiles/pytorch.dir/all] Error 2
make: *** [all] Error 2
Build says
- TORCH_VERSION : 2.0.0
so it may come from wrong torch version. Note: the 2.0.1 torch is in though, and pytorch src dir has 2.0.1 tag.
Version of protobuf? On the M2 it seems to be 3.21.12
3.23.2
This pull request is now in conflict :(
Requires https://github.com/jolibrain/deepdetect/pull/1524 to be merged
Requirements:
Build:
You may need to uninstall system spdlog so that it doesn't interfere with locally built version
If cmake does not find opencv you can add flags to help, for example:
-DUSE_OPENCV_VERSION=4 -DOpenCV_DIR=/opt/homebrew/Cellar/opencv/4.7.0_7/lib/cmake/opencv4
===
Tested with versions:
===
If necessary versions can be pinned on mac using
With this, OpenCV will no longer be updated when running
brew update; brew upgrade