Cross-compiling when using custom libraries

Please provide the following info (tick the boxes after creating this topic):
Software Version
[*] DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)

Target Operating System
[*] Linux

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
[*] DRIVE AGX Orin Developer Kit (not sure its number)

SDK Manager Version

Host Machine Version
[*] native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers


Within my application I am using the open source library vsomeip (GitHub - COVESA/vsomeip: An implementation of Scalable service-Oriented MiddlewarE over IP), which has a dependency on boost >= 1.55 and specifically system, thread and log boost libraries.

I have integrated vsomeip and also installed the boost dependencies on the Host laptop and subsequently compiled with no errors and further tested my application (on the Host) which includes, from NVIDIA perspective, primarily the dw framework along with a DriveWorksSample child class for visualizing a few data.

Now it comes to cross-compiling the same code for the target machine and I am a bit puzzled on how to do this. From the one hand, vsomeip and boost dependencies are not part of the aarch64 architecture images that the cross-compilation uses (I think those are on ~/nvidia/nvidia_sdk/DRIVE_OS_6.0.6_SDK_Linux_DRIVE_AGX_ORIN_DEVKITS/DRIVEOS/) and similarly I dont know in what way to directly compile on the target or to include those dependencies on the cross-compilation images. I have tried to manually specify the directories, for example “export BOOST_ROOT = /path/to/boost/on/linux” but I am getting an error message (strangely that “Boost 1.71 found, expected 1.55.0”, which I guess comes because my boost installation is for an x86 machine and not for the target aarch64)

Of course, in any case, I will need to install the boost dependencies on the target AGX ORIN and subsequently build/install vsomeip on the target again.

If, optionA, I cross-compile, I will need to somehow include these dependencies on the cross-compilation images/folders on the host, so that cmake can find them. These libraries will need to be build for “aarch64”, if I understand correctly

If, optionB, I can take my entire source code and build it directly on the target, what process/commands should I follow?

Many thanks in advance,

To cross-compile using the boost libraries in your Docker container, ensure that you’re linking against the correct libraries for the aarch64 architecture. Try using the following boost libraries in your cross-compilation environment:


If you need additional Boost libraries, you might need to build them for aarch64 architecture or find precompiled versions.

1 Like

Dear VickNV,

Many thanks for your reply.

In the end, after some effort, I managed to cross-compile my application. I compiled-installed the libraries themselves on the target and then copied those libraries on the host for linking and cross-compiling my code.

Nevertheless, could you please let me know what cmake flags would be needed if I wanted to directly compile the source code on the target AGX?

For example, when cross-compiling the samples on the host, I typically need to run
mkdir -p $DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu
export NVIDIA_SDK=/home/user/nvidia/nvidia_sdk/
cmake -B $DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu

What would be the equivalent cmake command and flags to directly compile the source code on the target AGX? For example " -DVIBRANTE_PDK NVIDIA_SDK/DRIVE_OS_6.0.6_SDK_Linux_DRIVE_AGX_ORIN_DEVKITS/DRIVEOS/drive-linux " would definitely not be needed since we are compiling on the target. Maybe you can provide an answear on the context of compiling the NVIDIA samples source code directly on the target AGX.

Native compiling isn’t officially supported.

However, you can explore how different variables are used in the cross-compiling environment to understand how they contribute to the build process. To find all occurrences of “VIBRANTE_PDK” in the current environment, you can use the following command:

$ grep -rw "VIBRANTE_PDK" /usr/local/driveworks/samples/

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