Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Protobuf and OpenCV 4 Compatibility on macOS #5787

Open
Tendaliu opened this issue Dec 18, 2024 · 2 comments
Open

Issue with Protobuf and OpenCV 4 Compatibility on macOS #5787

Tendaliu opened this issue Dec 18, 2024 · 2 comments
Assignees
Labels
os:macOS Issues on MacOS platform:c++ Issues specific to C++ framework in mediapipe type:build/install For Build and Installation issues

Comments

@Tendaliu
Copy link

OS Platform and Distribution

Mac OS 15

Compiler version

clang

Programming Language and version

C++ 17

Installed using virtualenv? pip? Conda?(if python)

No response

MediaPipe version

0.10.18

Bazel version

No response

XCode and Tulsi versions (if iOS)

No response

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

None

OpenCV version (if running on desktop)

opencv 4.10

Describe the problem

Error occurs when running a MediaPipe dylib

Complete Logs

I am encountering an issue when compiling MediaPipe on macOS with OpenCV 4. The issue arises when running the libMediapipeHolisticTracking.dylib, resulting in a crash at the following location in the stack trace:


#0  0x000000010f398eb0 in google::protobuf::Reflection::GetOneofCase ()

It seems that this issue occurs specifically when OpenCV 4 is used for the compilation. The same issue does not occur when using OpenCV 3.4, and the application runs as expected in that case.

Based on my analysis, it appears that the crash is due to a version mismatch or ABI incompatibility between Protobuf and OpenCV 4. The Protobuf version in use by MediaPipe (3.19.1) might not be fully compatible with OpenCV 4, which may be using a more recent version of Protobuf. The issue does not occur with OpenCV 3.4, which seems to be more compatible with Protobuf 3.19.1.
@Tendaliu Tendaliu added the type:build/install For Build and Installation issues label Dec 18, 2024
@kuaashish kuaashish assigned kuaashish and unassigned kalyan2789g Dec 18, 2024
@kuaashish kuaashish added os:macOS Issues on MacOS platform:c++ Issues specific to C++ framework in mediapipe labels Dec 18, 2024
@kuaashish
Copy link
Collaborator

Hi @Tendaliu,

Could you please confirm if you've followed the steps to set up OpenCV 4 as outlined in this commit? Additionally, could you verify if you are able to successfully build the Hello World example?

If you are still encountering issues, please provide the complete command you are using along with the full error log. This will help us reproduce the issue and better understand the problem.

Thank you!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Dec 18, 2024
@Tendaliu
Copy link
Author

I have followed the setup instructions for OpenCV 4, and I was able to successfully compile the example. However, I am encountering an issue when initializing the HolisticTracking tracker(modelpath, false, true, false, true);. The error I am seeing is:

libprotobuf.29.1.0.dylibgoogle::protobuf::FieldDescriptor::is_required.

My build command is:

bazel run --define MEDIAPIPE_DISABLE_GPU=1
--repo_env=HERMETIC_PYTHON_VERSION=3.12
mediapipe/examples/desktop/holistic_tracking_dll:MediapipeHolisticTracking --verbose_failures

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:macOS Issues on MacOS platform:c++ Issues specific to C++ framework in mediapipe type:build/install For Build and Installation issues
Projects
None yet
Development

No branches or pull requests

3 participants