I am trying to build Hello World example of Mediapipe in C++. These are my exports in .bash_profile:
export PATH=$PATH:$(go env GOPATH)/bin
export GLOG_logtostderr=1
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
#export CC=/usr/bin/gcc
#export CXX=/usr/bin/g++
export BAZEL_CXXOPTS="-std=gnu++17"
then I run this, fallowing the instructions:
bazelisk run --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 --sandbox_writable_path ~/.ccache --sandbox_debug --verbose_failures mediapipe/examples/desktop/hello_world:hello_world
the effect being "no member named 'max' in the global namespace" error on this line:
if (x->version == std::numeric_limits<uint32_t>::max()) {
that's on Clang I've only used because GCC11 changed how it now doesn't include <limits>
so with CC/CXX variables set to gcc/g++, it gives "'::max' has not been declared; did you mean std::max?" errors... did Clang made similar changes? I'm on Fedora, I don't have access to old GCC10.
mediapipe depends on an old version of abseil c++ that does not include a commit necessary to work on newer libstdc++
versions. So, com_google_absl
in the mediapipe WORKSPACE needs an update.