How to Resolve Bazel and Clang Installation Issues on Jetson Orin NX for TensorFlow 2.16.1

I am a complete beginner with TensorFlow and Bazel. My goal is to build an application that currently runs on a Jetson TX2 with TensorFlow 1.13.1 and migrate it to a Jetson Orin NX running JetPack 6. I learned that JetPack 6 is compatible with TensorFlow 2.16.1. To build TensorFlow 2.16.1, I need Bazel 6.5.0 and Clang 17.0.6.

I followed the official TensorFlow source installation guide here to install Bazel 6.5.0 but consistently encountered the error “unable to locate package bazel.” I was able to install TensorFlow 2.16.1 using NVIDIA’s guide , but I am now stuck with the Bazel and Clang installation issue. Could you please help me resolve this problem? Any advice or guidance would be greatly appreciated.

Hi,

Bazel and Clang are used for compiling TensorFlow.
If the TensorFlow is installed in your environment, you should not need the tool anymore.

To install these tools, please find the below topic for more info:

Thanks.

Thank you for the information. I have a few additional questions:

in the Jetson TX2 environment, we used TensorFlow 1.13.1 and built our application code within the TensorFlow directory using Bazel 0.19.2. Can we use the same setup with JetPack 6, or is it mandatory to use TensorFlow 2.16.1 with Bazel 6.5.0? if yes ,Is it possible to use any version of Bazel to build application code with TensorFlow 1.13.1?

Just to clarify, we are not using Clang or Bazel to build TensorFlow itself; we intend to use Bazel specifically to build our application code that integrates with TensorFlow.

Hi,

JetPack 6 use CUDA 12.
TensorFlow 1.13 doesn’t support CUDA 12 so you might need to use 2.16 to avoid compatibility.

Thanks.

Here’s the rephrased version of your message:

"Apologies for the late reply. To clarify what we’re trying to do: In TensorFlow 1.13.1, we used to place our codebase inside tensorflow-1.13.1/tensorflow/main_folder and build it with Bazel by setting main_folder as the target. This setup has worked fine until now. Currently, we want to achieve the same thing on Jetpack 6. From some sources, we learned that Jetpack 6 supports TensorFlow 2.16.1, and to build it, we need Clang 17.06 and Bazel 6.5.0.

We’re a bit confused about how to set this up, particularly how to configure the build to use Clang as the compiler and LLD as the linker, instead of GCC and the default ld linker. When we attempted to build using the pre-installed GCC compiler and ld linker, we encountered many errors during the linking stage. We suspect the issue might be due to using GCC, and that we may need to switch to Clang 17 and LLD. Can you confirm if this is the case?"

Let me know if you’d like to make any more adjustments!

Hi,

Could you checked the topic shared on Sep 4?

The user set Bazel 6.5.0 and Clang 17.0.6 in order to build TensorFlow 2.17.
So the steps and information should be helpful for your use case.

Thanks.

Thanks following your suggestion i was able to ressolve my issue

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.