Tensorflow 2.11.1 bazel failed with option framework_shared_object=false
Hi @tomchen1000 ,

Can you please cross check and confirm the command ? Is it `--config=opt `? Your command getting error below, which is obvious.

```
(bazel3) suryanarayanay@surya-ubuntu20:~/tensorflow$ bazel build --config opt --define framework_shared_object=false //tensorflow/tools/pip_package:build_pip_package
ERROR: Config value 'opt' is not defined in any .rc file
```
What are the configurations you have opted in `./configure.py` step if you have used `--config=opt` ?

I tried building on a Ubuntu VM by omitting `--config=opt` from your command and it seems similar errors with different ops replicated as reported by you. You may please check and confirm.

```
(bazel3) suryanarayanay@surya-ubuntu20:~/tensorflow$ bazel build --define framework_shared_object=false //tensorflow/tools/pip_package:build_pip_package
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=100
INFO: Reading rc options for 'build' from /home/suryanarayanay/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /home/suryanarayanay/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/cpp_tests/core_runtime,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils
INFO: Found applicable config definition build:short_logs in file /home/suryanarayanay/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /home/suryanarayanay/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:linux in file /home/suryanarayanay/tensorflow/.bazelrc: --define=build_with_onednn_v2=true --host_copt=-w --copt=-Wno-all --copt=-Wno-extra --copt=-Wno-deprecated --copt=-Wno-deprecated-declarations --copt=-Wno-ignored-attributes --copt=-Wno-array-bounds --copt=-Wunused-result --copt=-Werror=unused-result --copt=-Wswitch --copt=-Werror=switch --copt=-Wno-error=unused-but-set-variable --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --config=dynamic_kernels --experimental_guard_against_concurrent_changes
INFO: Found applicable config definition build:dynamic_kernels in file /home/suryanarayanay/tensorflow/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (612 packages loaded, 36319 targets configured).
INFO: Found 1 target...
ERROR: /home/suryanarayanay/tensorflow/tensorflow/cc/BUILD:673:22: Linking tensorflow/cc/ops/training_ops_gen_cc [for host] failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc @bazel-out/host/bin/tensorflow/cc/ops/training_ops_gen_cc-2.params
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::_InternalParse(char const*, google::protobuf::internal::ParseContext*): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::TensorDescriptorProto>(google::protobuf::Arena*)'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::_InternalParse(char const*, google::protobuf::internal::ParseContext*): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::TensorDescriptorProto>(google::protobuf::Arena*)'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::_InternalParse(char const*, google::protobuf::internal::ParseContext*): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::TensorDescriptorProto>(google::protobuf::Arena*)'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::_InternalParse(char const*, google::protobuf::internal::ParseContext*): error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::ConvolutionDescriptorProto>(google::protobuf::Arena*)'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::TensorDescriptorProto>(google::protobuf::Arena*)'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::_TensorDescriptorProto_default_instance_'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::_TensorDescriptorProto_default_instance_'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::_TensorDescriptorProto_default_instance_'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::ConvolutionDescriptorProto>(google::protobuf::Arena*)'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::_ConvolutionDescriptorProto_default_instance_'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::~ConvolutionProto(): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::~TensorDescriptorProto()'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::~ConvolutionProto(): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::~TensorDescriptorProto()'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::~ConvolutionProto(): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::~TensorDescriptorProto()'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::~ConvolutionProto(): error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto::~ConvolutionDescriptorProto()'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::Clear(): error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto::~ConvolutionDescriptorProto()'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::Clear(): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::~TensorDescriptorProto()'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::ByteSizeLong() const'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::ByteSizeLong() const'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::ByteSizeLong() const'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto::ByteSizeLong() const'
bazel-out/host/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto_deps: error: undefined reference to 'descriptor_table_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::clear_key(): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::~AlgorithmProto()'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::_InternalParse(char const*, google::protobuf::internal::ParseContext*): error: undefined reference to 'stream_executor::dnn::AlgorithmProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::AlgorithmProto>(google::protobuf::Arena*)'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::AlgorithmProto>(google::protobuf::Arena*)'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::_AlgorithmProto_default_instance_'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::clear_key(): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::~AlgorithmProto()'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::_InternalParse(char const*, google::protobuf::internal::ParseContext*): error: undefined reference to 'stream_executor::dnn::AlgorithmProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::AlgorithmProto>(google::protobuf::Arena*)'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::AlgorithmProto>(google::protobuf::Arena*)'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::_AlgorithmProto_default_instance_'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::AlgorithmProto::ByteSizeLong() const'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::AlgorithmProto::ByteSizeLong() const'
bazel-out/host/bin/tensorflow/tsl/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:descriptor_table_tensorflow_2ftsl_2fprotobuf_2fautotuning_2eproto_deps: error: undefined reference to 'descriptor_table_tensorflow_2ftsl_2fprotobuf_2fdnn_2eproto'
bazel-out/host/bin/tensorflow/compiler/xla/service/gpu/_objs/backend_configs_cc_impl/backend_configs.pb.o:backend_configs.pb.cc:function xla::gpu::CudnnConvBackendConfig::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)'
bazel-out/host/bin/tensorflow/compiler/xla/service/gpu/_objs/backend_configs_cc_impl/backend_configs.pb.o:backend_configs.pb.cc:function xla::gpu::CudnnConvBackendConfig::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): error: undefined reference to 'stream_executor::dnn::_AlgorithmProto_default_instance_'
bazel-out/host/bin/tensorflow/compiler/xla/service/gpu/_objs/backend_configs_cc_impl/backend_configs.pb.o:backend_configs.pb.cc:function xla::gpu::CudnnConvBackendConfig::~CudnnConvBackendConfig(): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::~AlgorithmProto()'
bazel-out/host/bin/tensorflow/compiler/xla/service/gpu/_objs/backend_configs_cc_impl/backend_configs.pb.o:backend_configs.pb.cc:function xla::gpu::CudnnConvBackendConfig::Clear(): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::~AlgorithmProto()'
bazel-out/host/bin/tensorflow/compiler/xla/service/gpu/_objs/backend_configs_cc_impl/backend_configs.pb.o:backend_configs.pb.cc:function xla::gpu::CudnnConvBackendConfig::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::AlgorithmProto::ByteSizeLong() const'
bazel-out/host/bin/tensorflow/compiler/xla/service/gpu/_objs/backend_configs_cc_impl/backend_configs.pb.o:backend_configs.pb.cc:descriptor_table_tensorflow_2fcompiler_2fxla_2fservice_2fgpu_2fbackend_5fconfigs_2eproto_deps: error: undefined reference to 'descriptor_table_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto'
collect2: error: ld returned 1 exit status
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 757.694s, Critical Path: 75.05s
INFO: 769 processes: 68 internal, 701 local.
```

 @tomchen1000 ,

 One observation is that even though you are using the flag `--define framework_shared_object=false` its not being considered by bazel as in bazel the default setting is `framework_shared_object=true` and this can be override with `config=monolithic`. Please have a look at source here.
https://github.com/tensorflow/tensorflow/blob/f318efaa1175af1e76a3b75f8ebae4f776518cb9/.bazelrc#L218-L222

From the logs attached above you can see `framework_shared_object=true` under `Info` log sets by default and it is not override anywhere. 

When I added `config=monolithic` now `framework_shared_object=false` has been set. You can find the command and logs below.

```
(bazel3) suryanarayanay@surya-ubuntu20:~/tensorflow$ bazel build --config=monolithic //tensorflow/tools/pip_package:build_pip_package
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=171
INFO: Reading rc options for 'build' from /home/suryanarayanay/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /home/suryanarayanay/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/cpp_tests/core_runtime,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils
INFO: Found applicable config definition build:short_logs in file /home/suryanarayanay/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /home/suryanarayanay/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:monolithic in file /home/suryanarayanay/tensorflow/.bazelrc: --define framework_shared_object=false --define tsl_protobuf_header_only=false --experimental_link_static_libraries_once=false
INFO: Found applicable config definition build:linux in file /home/suryanarayanay/tensorflow/.bazelrc: --define=build_with_onednn_v2=true --host_copt=-w --copt=-Wno-all --copt=-Wno-extra --copt=-Wno-deprecated --copt=-Wno-deprecated-declarations --copt=-Wno-ignored-attributes --copt=-Wno-array-bounds --copt=-Wunused-result --copt=-Werror=unused-result --copt=-Wswitch --copt=-Werror=switch --copt=-Wno-error=unused-but-set-variable --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --config=dynamic_kernels --experimental_guard_against_concurrent_changes
INFO: Found applicable config definition build:dynamic_kernels in file /home/suryanarayanay/tensorflow/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
INFO: Build option --define has changed, discarding analysis cache.
INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (0 packages loaded, 36331 targets configured).
INFO: Found 1 target...
[9,722 / 12,411] 8 actions running
    Compiling tensorflow/compiler/xla/service/hlo_memory_scheduler.cc; 18s local
    Compiling tensorflow/compiler/xla/service/convolution_group_converter.cc; 12s local
    Compiling tensorflow/compiler/xla/service/dot_decomposer.cc; 12s local
    Compiling tensorflow/compiler/xla/service/layout_assignment.cc; 7s local
    Compiling tensorflow/compiler/xla/service/float_normalization.cc; 7s local
    Compiling tensorflow/compiler/xla/service/spmd/stateful_rng_spmd_partitioner.cc; 6s local
    Compiling tensorflow/compiler/xla/service/spmd/gather_scatter_handler.cc; 5s local
    Compiling tensorflow/compiler/xla/service/spmd/dot_handler.cc; 3s local
```

Please try the above command and let us if it works. Thanks! @SuryanarayanaY 

No, it doesn't work either. 

Got this error: 
ImportError: libtensorflow_framework.so.2: cannot open shared object file: No such file or directory.

See the command and logs below.

```
root@cb0af95e04e4:/tensorflow# bazel build --config=monolithic //tensorflow/tools/pip_package:build_pip_package
Starting local Bazel server and connecting to it...
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=165
INFO: Reading rc options for 'build' from /tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true
 --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=
with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --experimental_link
_static_libraries_once=false
INFO: Reading rc options for 'build' from /tensorflow/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/usr/bin/python3 --action_env PYTHON_LIB_PATH=/usr/lib/python3/dist-packages --python_path=/usr/bin/python3
INFO: Reading rc options for 'build' from /tensorflow/.bazelrc:
  'build' options: --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorf
low/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/ir,tensorflo
w/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo
_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensor
flow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback
/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/common,tensorflow
/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/c
pp_tests/core_runtime,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/
core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils
INFO: Found applicable config definition build:short_logs in file /tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:monolithic in file /tensorflow/.bazelrc: --define framework_shared_object=false --define tsl_protobuf_header_only=fals
e --experimental_link_static_libraries_once=false
INFO: Found applicable config definition build:linux in file /tensorflow/.bazelrc: --host_copt=-w --copt=-Wno-all --copt=-Wno-extra --copt=-Wno-deprecated --copt=-Wn
o-deprecated-declarations --copt=-Wno-ignored-attributes --copt=-Wno-unknown-warning --copt=-Wno-array-parameter --copt=-Wno-stringop-overflow --copt=-Wno-array-boun
ds --copt=-Wunused-result --copt=-Werror=unused-result --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INC
LUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --config=dynamic_kernels --distinct_host_configuration=false --experimental_guard_against_co
ncurrent_changes
INFO: Found applicable config definition build:dynamic_kernels in file /tensorflow/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (544 packages loaded, 31178 targets configured).
INFO: Found 1 target...

ERROR: /tensorflow/tensorflow/BUILD:1426:19: Executing genrule //tensorflow:tf_python_api_gen_v2 failed: (Exit 1): bash failed: error executing command /bin/bash -c
... (remaining 1 argument skipped)
2023-04-24 21:41:16.396194: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)
 to use the following CPU instructions in performance-critical operations:  SSE3 SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/org_tensorflow/bazel-out/k8-opt/bin/tensorflow/create_tensorflow.python_api_tf_pytho
n_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 62, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: libtensorflow_framework.so.2: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/org_tensorflow/bazel-out/k8-opt/bin/tensorflow/create_tensorflow.python_api_tf_pytho
n_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 22, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "/root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/org_tensorflow/bazel-out/k8-opt/bin/tensorflow/create_tensorflow.python_api_tf_pytho
n_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 36, in <module>
    from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
  File "/root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/org_tensorflow/bazel-out/k8-opt/bin/tensorflow/create_tensorflow.python_api_tf_pytho
n_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 77, in <module>
    raise ImportError(
ImportError: Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/org_tensorflow/bazel-out/k8-opt/bin/tensorflow/create_tensorflow.python_api_tf_pytho
n_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 62, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: libtensorflow_framework.so.2: cannot open shared object file: No such file or directory


Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors for some common causes and solutions.
If you need help, create an issue at https://github.com/tensorflow/tensorflow/issues and include the entire stack trace above this error message.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /tensorflow/tensorflow/lite/python/BUILD:68:10 Middleman _middlemen/tensorflow_Slite_Spython_Stflite_Uconvert-runfiles failed: (Exit 1): bash failed: error ex
ecuting command /bin/bash -c ... (remaining 1 argument skipped)
INFO: Elapsed time: 5936.681s, Critical Path: 3536.96s
INFO: 13312 processes: 1415 internal, 11897 local.
FAILED: Build did NOT complete successfully

```

 The same error occurs in TensorFlow v2.11.0, v2.12.0 and v2.13.0-rc0.

All of the following will produce the same error.

```bash
bazel build \
--config=monolithic \
--config=noaws \
--config=nohdfs \
--config=nonccl \
--config=v2 \
--define=tflite_pip_with_flex=true \
--define=tflite_with_xnnpack=true \
--copt="-Wno-stringop-overflow" \
--ui_actions_shown=20 \
//tensorflow/tools/pip_package:build_pip_package
```
```bash
bazel build \
--config=monolithic \
--config=noaws \
--config=nohdfs \
--config=nonccl \
--config=v2 \
--define=tflite_with_xnnpack=true \
--copt="-Wno-stringop-overflow" \
--ui_actions_shown=20 \
//tensorflow/tools/pip_package:build_pip_package
```
```bash
bazel build \
--config=opt \
--config=noaws \
--config=nohdfs \
--config=nonccl \
--config=v2 \
--define=tflite_pip_with_flex=true \
--define=tflite_with_xnnpack=true \
--copt="-Wno-stringop-overflow" \
--ui_actions_shown=20 \
//tensorflow/tools/pip_package:build_pip_package
```
```bash
bazel build \
--config=noaws \
--config=nohdfs \
--config=nonccl \
--config=v2 \
--define=tflite_pip_with_flex=true \
--define=tflite_with_xnnpack=true \
--copt="-Wno-stringop-overflow" \
--ui_actions_shown=20 \
//tensorflow/tools/pip_package:build_pip_package
``` Hi, Were you able to find a resolution for? 
```
ImportError: libtensorflow_framework.so.2: cannot open shared object file: No such file or directory.
```
<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Build/Install

### Have you reproduced the bug with TF nightly?

No

### Source

source

### Tensorflow Version

tf2.11.1

### Custom Code

No

### OS Platform and Distribution

Linux Ubuntu 18.04

### Mobile device

_No response_

### Python version

3.8.10

### Bazel version

5.3.0

### GCC/Compiler version

9.4.0

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

