Failed to Obtain the org_boost Sub-Repository Dependency During TensorFlow Serving Compilation
Symptom
When you build the dependency org_boost during TensorFlow Serving compilation, the message "error running'git -c protocol.file.allow=always submodule update --init --recursive --checkout --force' while working with @org_boost" is displayed. The details are as follows:
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 |
Key Process and Cause Analysis
The download of the org_boost sub-repository fails due to an unstable network.
Conclusion and Solution
- Go to the /path/to/download directory specified by --distdir and download the file by running the following commands:
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
- Modify the project build file ./tensorflow_serving/workspace.bzl and delete the following content in line 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", )
Modify the file as follows (change path based on your case):
1 2 3 4 5
new_local_repository( name = "org_boost", build_file = "//third_party/boost:BUILD", path = "/path/to/download/boost", )
- Run the compile command again.
Parent topic: Troubleshooting