Build tensorflow-2.11.0 failing on rhel 7.9 with gcc 9.3.1

Trying to build tensorflow from source using this specific version of build tools, that shows compatiable with tensorflow 2.11.0
Build system is RHEL 7.9,
tensorflow-2.11.0 python 3.9.16 GCC 9.3.1(devtoolset-9) Bazel 5.3.0 cudnn8.1 cuda11.2

Here is what I am doing:
tensorflow-2.11.0 3.9
conda create -n tensorflow-build python=3.9

conda activate tensorflow-build

pip install pip numpy wheel packaging requests opt_einsum
pip install keras_preprocessing --no-deps.16 GCC 9.3.1 Bazel 5.3.0 8.1 11.2
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-amd64

sudo mv bazelisk-linux-amd64 /usr/local/bin/bazelisk

export PATH=/usr/local/bin:$PATH

export USE_BAZEL_VERSION=5.3.0

bazelisk --version
bazel 5.3.0
wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run
sudo sh cuda_11.2.2_460.32.03_linux.run
obtain: https://developer.nvidia.com/compute/machine-learning/cudnn/secure/8.1.0.77/11.2_20210127/cudnn-11.2-linux-x64-v8.1.0.77.tgz
sudo tar cudnn-11.2-linux-x64-v8.1.0.77.tgz -C /usr/local
export PATH=/usr/local/cuda-11.2/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda
unzip tensorflow-2.11.0.zip

enable gcc 9.3.1

source /opt/rh/devtoolset-9/enable

cd tensorflow-2.``.0
./configure # keeping defaults, select ‘y’ to include cuda
bazelisk build --config=cuda //tensorflow/tools/pip_package:build_pip_package
ERROR: /u02/tensorflow-2.11.0/tensorflow/compiler/mlir/tensorflow/BUILD:452:11: Compiling tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -MD -MF … (remaining 241 arguments skipped)

gcc: fatal error: Killed signal terminated program cc1plus

compilation terminated.

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: 11001.137s, Critical Path: 182.34s

INFO: 13236 processes: 5846 internal, 7390 local.

FAILED: Build did NOT complete succes
Did it multiple times and keeps failing with the above error.sThis configuration matches:

fullytensorflow-2.11.0 3.7-3.10 GCC 9.3.1 Bazel 5.3.0 8.1

Any help would be greatly appreciated 11.2