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

mediapipe as dependency using bazel #256

Closed
davidakr opened this issue Nov 19, 2019 · 4 comments
Closed

mediapipe as dependency using bazel #256

davidakr opened this issue Nov 19, 2019 · 4 comments
Assignees
Labels

Comments

@davidakr
Copy link

Hi,
I am building a C++ Application on Ubuntu which should use mediapipe.
How do I configure the mediapipe framework as a remote dependency in a bazel project?

@mgyong mgyong self-assigned this Nov 19, 2019
@mgyong mgyong added the platform:desktop desktop label Nov 19, 2019
@mgyong
Copy link

mgyong commented Nov 19, 2019

@davidakr Pls check out the helloworld example in the mediapipe_addon repo of how to create C++ app with MediaPipe as remote dependency in bazel

@davidakr
Copy link
Author

davidakr commented Nov 20, 2019

The hello_world example works just fine.
I am trying to build the hand tracking with GPU support enabled but I cannot build the @mediapipe//mediapipe/graphs/hand_tracking:mobile_calculators. In my application I want to use this feature. I run into the following issue:

In file included from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.h:21:0,
from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:16:
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc: In function 'int tflite::gpu::gl::{anonymous}::GetConfig(EGLDisplay, const EGLint*, void**)':
external/org_tensorflow/tensorflow/lite/delegates/gpu/common/status.h:68:18: error: request for member 'ok' in 'status2', which is of non-class type 'const int'
if (!status2.ok()) return status2;
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:33:3: note: in expansion of macro 'RETURN_IF_ERROR'
RETURN_IF_ERROR(GetOpenGlErrors());
^~~~~~~~~~~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:35:69: error: cannot convert 'tflite::gpu::Status' to 'int' in return
return InternalError("No EGL error, but eglChooseConfig failed.");
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:37:19: error: cannot convert 'tflite::gpu::Status' to 'int' in return
return OkStatus();
^
In file included from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.h:21:0,
from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:16:
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc: In function 'int tflite::gpu::gl::{anonymous}::CreateContext(EGLDisplay, EGLContext, EGLConfig, tflite::gpu::gl::EglContext*)':
external/org_tensorflow/tensorflow/lite/delegates/gpu/common/status.h:68:18: error: request for member 'ok' in 'status2', which is of non-class type 'const int'
if (!status2.ok()) return status2;
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:50:3: note: in expansion of macro 'RETURN_IF_ERROR'
RETURN_IF_ERROR(GetOpenGlErrors());
^~~~~~~~~~~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:52:70: error: cannot convert 'tflite::gpu::Status' to 'int' in return
return InternalError("No EGL error, but eglCreateContext failed.");
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:55:19: error: cannot convert 'tflite::gpu::Status' to 'int' in return
return OkStatus();
^
In file included from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.h:21:0,
from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:16:
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc: In member function 'int tflite::gpu::gl::EglContext::MakeCurrent(EGLSurface, EGLSurface)':
external/org_tensorflow/tensorflow/lite/delegates/gpu/common/status.h:68:18: error: request for member 'ok' in 'status2', which is of non-class type 'const int'
if (!status2.ok()) return status2;
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:98:3: note: in expansion of macro 'RETURN_IF_ERROR'
RETURN_IF_ERROR(GetOpenGlErrors());
^~~~~~~~~~~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:100:68: error: cannot convert 'tflite::gpu::Status' to 'int' in return
return InternalError("No EGL error, but eglMakeCurrent failed.");
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:102:19: error: cannot convert 'tflite::gpu::Status' to 'int' in return
return OkStatus();
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc: In function 'int tflite::gpu::gl::CreateConfiglessContext(EGLDisplay, EGLContext, tflite::gpu::gl::EglContext*)':
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:112:70: error: cannot convert 'tflite::gpu::Status' to 'int' in return
return UnavailableError("EGL_KHR_no_config_context not supported");
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc: In function 'int tflite::gpu::gl::CreateSurfacelessContext(EGLDisplay, EGLContext, tflite::gpu::gl::EglContext*)':
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:120:67: error: cannot convert 'tflite::gpu::Status' to 'int' in return
return UnavailableError("EGL_KHR_create_context not supported");
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:123:72: error: cannot convert 'tflite::gpu::Status' to 'int' in return
return UnavailableError("EGL_KHR_surfaceless_context not supported");
^
In file included from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.h:21:0,
from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:16:
external/org_tensorflow/tensorflow/lite/delegates/gpu/common/status.h:68:18: error: request for member 'ok' in 'status2', which is of non-class type 'const int'
if (!status2.ok()) return status2;
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:128:3: note: in expansion of macro 'RETURN_IF_ERROR'
RETURN_IF_ERROR(GetConfig(display, attributes, &config));
^~~~~~~~~~~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc: In function 'int tflite::gpu::gl::CreatePBufferContext(EGLDisplay, EGLContext, tflite::gpu::gl::EglContext*)':
external/org_tensorflow/tensorflow/lite/delegates/gpu/common/status.h:68:18: error: request for member 'ok' in 'status2', which is of non-class type 'const int'
if (!status2.ok()) return status2;
^
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/egl_context.cc:146:3: note: in expansion of macro 'RETURN_IF_ERROR'
RETURN_IF_ERROR(GetConfig(display, attributes, &config));

I was trying to build it with several different tensorflow versions but no success.
Building the provided examples works just fine
Any idea how to fix this?

@jiuqiant
Copy link
Contributor

Regrading your issue, this discussion is somehow related: #305 (comment)

@davidakr
Copy link
Author

this solved my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants