Jetpack 6.2 cross compilation problem

Hi,

I use aarch64–glibc–stable-2022.08-1.tar.bz2 toolchain from Nvidia for build my app, but there is error:

libnvinfer.so: undefined reference to `std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.30'

I found, that Nvidia provide docker solution for this, but “normal” cross compiler is better way for my project. So, where I can find 11.4 cross toolchain?

Thanks.

Hi,
The tool is for building kernel image. If you would like to build applications, please refer to

Jetson Linux API Reference: Setting Up Cross-Platform Support | NVIDIA Docs

Hi DaneLLL,

As you mention, pt.1-4 is about using cross toolchain that doesn’t works:

undefined reference to `__scalbn'
undefined reference to `std::__exception_ptr::exception_ptr::_M_release()@CXXABI_1.3.13'
undefined reference to `std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.30'
and more

Pt. 5 (docker) as option.
In addition, refer to Developer guide:

NVIDIA® specifies the Bootlin `gcc` 11.3.0 2022.08-1 aarch64 toolchain for the following options:

* Cross-compiling applications to run on this release of NVIDIA® Jetson™ Linux.

So, it’s not for kernel only.

you may post your board system info, like jetpack version. the error is due to lower glibcxx version of your cross toolchain than the one libnvinfer.so linked. you may use a higher version of toolchain, in my case i use aarch64–glibc–stable-2023.08-1

L4T 36.4.3 Jetpack 6.2

I tried a lot of different tooclhains from Linaro and bootlin, no success.
In case aarch64–glibc–stable-2023.08-1 I have error:
libstdc++.so: undefined reference to arc4random@GLIBC_2.36

Hi,
You would need to construct the environment on AGX Orin, clone the rootfs out, and mount to your host. Please check the steps for detail.

Hi,

I unpack BSP, rootfs, apply_binaries.sh and install.sh from ConnectTech. For toolchain I set sys_root to rootfs.
I think, it’s same like AGX Orin cloning. I’m right?
This way works for me for L4T 32.7 and 35.3. But not for L4T 36.4.

Hi,
Certain packages are not installed/included in default rootfs. Suggest compile the application on developer kit successfully first, and then clone the rootfs out.

Hi,

Can you provide list of such packages? It’s important, because we want to use it in CI (build sys_root and cache it for next compiles).

Thanks.

Hi,
It is uncertain what aarch64 packages are required for building the app. Please build it on developer kit.

Hi,

I have all required packages installed in my rootfs.
However, I tried to compile app with cloned rootfs. I clone Orin NX 36.4 (because I don’t have AGX right now) via l4t_backup_restore.sh tool. After that I unpack nvme0n1p1.tar.zst and change my sys_root to new path.

No changes, same errors still exists.

Hi,
If the application has dependency to later version of gcc, please use docker as suggested in
Jetson AGX Orin JetPack6.0 cross compile failed - #3 by AastaLLL

Hi,

Application not require latest gcc and built successfully with L4T 32.7 (gcc 7.5.0) and L4T 35.3 (gcc 9.3.0).
Problem with docker in container size: >50Gb after unpacking.
It looks like TensorRT 10.3 for L4T 36.4 was built with latest compiler, not 11.3 toolchain as Nvidia suggest in docs.

Any updates?

Hi,
We would suggest use docker. ~50GB of size should be fine for a host PC.

Hi,

So, docker is only option for cross-compiling even if the documentation says otherwise?

Hi,
The gcc toolchain is mainly for building kernel. We will check with our teams and make correction to document.

Hi,
It’s very sad. I hope that Nvidia will prepare cross toolchain for building apps.

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