【问题标题】:Failed to build Dockerfile.devel with error -Werror=maybe-uninitialized无法构建 Dockerfile.devel 并出现错误 -Werror=maybe-uninitialized
【发布时间】:2020-07-11 23:08:13
【问题描述】:

我正在从源代码 refer to doc 构建 tensorflow-server,但它失败了。

我的环境: Linux 3.10.0-1062.12.1.el7.x86_64 码头工人 19.03.8

构建命令:

docker build --pull -t $USER/tensorflow-serving-devel   -f tensorflow_serving/tools/docker/Dockerfile.devel

错误输出:

ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/upb/BUILD:57:1: C++ compilation of rule '@upb//:upb' failed (Exit 1)
external/upb/upb/table.c: In function 'upb_inttable_pop':
external/upb/upb/table.c:588:10: error: 'val.val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   return val;
          ^~~
cc1: all warnings being treated as errors
Target //tensorflow_serving/model_servers:tensorflow_model_server failed to build
INFO: Elapsed time: 592.958s, Critical Path: 122.61s
INFO: 3550 processes: 3550 local.
FAILED: Build did NOT complete successfully

【问题讨论】:

    标签: c++ tensorflow-serving


    【解决方案1】:

    在构建最新版本的 Tensorflow Serving 容器时,我也遇到了这个错误。看起来特定的 bazel 版本会导致错误。我在最近的 tensorflow 服务更新之一 - https://github.com/tensorflow/serving/commit/162f72949c6ecbe9e610182c923dec0aa5924cf2 下找到了讨论。我尝试了那里建议的解决方法,将 Tensorflow Serving 分支从 master 更改为 r2.1,方法是将参数传递给 docker build --build-arg TF_SERVING_VERSION_GIT_BRANCH=r2.1,它有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-08-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多