profile
viewpoint

Ask questionsHand Tracking Desktop GPU Build Error

When I try to run the following command in docker bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS \ mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu

I got the following error

error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame
-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 29 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
In file included from ./mediapipe/gpu/gl_simple_shaders.h:18:0,
                 from mediapipe/gpu/gl_simple_shaders.cc:15:
./mediapipe/gpu/gl_base.h:57:10: fatal error: EGL/egl.h: No such file or directory
 #include <EGL/egl.h>
          ^~~~~~~~~~~
compilation terminated.
Target //mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 118.767s, Critical Path: 82.66s
INFO: 48 processes: 48 processwrapper-sandbox.
FAILED: Build did NOT complete successfully

What may potentially cause this error?

google/mediapipe

Answer questions mcclanahoochie

i'm assuming you have the mesa drivers installed... what about the nvidia drivers? are you using ones pre-installed, or updated ones from https://www.nvidia.com/Download/index.aspx ? that may make a difference.

also this is a long shot, but try running export DISPLAY=:0 before running the mediapipe example

useful!

Related questions

Get hand_tracking_cpu source code to extract detected hand metadata hot 2
SSL certification error while downloading dependency libraries via Bazel hot 1
Build of Hello World Failed on Darwin (MacOS) hot 1
Build of Hello World Failed on Darwin (MacOS) hot 1
Bazel build failed in Android Studio hot 1
Fail to pull in MediaPipe's external dependencies due to unstable internet connection hot 1
at com.google.mediapipe.apps.objectdetectioncpu.MainActivity.<clinit>(MainActivity.java:50) hot 1
ERROR: An error occurred during the fetch of repository 'bazel_skylib' hot 1
Bazel build failed to fetch Maven dependency hot 1
Running error hot 1
Hello World failed build on Raspberry Pi - mediapipe hot 1
Accessing landmarks, tracking multiple hands, and enabling depth on desktop hot 1
Unable to load the hand detection model hot 1
build aar failed hot 1
Error in building TensorFlow Object Detection Demo hot 1
Github User Rank List