【问题标题】:Building mediapipe fails with both GCC and Clang使用 GCC 和 Clang 构建 mediapipe 失败
【发布时间】:2021-11-14 21:35:05
【问题描述】:

我正在尝试用 C++ 构建 Mediapipe 的 Hello World 示例。这些是我在 .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"

然后我运行它,按照说明进行操作:

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

效果是“全局命名空间中没有名为'max'的成员”错误:

if (x->version == std::numeric_limits<uint32_t>::max()) {

那是在 Clang 上我只使用过,因为 GCC11 改变了它现在不包含 &lt;limits&gt; 的方式,因此将 CC/CXX 变量设置为 gcc/g++,它给出了 "'::max' has not been declared; did你的意思是std::max?”错误... Clang 是否进行了类似的更改?我在 Fedora 上,无法访问旧的 GCC10。

【问题讨论】:

  • 如果你这样做 - if (x-&gt;version == std::numeric_limits&lt;unsigned int&gt;::max()) { 会发生什么?
  • @moi 它不是示例的一部分,它在包含的媒体管道库中:(

标签: c++ gcc clang bazel mediapipe


【解决方案1】:

mediapipe 依赖于旧版本的abseil c++,它不包括在新的libstdc++ 版本上工作所必需的a commit。因此,媒体管道中的com_google_absl WORKSPACE 需要更新。

【讨论】:

  • 你认为他们修复它只是几天的问题,还是他们不在乎那么多?
  • 我不知道他们是否知道。也许提出媒体管道问题?
猜你喜欢
  • 2020-03-25
  • 2021-12-26
  • 1970-01-01
  • 2021-04-04
  • 1970-01-01
  • 1970-01-01
  • 2020-07-16
  • 1970-01-01
  • 2014-08-26
相关资源
最近更新 更多