Source build: error loading package '@local_config_nccl//'
@adamjstewart Please ensure NCCL is correctly installed and accessible on your system. This error suggests the @local_config_nccl// package isn't loaded, which often happens if NCCL libraries are missing or not configured properly.
Thank you! It should be. We're setting:
```bash
export NCCL_HDR_PATH=<prefix>/include
export NCCL_INSTALL_PATH=<prefix>
export TF_NCCL_VERSION=2
```
Not sure how to debug whether or not NCCL is configured properly, but the PyTorch build succeeds with the same NCCL installation. Any other env vars we should set to help Bazel find NCCL? @adamjstewart You might need to set environment variables like NCCL_HOME or NCCL_LIBRARY_DIR to point to the NCCL installation directory. Thank you! Unfortunately this didn't help, the outcome is the same:

* [build log](https://github.com/tensorflow/tensorflow/files/14261254/spack-build-out.txt)
* [build env](https://github.com/tensorflow/tensorflow/files/14261256/spack-build-env-mods.txt)

Based on the build log, it looks like NCCL is correctly detected (both before and after adding these new env vars). This seems to have been broken in commit a089c4b2777dcd2f88f55229b920102f10264427, reverting it seems to fix at least this problem. I don't work on TensorFlow, please don't assign TensorFlow issues to me. I'll also note that commit is from October (it's far too late to revert it) and essential for JAX, so someone from the TF team will need to figure out what's going on. We can't revert it without breaking JAX releases. > @adamjstewart Please ensure NCCL is correctly installed and accessible on your system. This error suggests the @local_config_nccl// package isn't loaded, which often happens if NCCL libraries are missing or not configured properly. Thank you!

I ran into same error yesterday. I'm using NCCL 2.20.3-1 installed using local deb repo for Ubuntu 22.04 according to the very simple instructions posted on NVIDIA website. 

```
dpkg -i nccl-local-repo-ubuntu2204-2.20.3-cuda12.3_1.0-1_amd64.deb
apt install libnccl2=2.20.3-1+cuda12.3 libnccl-dev=2.20.3-1+cuda12.3
```

 Building a newer version, or with newer CUDA, seems to do the trick! 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/62930">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/62930">No</a>

### Issue type

Build/Install

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

No

### Source

source

### TensorFlow version

2.15.0

### Custom code

No

### OS platform and distribution

Linux Ubuntu 22.04

### Mobile device

_No response_

### Python version

3.11.6

### Bazel version

6.1.0

### GCC/compiler version

GCC 11.4.0

### CUDA/cuDNN version

CUDA 11.8.0, cuDNN 8.9.7.29-11

### GPU model and memory

CUDA arch 80

### Current behavior?

When I try to build TF 2.15 with CUDA support, Bazel crashes with the following error message:
```
ERROR: /tmp/root/spack-stage/spack-stage-py-tensorflow-2.15.0-quhwfp323rasnmbciyohvdpehay7zlxo/spack-src/tensorflow/tools/pip_package/BUILD:203:10: error loading package '@local_config_nccl//': Label '//tensorflow/platform/default:cuda_build_defs.bzl' is invalid because 'tensorflow/platform/default' is not a package; perhaps you meant to put the colon here: '//tensorflow:platform/default/cuda_build_defs.bzl'? and referenced by '//tensorflow/tools/pip_package:licenses'
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted:
```
This issue does not occur when I build for CPU or ROCm.

### Standalone code to reproduce the issue

```shell
git clone https://github.com/adamjstewart/spack.git
git switch packages/tf
. spack/share/spack/setup-env.sh
spack install py-tensorflow+cuda cuda_arch=80
```


### Relevant log output

* [build log](https://github.com/tensorflow/tensorflow/files/14222381/spack-build-out.txt)
* [build env](https://github.com/tensorflow/tensorflow/files/14222380/spack-build-env-mods.txt)
