Building 2.9.1 GPU from source

Hi all,

I am trying to build Tensorflow 2.9.1 from source with GPU suport, here are the version details:
gcc version 9.3.0
Cuda compilation tools, release 11.3, V11.3.109, Build cuda_11.3.r11.3/compiler.29920130_0
Bazel 5.2.0
Binutils 2.35

However i seem to be run into this error everytime I try call bazel build:

/usr/bin/ld: (_muldi3.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: (_muldi3.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: (_popcountsi2.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: (_popcountsi2.o): unable to initialize decompress status for section .debug_info
libgcc.a: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status
Target //tensorflow/tools/pip_package:build_pip_package failed to build

I know this has something to do with a mismatch between binutils and gcc, but they look rite to me? Does someone have any sugestions to proceed with build?

Hi @Babar_Mehta

Welcome to the TensorFlow Forum!

Could you please verify the installed TensorFlow , Python, Bazel, CUDA and cuDNN version are compatible as per this tested build configuration? Please refer to the TensorFlow official doc for build tensorflow from source and follow the instructed steps as per your system OS to build TF form source.

Let us know if the issue still persists. Thank you.