I just viewed the discussion, and navigated to the following document: tensorflow/CONTRIBUTING.md at master · tensorflow/tensorflow · GitHub 2. In the document, it is pointed out that " the --config=dbg option is not officially supported".
I used the following command to build the source code of v2.4: “bazel build --config=cuda --config=dbg //tensorflow/tools/pip_package:build_pip_package”, and I got an error message:
ERROR: /tensorflow/tensorflow/BUILD:724:1: Linking of rule ‘//tensorflow:libtensorflow_framework.so.2.4.4’ failed (Exit 1)
/usr/bin/ld: bazel-out/k8-dbg/bin/tensorflow/stream_executor/cuda/libcublas_plugin.lo(cuda_blas.pic.o): relocation R_X86_64_PC32 against undefined symbol `_ZN15stream_executor3gpu12_GLOBAL__N_120CUDABlasLtMatmulPlan14kMaxBatchCountE’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
Target //tensorflow/tools/pip_package:build_pip_package failed to build.