google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.72k stars 5.18k forks source link

Failed to build mediapipe with tensorflow lite?? #2308

Closed jiapei100 closed 3 years ago

jiapei100 commented 3 years ago
➜  mediapipe git:(master) ✗ python setup.py build
running build
running build_binary_graphs
generating binarypb: mediapipe/modules/face_detection/face_detection_short_range_cpu
DEBUG: Rule 'rules_foreign_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "a743f79ae96bd4bdace6f582b88dcfbdfbe5aeb8ff9f7b61ed5c65e2f774cda8"
DEBUG: Repository rules_foreign_cc instantiated at:
  ....../mediapipe/WORKSPACE:42:13: in <toplevel>
Repository rule http_archive defined at:
  ~/.cache/bazel/_bazel_lvision/dfcc17eb3fa3a6c44920fcc8986c0699/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
DEBUG: ~/.cache/bazel/_bazel_lvision/dfcc17eb3fa3a6c44920fcc8986c0699/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: ~/.cache/bazel/_bazel_lvision/dfcc17eb3fa3a6c44920fcc8986c0699/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: ~/.cache/bazel/_bazel_lvision/dfcc17eb3fa3a6c44920fcc8986c0699/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: ~/.cache/bazel/_bazel_lvision/dfcc17eb3fa3a6c44920fcc8986c0699/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: ~/.cache/bazel/_bazel_lvision/dfcc17eb3fa3a6c44920fcc8986c0699/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'bazel_skylib' because it already exists.
DEBUG: ~/.cache/bazel/_bazel_lvision/dfcc17eb3fa3a6c44920fcc8986c0699/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: ~/.cache/bazel/_bazel_lvision/dfcc17eb3fa3a6c44920fcc8986c0699/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
INFO: Analyzed target //mediapipe/modules/face_detection:face_detection_short_range_cpu (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: ~/.cache/bazel/_bazel_lvision/dfcc17eb3fa3a6c44920fcc8986c0699/external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/BUILD:266:11: C++ compilation of rule '@org_tensorflow//tensorflow/lite/delegates/gpu/gl:gl_shader' failed (Exit 1): gcc failed: error executing command /usr/local/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 27 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox gcc failed: error executing command /usr/local/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 27 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
In file included from /usr/include/EGL/eglplatform.h:128,
                 from /usr/include/EGL/egl.h:39,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/portable_gl31.h:21,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_shader.h:23,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_shader.cc:16:
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_shader.h:36:16: error: expected unqualified-id before 'int'
   36 |   static absl::Status CompileShader(GLenum shader_type,
      |                ^~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_errors.h:26:7: error: expected unqualified-id before 'int'
   26 | absl::Status GetOpenGlErrors();
      |       ^~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_errors.h:29:7: error: expected unqualified-id before 'int'
   29 | absl::Status GetEglError();
      |       ^~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_call.h:56:9: error: expected unqualified-id before 'int'
   56 |   absl::Status operator()(const std::string& context, F func, ErrorF error_func,
      |         ^~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_call.h:70:9: error: expected unqualified-id before 'int'
   70 |   absl::Status operator()(const std::string& context, F func, ErrorF error_func,
      |         ^~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_call.h:81:7: error: expected unqualified-id before 'int'
   81 | absl::Status CallAndCheckError(const std::string& context, F func,
      |       ^~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_call.h:89:7: error: expected unqualified-id before 'int'
   89 | absl::Status CallAndCheckError(const std::string& context, F func,
      |       ^~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_shader.cc:45:7: error: expected unqualified-id before 'int'
   45 | absl::Status GlShader::CompileShader(GLenum shader_type,
      |       ^~~~~~
Target //mediapipe/modules/face_detection:face_detection_short_range_cpu failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.264s, Critical Path: 0.92s
INFO: 131 processes: 129 internal, 2 linux-sandbox.
FAILED: Build did NOT complete successfully

Did anybody meet similar issue? Thank you ... Pei

sgowroji commented 3 years ago

Hi @jiapei100, Could you please provide the steps to reproduce the above error. Thanks!

google-ml-butler[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] commented 3 years ago

Closing as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] commented 3 years ago

Are you satisfied with the resolution of your issue? Yes No