MLIR: TF-OPT build fails for tensorflow 2.10, 2.14 
Hi @monowaranjum ,

Could you please check these [instructions](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/README.md) to build with MLIR.

You need to add a BUILD.bazel  file in the LLVM directory like below which seems causing the issue.

```
LLVM_SRC=... # this the path to the LLVM local source directory you intend to use.
touch ${LLVM_SRC}/BUILD.bazel ${LLVM_SRC}/WORKSPACE
```

`bazel build --override_repository="llvm-raw=${LLVM_SRC}" -c opt tensorflow/compiler/mlir:tf-opt` Hi, I tried your recommended solution. I could not get it to work. It only worked when I removed the bazel overlay. The command that worked for me was: ```bazel build -c opt <build target>```.  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/62418">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/62418">No</a>

### Issue type

Build/Install

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

No

### Source

source

### TensorFlow version

2.10, 2.14

### Custom code

Yes

### OS platform and distribution

Ubuntu 22.04

### Mobile device

_No response_

### Python version

3.10

### Bazel version

5.1.1

### GCC/compiler version

gcc-11, clang-14

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

tf-opt build fails. It fails to download some of the files and throws java.io.FileNotFoundException and then after a while it just shows the build failed error. 

I am using bazelisk for bazel version management and the version being used for tf branch rc2.10 is 5.1.1. 

Python version is 3.10 . 

### Standalone code to reproduce the issue

```shell
LLVM_SRC=... # this the path to the LLVM local source directory you intend to use.
LLVM_BAZEL_OVERLAY=${LLVM_SRC}/bazel # Note: this can be anywhere
mkdir -p ${LLVM_BAZEL_OVERLAY}
# This will symlink your LLVM sources with the BUILD files to be usable by Bazel.
python ${LLVM_SRC}/utils/bazel/overlay_directories.py \
    --src ${LLVM_SRC} \
    --overlay ${LLVM_SRC}/utils/bazel/llvm-project-overlay/ \
    --target ${LLVM_BAZEL_OVERLAY}
touch ${LLVM_BAZEL_OVERLAY}/BUILD.bazel ${LLVM_BAZEL_OVERLAY}/WORKSPACE
# The complete list is "AArch64", "AMDGPU", "ARM", "NVPTX", "PowerPC", "RISCV", "SystemZ", "X86"
echo 'llvm_targets = ["X86"]' > ${LLVM_BAZEL_OVERLAY}/llvm/targets.bzl

```
Then I run the bazel command: 

```
bazel build --override_repository=llvm-project=$LLVM_BAZEL_OVERLAY \
  -c opt tensorflow/compiler/mlir:tf-opt
```
```


### Relevant log output

```shell
Expected the build process to complete and build tf-opt target. Here is the error log:


bazel build --override_repository=llvm-project=$LLVM_BAZEL_OVERLAY \
  -c opt tensorflow/compiler/mlir:tf-opt
2023/11/17 14:51:11 Downloading https://releases.bazel.build/5.1.1/release/bazel-5.1.1-linux-x86_64...
Downloading: 49 MB out of 49 MB (100%) 
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=133
INFO: Reading rc options for 'build' from /home/rashik/Documents/onnx-mlir/virtual_env/tf2onnx-env/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /home/rashik/Documents/onnx-mlir/virtual_env/tf2onnx-env/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=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 --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/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/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/rashik/Documents/onnx-mlir/virtual_env/tf2onnx-env/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /home/rashik/Documents/onnx-mlir/virtual_env/tf2onnx-env/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:linux in file /home/rashik/Documents/onnx-mlir/virtual_env/tf2onnx-env/tensorflow/.bazelrc: --copt=-w --host_copt=-w --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 --distinct_host_configuration=false --experimental_guard_against_concurrent_changes
INFO: Found applicable config definition build:dynamic_kernels in file /home/rashik/Documents/onnx-mlir/virtual_env/tf2onnx-env/tensorflow/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/tensorflow/runtime/archive/6ca793b5d862ef6c50f242d77a811f06cce9b60a.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/0538e5431afdb1fa05bdcedf70ee502ccfcd112a.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
ERROR: Skipping 'tensorflow/compiler/mlir:tf-opt': no such package 'tensorflow/compiler/mlir/tensorflow/compiler/mlir': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
 - /home/rashik/Documents/onnx-mlir/virtual_env/tf2onnx-env/tensorflow/tensorflow/compiler/mlir/tensorflow/compiler/mlir
WARNING: Target pattern parsing failed.
ERROR: no such package 'tensorflow/compiler/mlir/tensorflow/compiler/mlir': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
 - /home/rashik/Documents/onnx-mlir/virtual_env/tf2onnx-env/tensorflow/tensorflow/compiler/mlir/tensorflow/compiler/mlir
INFO: Elapsed time: 37.349s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)


```
```
