编译TF-Serving时提示获取org_boost子仓依赖时失败
问题现象描述
编译TF-Serving时构建依赖org_boost提示“error running 'git -c protocol.file.allow=always submodule update --init --recursive --checkout --force' while working with @org_boost”。详细信息如下。
1 2 3 4 | 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子仓不能完整下载。
结论、解决方案及效果
- 进入--distdir指定目录即“path/to/tfserving215/serving/proxy”目录,使用以下方法下载。
1 2 3 4 5
cd proxy git clone https://github.com/boostorg/boost.git cd boost git checkout b7b1371294b4bdfc8d85e49236ebced114bc1d8f git submodule update --init --recursive
- 修改工程构建文件“./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
native.new_local_repository( name = "org_boost", build_file = "//third_party/boost:BUILD", path = "/path/to/tfserving215/serving/proxy/boost", )
- 重新执行编译命令。
父主题: 故障排除