fatal error: 'opencv2/core/version.hpp' file not found (Apple M1) #591
Labels
host:macos
Issue that occurs when host OS is macOS
type:build/install
Cannot build/install the plugin
Plugin Version or Commit ID
V0.10.0
Unity Version
2021.3.3.f1
Your Host OS
Apple M1 MacOS Monterey
Target Platform
UnityEditor, Mac Standalone
[Windows Only] Visual Studio C++ and Windows SDK Version
No response
[Linux Only] GCC/G++ and GLIBC Version
No response
[Android Only] Android Build Tools and NDK Version
No response
[iOS Only] XCode Version
No response
Command Sequences
python build.py build --desktop cpu -vv
Log
external/com_google_mediapipe/mediapipe/framework/port/opencv_core_inc.h:18:10: fatal error: 'opencv2/core/version.hpp' file not found
#include <opencv2/core/version.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Error in child process '/usr/bin/xcrun'. 1
Target //mediapipe_api:mediapipe_desktop failed to build
INFO: Elapsed time: 2.086s, Critical Path: 1.03s
INFO: 156 processes: 132 internal, 24 darwin-sandbox.
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
File "/Users/yujiet/Desktop/Microsoft/MediaPipeUnityPlugin/build.py", line 450, in
Argument().command().run()
File "/Users/yujiet/Desktop/Microsoft/MediaPipeUnityPlugin/build.py", line 138, in run
self._run_command(self._build_desktop_commands())
File "/Users/yujiet/Desktop/Microsoft/MediaPipeUnityPlugin/build.py", line 54, in _run_command
return subprocess.run(' '.join(command_list), check=True, shell=shell)
File "/opt/homebrew/Cellar/[email protected]/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'bazel build -c opt --verbose_failures --define MEDIAPIPE_DISABLE_GPU=1 --@opencv//:switch=local //mediapipe_api:mediapipe_desktop' returned non-zero exit status 1.
Additional Context
I am trying to build the package on M1 laptop but keep getting this error. The OpenCV was installed under the /opt/homebrew/opt/opencv@3.
The text was updated successfully, but these errors were encountered: