Tensorflow fails to compile on Lubuntu 22.04.3
Hy try those....

1) Upgrade gcc-9 to gcc-11.
2) Install protobuf " pip install protobuf "
3) Install jdk-8 or jdk-11 anyone.

Then again try to install. Is this using the docker install?

If so, using devel-gpu, I cannot install gcc-11 and protobuff is already installed. Ubuntu 20 is installed by devel-gpu.  @cuchio, 

The error seems related to protobuf. COuld you please check the protobuf version installed and confirm us. Please find the supported protobuf versions for TF2.13v below.

`'protobuf>=3.20.3,<5.0.0dev,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5',`

Also, Just to inform you that from Tf2.13v onwards we are using Clang16 as compiler which is replacement of GCC and it's our official tested configuration. Is that possible to use Clang instead of GCC ?

Thank you! I assume this is using the docker install?

Note I have changed to devel-gpu as this is my aim. The command is as 

docker run --gpus all -it -w /tensorflow_src -v $PWD:/mnt -e HOST_PERMS="$(id -u):$(id -g)" \
    tensorflow/tensorflow:devel-gpu bash

I changed /tensorflow to /tensorflow_src.

Then git pull to pull, I assume, the latest build.

Protobuf version is 3.20.3

Running configure produces the following. I have left all as default except for CUDA (7.5 for my GPU). Leaving this as default does not change the following.

As you can see the clang directory is not visible.

Thanks for your help.

-----

You have bazel 6.1.0 installed.
Please specify the location of python. [Default is /usr/bin/python3]: 


Found possible Python library paths:
  /usr/lib/python3/dist-packages
  /usr/local/lib/python3.8/dist-packages
Please input the desired Python library path to use.  Default is [/usr/lib/python3/dist-packages]

Do you wish to build TensorFlow with ROCm support? [y/N]: 
No ROCm support will be enabled for TensorFlow.

Found CUDA 11.2 in:
    /usr/local/cuda-11.2/targets/x86_64-linux/lib
    /usr/local/cuda-11.2/targets/x86_64-linux/include
Found cuDNN 8 in:
    /usr/lib/x86_64-linux-gnu
    /usr/include
Found TensorRT 7.2.2 in:
    /usr/lib/x86_64-linux-gnu
    /usr/include/x86_64-linux-gnu


Please specify a list of comma-separated CUDA compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. Each capability can be specified as "x.y" or "compute_xy" to include both virtual and binary GPU code, or as "sm_xy" to only include the binary code.
Please note that each additional compute capability significantly increases your build time and binary size, and that TensorFlow only supports compute capabilities >= 3.5 [Default is: 3.5,7.0]: 7.5


Do you want to use clang as CUDA compiler? [Y/n]: Y
Clang will be used as CUDA compiler.

Please specify clang path that to be used as host compiler. [Default is ]: 




 @cuchio  If you see your Python path that path. That means you need to install or upgrade some pkg. You don't have Clang installed that's why your Clang path default was empty.

1. Install or upgrade gcc-9 to gcc-11 "use sudo apt install"
2. Install or upgrade protobuf **remember version protobuf>=3.20.3,<5.0** "use pip install or conda install"
3. Install or upgrade Clang-16 "use pip install or conda install" @sparrow84001 In the docker container I assume? 

I ask as I already have these installed on my machine and versions are correct.

Also, when in the container, I am not able to change to see or change different versions of tensorflow. git pull works though.

git ls-remote tensorflow . 
fatal: 'tensorflow' does not appear to be a git repository @cuchio Yes in docker container. Use " apt install clang " Seeing changes made in tensorflow today I installed the supported cuda,cudnn and clang packages today.

cuda toolkit 12.2,
libcudnn8  8.9.4.25-1+cuda12.2
llvm 17.

Cuda toolkit 12.1 was also installed for tensorRT. I also installed python3.9

All installations done with apt-get.

Running configure is fine except that is does not see or allow selection of CUDA 12.2 (see output below). My docker system has the cuda-toolkit 11.1, 11.2, 12.1 and 12.2. 

Can this be fixed by manually editing the .tf_configure.bazelrc to only contain the 12.2 paths? 

See below the contents of this file on my system as created by ./configure

./configure
You have bazel 6.1.0 installed.
Please specify the location of python. [Default is /usr/bin/python3]: /usr/bin/python3.9


Found possible Python library paths:
  /usr/lib/python3/dist-packages
  /usr/local/lib/python3.9/dist-packages
Please input the desired Python library path to use.  Default is [/usr/lib/python3/dist-packages]

Do you wish to build TensorFlow with ROCm support? [y/N]: 
No ROCm support will be enabled for TensorFlow.

Found CUDA 11.2 in:
    /usr/local/cuda-11.2/targets/x86_64-linux/lib
    /usr/local/cuda-11.2/targets/x86_64-linux/include
Found cuDNN 8 in:
    /usr/lib/x86_64-linux-gnu
    /usr/include
Found TensorRT 8.6.1 in:
    /usr/lib/x86_64-linux-gnu
    /usr/include/x86_64-linux-gnu

Please specify a list of comma-separated CUDA compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. Each capability can be specified as "x.y" or "compute_xy" to include both virtual and binary GPU code, or as "sm_xy" to only include the binary code.
Please note that each additional compute capability significantly increases your build time and binary size, and that TensorFlow only supports compute capabilities >= 3.5 [Default is: 3.5,7.0]: 7.5

Do you want to use clang as CUDA compiler? [Y/n]: Y
Clang will be used as CUDA compiler.

Please specify clang path that to be used as host compiler. [Default is /usr/lib/llvm-17/bin/clang]: 

You have Clang 17.0.0 installed.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]: 

Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: 
Not configuring the WORKSPACE for Android builds.


Following is the .tf_configure.bazelrc contents.

build --action_env PYTHON_BIN_PATH="/usr/bin/python3.9"
build --action_env PYTHON_LIB_PATH="/usr/lib/python3/dist-packages"
build --python_path="/usr/bin/python3.9"
build --config=tensorrt
build --action_env TF_CUDA_VERSION="11.2"
build --action_env TF_CUDNN_VERSION="8"
build --action_env CUDA_TOOLKIT_PATH="/usr/local/cuda-11.2"
build --action_env TF_CUDA_COMPUTE_CAPABILITIES="7.5"
build --action_env LD_LIBRARY_PATH="/usr/local/cuda-11.0/targets/x86_64-linux/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/include/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64/stubs:/usr/local/cuda-11.0/lib64:/usr/local/cuda-11.2/lib64"
build --config=cuda_clang
build --action_env CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-17/bin/clang"
build --config=cuda_clang
build:opt --copt=-Wno-sign-compare
build:opt --host_copt=-Wno-sign-compare
test --test_size_filters=small,medium
test --test_env=LD_LIBRARY_PATH
test:v1 --test_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-no_gpu,-oss_serial
test:v1 --build_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-no_gpu
test:v2 --test_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-no_gpu,-oss_serial,-v1only
test:v2 --build_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-no_gpu,-v1only
 I think I may have found a partial reason for the fault. 

In short, after looking at the .bazelrc file I saw the following line.

build:cuda_clang_official --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-12.2"
build:unsupported_gpu_linux --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-11.2"

Therefore I think my gpu card is not being recognised and hence 11.2 is selected.

However, nvidia-smi produced:

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.05             Driver Version: 535.104.05   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce GTX 1650        On  | 00000000:01:00.0  On |                  N/A |
| 26%   33C    P8               9W /  75W |    220MiB /  4096MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
+---------------------------------------------------------------------------------------+

Also,

1) The test mnistCUDNN from the cudnn_samples_v8 also was OK and 
2) nvcc -- version produced 12.2

Therefore, I have manually changed the configuration paths to 12.2. However it still fails to build. I think this may have to do with clang as a it suggests sending a bug report to llvm. However, could it also be caused by the configuration setup being incorrect.

The .tf_configure.bazelrc file is as follows

build --action_env PYTHON_BIN_PATH="/usr/bin/python3.9"
build --action_env PYTHON_LIB_PATH="/usr/lib/python3/dist-packages"
build --python_path="/usr/bin/python3.9"
build --config=tensorrt
build --action_env TF_CUDA_VERSION="12.2"
build --action_env TF_CUDNN_VERSION="8"
build --action_env CUDA_TOOLKIT_PATH="/usr/local/cuda-12.2"
build --action_env TF_CUDA_COMPUTE_CAPABILITIES="7.5"
build --action_env LD_LIBRARY_PATH="/usr/local/cuda-12.2/lib64:/usr/local/cuda-12.2/targets/x86_64-linux/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/include/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64/stubs"
build --config=cuda_clang
build --action_env CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-17/bin/clang"
build --config=cuda_clang
build:opt --copt=-Wno-sign-compare
build:opt --host_copt=-Wno-sign-compare
test --test_size_filters=small,medium
test --test_env=LD_LIBRARY_PATH
test:v1 --test_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-no_gpu,-oss_serial
test:v1 --build_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-no_gpu
test:v2 --test_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-no_gpu,-oss_serial,-v1only
test:v2 --build_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-no_gpu,-v1only

The dump is as follows

ERROR: /root/.cache/bazel/_bazel_root/43801f1e35f242fb634ebbc6079cf6c5/external/com_google_protobuf/BUILD.bazel:364:11: Compiling src/google/protobuf/compiler/cpp/service.cc [for tool] failed: (Segmentation fault): clang failed: error executing command (from target @com_google_protobuf//:protoc_lib) /usr/lib/llvm-17/bin/clang -MD -MF bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/_objs/protoc_lib/0/service.d ... (remaining 49 arguments skipped)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/lib/llvm-17/bin/clang -MD -MF bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/_objs/protoc_lib/0/service.d -frandom-seed=bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/_objs/protoc_lib/0/service.o -DBAZEL_CURRENT_REPOSITORY=\"com_google_protobuf\" -iquote external/com_google_protobuf -iquote bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf -iquote external/zlib -iquote bazel-out/k8-opt-exec-50AE0418/bin/external/zlib -isystem external/com_google_protobuf/src -isystem bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/src -isystem external/zlib -isystem bazel-out/k8-opt-exec-50AE0418/bin/external/zlib -fmerge-all-constants -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -fPIE -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -fstack-protector -Wall -Wno-invalid-partial-specialization -fno-omit-frame-pointer -no-canonical-prefixes -DNDEBUG -g0 -O2 -ffunction-sections -fdata-sections --cuda-path=/usr/local/cuda-12.2 -g0 -w -Wno-sign-compare -g0 -std=c++17 -DHAVE_ZLIB -Woverloaded-virtual -Wno-sign-compare -c external/com_google_protobuf/src/google/protobuf/compiler/cpp/service.cc -o bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/_objs/protoc_lib/0/service.o
1.      <eof> parser at end of file
2.      Optimizer
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.

Thanks for your help. I will also send a report to llvm. @cuchio ,

As bazelrc suggests to use cuda toolkit 12.2 at path `/usr/local/cuda-12.2`, could you tried installing cuda toolkit 12.2 and ensure that it exists in the specified path.

From your .configure setting it seems you have cuda 11.2 installed. Could you please confirm you have upgraded to 12.2 version ? 

Also please ignore the CUDA toolkit versions displayed in CUDA driver info. As per my knowledge it displays cuda version compatible with that driver and tensorflow won't access it. Hi,

Yes I have cuda toolkit 12.2 installed in Docker and I have it in my path.

As an alternative, today I tried to build on my root machine i.e. not using Docker. Instead, in a Python venv. Cuda toolkit-12.2 and 12.1 (for tensorrt) installed. llvm 17. This worked better in that it selected the 12.2 path. The build still fails, which I think is due to llvm 17 dependencies. I will try to resolve tomorrow with the latest and an earlier tensorflow version (pre llvm).

A question regarding llvm. For the Docker build I chose the Ubuntu 20.04 version (as the image was clearly Ubuntu 20).  For the other venv method I installed the 22.04 as that is what is on my machine. Is this correct, especially for the Docker build?

Having these problems raises another question. My motherboard is old (2008), which is why I need to compile tensorflow. Could the age be a factor in other ways such as an old bios? I assume not given Linux's back compatibility. Hi @cuchio ,

> As an alternative, today I tried to build on my root machine i.e. not using Docker. Instead, in a Python venv. Cuda toolkit-12.2 and 12.1 (for tensorrt) installed. llvm 17. This worked better in that it selected the 12.2 path. The build still fails, which I think is due to llvm 17 dependencies. I will try to resolve tomorrow with the latest and an earlier tensorflow version (pre llvm).

You need to use LLVM16 for compilation.Please refer attached documentation [here](https://www.tensorflow.org/install/source#install_clang_recommended_linux_only).

> A question regarding llvm. For the Docker build I chose the Ubuntu 20.04 version (as the image was clearly Ubuntu 20). 
For the other venv method I installed the 22.04 as that is what is on my machine. Is this correct, especially for the Docker build?

I don't think it should be a problem as long as you maintained the environment accordingly.

> Having these problems raises another question. My motherboard is old (2008), which is why I need to compile tensorflow. Could the age be a factor in other ways such as an old bios? I assume not given Linux's back compatibility.

You CPU has to support AVX instructions set as tensorflow built on it.

Thanks! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61845">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61845">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

Latest

### Custom code

Yes

### OS platform and distribution

Linux Lubuntu 22.04.3

### Mobile device

_No response_

### Python version

3.9

### Bazel version

6.1

### GCC/compiler version

gcc-9

### CUDA/cuDNN version

_No response_

### GPU model and memory

1650 4Gb

### Current behavior?

I have tried to compile tensorflow using Docker following the instructions at 

https://www.tensorflow.org/install/source#linux

I installed the python and clang libraries but did not do the pip install as I assume they are not needed for Docker installation (is this correct?). Also, I checked the Lubuntu installation for these Python libraries (all appear present).

Initially I compiled with devel-gpu. Later tried with devel (cpu only).

In the configuration step the clang library was not visible. So I chose not to use it  as I understand it has problems and gcc should work.

bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package was run. Downloading and compilation started and ran for some time before failing. 

Following are the messages prior to failure:

bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
INFO: Reading 'startup' options from /tensorflow_src/.bazelrc: --windows_enable_symlinks
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=87
INFO: Reading rc options for 'build' from /tensorflow_src/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /tensorflow_src/.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 --features=-force_no_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
INFO: Reading rc options for 'build' from /tensorflow_src/.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: Found applicable config definition build:short_logs in file /tensorflow_src/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /tensorflow_src/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:opt in file /tensorflow_src/.tf_configure.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare
INFO: Found applicable config definition build:linux in file /tensorflow_src/.bazelrc: --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=-Wno-error=array-parameter --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 /tensorflow_src/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
INFO: Build options --action_env and --define have changed, discarding analysis cache.
WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (0 packages loaded, 43182 targets configured).
INFO: Found 1 target...
ERROR: /tensorflow_src/tensorflow/core/protobuf/BUILD:175:17: Compiling tensorflow/core/protobuf/tensor_bundle.pb.cc [for tool] failed: (Exit 1): gcc failed: error executing command (from target //tensorflow/core/protobuf:for_core_protos_cc_impl) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 41 arguments skipped)
during GIMPLE pass: store-merging
In file included from external/com_google_protobuf/src/google/protobuf/unknown_field_set.h:53,
                 from external/com_google_protobuf/src/google/protobuf/generated_message_reflection.h:47,
                 from bazel-out/k8-opt-exec-50AE0418/bin/tensorflow/core/protobuf/tensor_bundle.pb.h:28,
                 from bazel-out/k8-opt-exec-50AE0418/bin/tensorflow/core/protobuf/tensor_bundle.pb.cc:4:
external/com_google_protobuf/src/google/protobuf/parse_context.h: In function 'const char* google::protobuf::internal::VarintParse(const char*, T*) [with T = long unsigned int]':
external/com_google_protobuf/src/google/protobuf/parse_context.h:538:32: internal compiler error: Segmentation fault
  538 | PROTOBUF_NODISCARD const char* VarintParse(const char* p, T* out) {
      |                                ^~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
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: 673.078s, Critical Path: 52.90s
INFO: 1362 processes: 22 internal, 1340 local.
FAILED: Build did NOT complete successfully









### Standalone code to reproduce the issue

```shell
docker pull tensorflow/tensorflow:devel

docker run -it -w /tensorflow_src -v $PWD:/mnt -e HOST_PERMS="$(id -u):$(id -g)" tensorflow/tensorflow:devel bash

./configure

You have bazel 6.1.0 installed.
Please specify the location of python. [Default is /usr/bin/python3]: 

Found possible Python library paths:
  /usr/lib/python3/dist-packages
  /usr/local/lib/python3.8/dist-packages
Please input the desired Python library path to use.  Default is [/usr/lib/python3/dist-packages]

Do you wish to build TensorFlow with ROCm support? [y/N]: 
No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: 
No CUDA support will be enabled for TensorFlow.

Do you want to use Clang to build TensorFlow? [Y/n]: n
GCC will be used to compile TensorFlow.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]: 

Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: 
Not configuring the WORKSPACE for Android builds.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
        --config=mkl            # Build with MKL support.
        --config=mkl_aarch64    # Build with oneDNN and Compute Library for the Arm Architecture (ACL).
        --config=monolithic     # Config for mostly static monolithic build.
        --config=numa           # Build with NUMA support.
        --config=dynamic_kernels        # (Experimental) Build kernels into separate shared objects.
        --config=v1             # Build with TensorFlow 1 API instead of TF 2 API.
Preconfigured Bazel build configs to DISABLE default on features:
        --config=nogcp          # Disable GCP support.
        --config=nonccl         # Disable NVIDIA NCCL support.
Configuration finished

git pull

bazel build --config=opt --config=v2 //tensorflow/tools/pip_package:build_pip_package
```


### Relevant log output

_No response_