Too slow while fetching @llvm-raw repos while building tensorflow from Source
@vishwascm,
Could you please confirm whether the build is failing due to the above issue or the build continued? and also it might be due to the vpn/network you are trying to use. Also try to clear the cache by calling **bazel clean –expunge**
Command prompt must be Run as Admin for the bazel build of TensorFlow to be successful. 

```

bazel build --override_repository="llvm-raw=${LLVM_SRC}" \
  -c opt tensorflow/compiler/mlir:tf-opt
```

As per Bazel [documentation](https://bazel.build/run/build#specifying-build-targets), the target patterns starting with // are resolved relative to the current workspace. The target patterns that do not begin with // are resolved relative to the current working directory.

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

Thank you! Hi @tilakrayal build will continue but only after around 25 mins of fetching llvm-raw repo. And later the build fails, the reason I think is it is downloading and building clang-17. Before building I have specifically mentioned path to use as clang-16 path, even then it is not using clang16. How to solve this issue and use clang16 to build because clang 17 has given build fails for others also. @vishwascm,
Could you please provide the complete error log which helps us to debug/analyse the issue in an effective way. Thank you! @tilakrayal when I use clang 16,  it will still take lot of time fetching llvm-raw repo (around 30 mins), but after that build will be successful.
The error i got when using clang 17 was :
`ERROR: /home/vishwas/tensorflow/tensorflow/python/platform/BUILD:388:17: Linking` `tensorflow/python/platform/_pywrap_tf2.so failed: (Exit 1): clang-17 failed: error executing command (from target //tensorflow/python/platform:_pywrap_tf2.so) 
  (cd /home/vishwas/.cache/bazel/_bazel_vishwas/e4f9045e13254a05e1721bc40c12e4c7/execroot/org_tensorflow && \
  exec env - \
    CLANG_COMPILER_PATH=/usr/bin/clang-17 \
    PATH=/home/vishwas/.cache/bazelisk/downloads/sha256/7f7d2fe44570403c5c0c221259b5afc45f0a4176eeb0440bbaffbce76872599d/bin:/home/vishwas/venv_dir/tf_py311_original/bin:/home/vishwas/.vscode-server/cli/servers/Stable-863d2581ecda6849923a2118d93a088b0745d9d6/server/bin/remote-cli:/home/vishwas/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/vishwas/venv_dir/tf216_perf23/bin/python3 \
    PYTHON_LIB_PATH=/home/vishwas/venv_dir/tf216_perf23/lib/python3.10/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/clang-17 @bazel-out/aarch64-opt/bin/tensorflow/python/platform/_pywrap_tf2.so-2.params)
 Configuration: b7a52e65e2dd57fe1977152f59b9f737f0a4f8ef69a6d625a69816bca0a9acef
 Execution platform: @local_execution_config_platform//:platform
ld.lld: error: version script assignment of 'global' to symbol 'init_pywrap_tf2' failed: symbol not defined
ld.lld: error: version script assignment of 'global' to symbol 'init__pywrap_tf2' failed: symbol not defined
clang-17: error: linker command failed with exit code 1 (use -v to see invocation)
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 4290.793s, Critical Path: 160.70s` @vishwascm,
I suspect the issue is that your tests are looking for a python3 binary. Bazel runs the tests in isolation, you need to make sure the PATH variable used there contains the path to Python & the Bazel you are trying . Also could you test with the python3.11 and let us know if you are facing  the same. Thank you!
### Issue type

Build/Install

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

No

### Source

source

### TensorFlow version

2.16.1

### Custom code

No

### OS platform and distribution

ubuntu 22.04.1 on aarch64 

### Mobile device

_No response_

### Python version

python 3.10.12

### Bazel version

7.1.1

### GCC/compiler version

clang 17.0.2

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

It is taking too much time to fetch repo llvm-raw while building tensorflow from source on aarch64 machine with 32 cores. I have tried using all possible number of cores, from low to high. using  ex: --local_cpu_resources=4. The process gets upto this point
`Loading: 
    Fetching repository @llvm-raw; starting 964s
    Fetching ...c40c12e4c7/external/llvm-raw; Extracting 8697bbe2d4aed109520e83c6beab52196ec5b702.tar.gz 962s
`
and continues like this.
Please help me to solve this issue.
Commands used :
`export ONEDNN_VERBOSE=1`
`export TF_ENABLE_ONEDNN_OPTS=1`
`export CC="/usr/local/bin/clang"`
`export CXX="/usr/local/bin/clang++"`
`export TF_PYTHON_VERSION=3.10` 
` bazel build -s --config=mkl_aarch64 --features=-layering_check --copt=-O3 --copt=-march=armv8-a+sve --copt=-msve-vector-bits=256  --local_cpu_resources=16 //tensorflow/tools/pip_package:build_pip_package --verbose_failures `

### Standalone code to reproduce the issue

```shell
Commands used :
`export ONEDNN_VERBOSE=1`
`export TF_ENABLE_ONEDNN_OPTS=1`
`export CC="/usr/local/bin/clang"`
`export CXX="/usr/local/bin/clang++"`
`export TF_PYTHON_VERSION=3.10` 
` bazel build -s --config=mkl_aarch64 --features=-layering_check --copt=-O3 --copt=-march=armv8-a+sve --copt=-msve-vector-bits=256  --local_cpu_resources=16 //tensorflow/tools/pip_package:build_pip_package --verbose_failures `
```


### Relevant log output

```shell
`Loading: 
    Fetching repository @llvm-raw; starting 964s
    Fetching ...c40c12e4c7/external/llvm-raw; Extracting 8697bbe2d4aed109520e83c6beab52196ec5b702.tar.gz 962s`
```