Tried to build Tensorflow 2.11.1 (and Tensorflow 2.12.0) using Tensorflow docker image: tensorflow/tensorflow:devel with option framework_shared_object=false. The build fails with the following error. (It's a build for CPU only).

Using the same option, previous versions of Tensorflow (such as v2.10.1) build without error. 






### Standalone code to reproduce the issue

```shell
docker pull tensorflow/tensorflow:devel
docker run -it -w /tensorflow -v /path/to/tensorflow:/tensorflow -v $PWD:/mnt \
    -e HOST_PERMS="\\((id -u):\\)(id -g)" tensorflow/tensorflow:devel bash

# within the container
bazel build --config opt --define framework_shared_object=false //tensorflow/tools/pip_package:build_pip_package
```


### Relevant log output

```shell
ERROR: /tensorflow/tensorflow/python/BUILD:889:29: Linking tensorflow/python/gen_ragged_math_ops_py_wrappers_cc failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc @bazel-out/k8-opt/bin/tensorflow/python/gen_ragged_math_ops_py_wrappers_cc-2.params
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function InitDefaultsscc_info_AutotuneResult_FailureResult_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto(): error: undefined reference to 'stream_executor::dnn::_AlgorithmProto_default_instance_'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function InitDefaultsscc_info_AutotuneResult_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto(): error: undefined reference to 'stream_executor::dnn::_AlgorithmProto_default_instance_'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::MergeFrom(tensorflow::AutotuneResult_FailureResult const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::AlgorithmProto>(google::protobuf::Arena*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::MergeFrom(tensorflow::AutotuneResult_FailureResult const&): error: undefined reference to 'stream_executor::dnn::_AlgorithmProto_default_instance_'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::MergeFrom(tensorflow::AutotuneResult_FailureResult const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::MergeFrom(stream_executor::dnn::AlgorithmProto const&)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::MergeFrom(tensorflow::AutotuneResult_FailureResult const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::MergeFrom(stream_executor::dnn::AlgorithmProto const&)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::MergeFrom(tensorflow::AutotuneResult const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::AlgorithmProto>(google::protobuf::Arena*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::MergeFrom(tensorflow::AutotuneResult const&): error: undefined reference to 'stream_executor::dnn::_AlgorithmProto_default_instance_'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::MergeFrom(tensorflow::AutotuneResult const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::MergeFrom(stream_executor::dnn::AlgorithmProto const&)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::MergeFrom(tensorflow::AutotuneResult const&): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::MergeFrom(stream_executor::dnn::AlgorithmProto const&)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*): error: undefined reference to 'stream_executor::dnn::AlgorithmProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::AlgorithmProto>(google::protobuf::Arena*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::InternalSerializeWithCachedSizesToArray(unsigned char*) const: error: undefined reference to 'stream_executor::dnn::AlgorithmProto::InternalSerializeWithCachedSizesToArray(unsigned char*) const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult_FailureResult::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::AlgorithmProto::ByteSizeLong() const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*): error: undefined reference to 'stream_executor::dnn::AlgorithmProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::AlgorithmProto>(google::protobuf::Arena*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*): error: undefined reference to 'stream_executor::dnn::AlgorithmProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::InternalSerializeWithCachedSizesToArray(unsigned char*) const: error: undefined reference to 'stream_executor::dnn::AlgorithmProto::InternalSerializeWithCachedSizesToArray(unsigned char*) const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:function tensorflow::AutotuneResult::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::AlgorithmProto::ByteSizeLong() const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:descriptor_table_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto_deps: error: undefined reference to 'descriptor_table_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:scc_info_AutotuneResult_FailureResult_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto: error: undefined reference to 'scc_info_AlgorithmProto_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/autotuning_proto_cc_impl/autotuning.pb.o:autotuning.pb.cc:scc_info_AutotuneResult_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto: error: undefined reference to 'scc_info_AlgorithmProto_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function InitDefaultsscc_info_ConvolutionProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto(): error: undefined reference to 'stream_executor::dnn::_TensorDescriptorProto_default_instance_'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function InitDefaultsscc_info_ConvolutionProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto(): error: undefined reference to 'stream_executor::dnn::_ConvolutionDescriptorProto_default_instance_'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::MergeFrom(stream_executor::dnn::TensorDescriptorProto const&)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::MergeFrom(stream_executor::dnn::TensorDescriptorProto const&)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::MergeFrom(stream_executor::dnn::TensorDescriptorProto const&)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto::MergeFrom(stream_executor::dnn::ConvolutionDescriptorProto const&)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::TensorDescriptorProto>(google::protobuf::Arena*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::_TensorDescriptorProto_default_instance_'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::TensorDescriptorProto>(google::protobuf::Arena*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::_TensorDescriptorProto_default_instance_'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::TensorDescriptorProto>(google::protobuf::Arena*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::_TensorDescriptorProto_default_instance_'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::ConvolutionDescriptorProto>(google::protobuf::Arena*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergeFrom(tensorflow::ConvolutionProto const&): error: undefined reference to 'stream_executor::dnn::_ConvolutionDescriptorProto_default_instance_'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::TensorDescriptorProto>(google::protobuf::Arena*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*): error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*): error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*): error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<stream_executor::dnn::ConvolutionDescriptorProto>(google::protobuf::Arena*)'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::InternalSerializeWithCachedSizesToArray(unsigned char*) const: error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::InternalSerializeWithCachedSizesToArray(unsigned char*) const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::InternalSerializeWithCachedSizesToArray(unsigned char*) const: error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::InternalSerializeWithCachedSizesToArray(unsigned char*) const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::InternalSerializeWithCachedSizesToArray(unsigned char*) const: error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::InternalSerializeWithCachedSizesToArray(unsigned char*) const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::InternalSerializeWithCachedSizesToArray(unsigned char*) const: error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto::InternalSerializeWithCachedSizesToArray(unsigned char*) const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::ByteSizeLong() const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::ByteSizeLong() const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::TensorDescriptorProto::ByteSizeLong() const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:function tensorflow::ConvolutionProto::ByteSizeLong() const: error: undefined reference to 'stream_executor::dnn::ConvolutionDescriptorProto::ByteSizeLong() const'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto_deps: error: undefined reference to 'descriptor_table_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:scc_info_ConvolutionProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto: error: undefined reference to 'scc_info_TensorDescriptorProto_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto'
bazel-out/k8-opt/bin/tensorflow/core/protobuf/_objs/conv_autotuning_proto_cc_impl/conv_autotuning.pb.o:conv_autotuning.pb.cc:scc_info_ConvolutionProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto: error: undefined reference to 'scc_info_ConvolutionDescriptorProto_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto'
collect2: error: ld returned 1 exit status
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /tensorflow/tensorflow/lite/python/BUILD:68:10 Middleman _middlemen/tensorflow_Slite_Spython_Stflite_Uconvert-runfiles failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc @bazel-out/k8-opt/bin/tensorflow/python/gen_ragged_math_ops_py_wrappers_cc-2.params
INFO: Elapsed time: 152.054s, Critical Path: 49.12s
INFO: 376 processes: 39 internal, 337 local.
FAILED: Build did NOT complete successfully
```
</details>