-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
os:linux-non-armIssues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices.Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices.platform:pythonMediaPipe Python issuesMediaPipe Python issuestype:build/installFor Build and Installation issuesFor Build and Installation issues
Description
OS Platform and Distribution
Ubuntu 24.04
Compiler version
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Programming Language and version
python 3.12
MediaPipe version
latest + #6131
Bazel version
7.4.1
Problem Description
Multiple issues arise when following docs/getting_started/python.md for building the python package from source:
- seems that
setuptoolsshould be installed but missing from requirements.txt (or at least it fails when it is not installed). - the
__version__variable in setup.py must be modified in order to be PEP 440 compliant, otherwise the script raise.
These are just annoyances, probably the build doesn't assume python 3.12 or the python package dependencies which pip brings in for 3.12, or, the stricter pip that comes with 3.12.
But then the build currently fails over a mediapipe C++ core issue:
$ python3 setup.py install --link-opencv
ERROR: /home/user/code/mediapipe-current/mediapipe/python/pybind/BUILD:27:15: Compiling mediapipe/python/pybind/calculator_graph.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target //mediapipe/python/pybind:calculator_graph) /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 126 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
mediapipe/python/pybind/calculator_graph.cc: In lambda function:
mediapipe/python/pybind/calculator_graph.cc:441:50: error: no matching function for call to 'absl::MutexLock::MutexLock(absl::Mutex&)'
441 | absl::MutexLock lock(callback_mutex);
| ^
In file included from external/com_google_absl/absl/strings/internal/cordz_info.h:31,
from external/com_google_absl/absl/strings/cord.h:90,
from external/com_google_absl/absl/status/internal/status_internal.h:26,
from external/com_google_absl/absl/status/status.h:65,
from mediapipe/python/pybind/calculator_graph.cc:22:
external/com_google_absl/absl/synchronization/mutex.h:588:12: note: candidate: 'absl::MutexLock::MutexLock(absl::Mutex*, const absl::Condition&)'
588 | explicit MutexLock(Mutex* mu, const Condition& cond)
| ^~~~~~~~~
external/com_google_absl/absl/synchronization/mutex.h:588:12: note: candidate expects 2 arguments, 1 provided
external/com_google_absl/absl/synchronization/mutex.h:581:12: note: candidate: 'absl::MutexLock::MutexLock(absl::Mutex*)'
581 | explicit MutexLock(Mutex* mu) ABSL_EXCLUSIVE_LOCK_FUNCTION(mu) : mu_(mu) {
| ^~~~~~~~~
external/com_google_absl/absl/synchronization/mutex.h:581:29: note: no known conversion for argument 1 from 'absl::Mutex' to 'absl::Mutex*'
581 | explicit MutexLock(Mutex* mu) ABSL_EXCLUSIVE_LOCK_FUNCTION(mu) : mu_(mu) {
| ~~~~~~~^~
INFO: Found 1 target...
Target //mediapipe/python:_framework_bindings.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 169.311s, Critical Path: 67.72s
INFO: 3137 processes: 369 internal, 2768 linux-sandbox.
ERROR: Build did NOT complete successfullyMetadata
Metadata
Assignees
Labels
os:linux-non-armIssues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices.Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices.platform:pythonMediaPipe Python issuesMediaPipe Python issuestype:build/installFor Build and Installation issuesFor Build and Installation issues