---
title: 编译TensorFlow Serving时提示获取org_boost子模块依赖时失败
description: "编译TensorFlow Serving构建依赖org_boost时提示“error running 'git -c protocol.file.allow=always submodule update --init --recursive --checkout --force' while working with @org_boost”。详细信息如下。"
url: https://www.hikunpeng.com/document/detail/zh/SRA/perfEval/benchmarksra/kunpengmodelzoo_06_0019.html
sourcePath: /source/zh/SRA/perfEval/benchmarksra/kunpengmodelzoo_06_0019.html
indexId: 7ba294b0be82c3ba782d3fb5a8eba480d9b8e70647ee25614a4ccbcbb9d6b9cc65
---
# 编译TensorFlow Serving时提示获取org_boost子模块依赖时失败

#### 问题现象描述

编译TensorFlow Serving构建依赖org_boost时提示“error running 'git -c protocol.file.allow=always submodule update --init --recursive --checkout --force' while working with @org_boost”。详细信息如下。

```
ERROR: /home/xxx/tfserving/serving/output/ba6572d0268f10026d9549fa2ae08318/external/ydf/yggdrasil_decision_forests/metric/BUILD:11:15: @ydf//yggdrasil_decision_forests/metric:metric depends on @org_boost//:boost in repository @org_boost which failed to fetch. no such package '@org_boost//': error running 'git -c protocol.file.allow=always submodule update --init --recursive --checkout --force' while working with @org_boost:
Timed out
WARNING: /home/cya/boss/tfserving/serving/tensorflow_serving/servables/tensorflow/BUILD:1062:22: in cc_library rule //tensorflow_serving/servables/tensorflow:thread_pool_factory_config_proto: target '//tensorflow_serving/servables/tensorflow:thread_pool_factory_config_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
WARNING: errors encountered while analyzing target '//tensorflow_serving/model_servers:tensorflow_model_server': it will not be built
```


#### 关键过程、根本原因分析

网络不稳定导致org_boost（子仓）不能完整下载。


#### 结论、解决方案及效果

1. 进入--distdir指定目录“/path/to/download”，使用以下方法下载。
  1 2 3 4 5 cd download git clone https://github.com/boostorg/boost.git cd boost git checkout b7b1371294b4bdfc8d85e49236ebced114bc1d8f git submodule update --init --recursive

2. 修改工程构建文件“./tensorflow_serving/workspace.bzl”，删除第128行以下内容。
  1 2 3 4 5 6 7 8 new_git_repository( name = "org_boost", commit = "b7b1371294b4bdfc8d85e49236ebced114bc1d8f", # boost-1.75.0 build_file = "//third_party/boost:BUILD", init_submodules = True, recursive_init_submodules = True, remote = "https://github.com/boostorg/boost", )

  修改为以下内容（请根据实际情况修改“path”）。

  1 2 3 4 5 new_local_repository( name = "org_boost", build_file = "//third_party/boost:BUILD", path = "/path/to/download/boost", )

3. 重新执行编译命令。
