Building Driveworks 4.0 samples for the target system

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
[*] DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
[*] Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
[*] NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.7.0.8846
other

Host Machine Version
[*] native Ubuntu 18.04
other

I’m following the cross-compiling instructions but got the following error:

nuc4agx@nuc4agx-NUC8i3BEK:~/build$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake -DVIBRANTE_PDK:STRING=/home/nuc4agx/nvidia/nvidia_sdk/DRIVE_OS_5.2.6_SDK_Linux_OSWithSamples_DRIVE_AGX_XAVIER/DRIVEOS/drive-t186ref-linux /usr/local/driveworks/samples

That works fine (my original post had a syntax error in VIBRANTE_SDK).
However, the actual make fails because libbsd.so.0 not found:

... warning: libbsd.so.0, needed by /usr/lib/aarch64-linux-gnu/libXdmcp.so.6, not found (try using -rpath or -rpath-link)

Any suggestion?

Hi, @user28207

Please compare your command to the below one from the document page you pasted. Thanks.

I’ve added TRT_VESRION option but it didn’t help:

nuc4agx@nuc4agx-NUC8i3BEK:~/build$ cmake -DCMAKE_BUILD_TYPE=Release  \
-DVIBRANTE_PDK:STRING=/home/nuc4agx/nvidia/nvidia_sdk/DRIVE_OS_5.2.6_SDK_Linux_OSWithSamples_DRIVE_AGX_XAVIER/DRIVEOS/drive-t186ref-linux \
-DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake \
-DTRT_VERSION:STRING=6.5.0.7  \
/usr/local/driveworks/samples
-- VIBRANTE_PDK = /home/nuc4agx/nvidia/nvidia_sdk/DRIVE_OS_5.2.6_SDK_Linux_OSWithSamples_DRIVE_AGX_XAVIER/DRIVEOS/drive-t186ref-linux
-- VIBRANTE_PDK_DEVICE = t186ref
<skip>
-- Generating done
-- Build files have been written to: /home/nuc4agx/build
nuc4agx@nuc4agx-NUC8i3BEK:~/build$ make -j
Scanning dependencies of target lodepng-src
Scanning dependencies of target glfw-x11
Scanning dependencies of target create-data-symlink
Scanning dependencies of target samples_allocator
Scanning dependencies of target samples_framework_nocuda
[  0%] Generating '_data' symbolic link
[  0%] Building CXX object src/framework/CMakeFiles/samples_allocator.dir/Allocator.cpp.o
[  1%] Building CXX object 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/src/lodepng.cpp.o
[  1%] Built target create-data-symlink
<skip>
[ 68%] Linking CXX executable sample_rig
/home/nuc4agx/nvidia/nvidia_sdk/DRIVE_OS_5.2.6_SDK_Linux_OSWithSamples_DRIVE_AGX_XAVIER/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/7.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libbsd.so.0, needed by /usr/lib/aarch64-linux-gnu/libXdmcp.so.6, not found (try using -rpath or -rpath-link)
/usr/lib/aarch64-linux-gnu/libXdmcp.so.6: undefined reference to `arc4random_buf@LIBBSD_0.2'
collect2: error: ld returned 1 exit status
src/hello_world/CMakeFiles/sample_hello_world.dir/build.make:135: recipe for target 'src/hello_world/sample_hello_world' failed
make[2]: *** [src/hello_world/sample_hello_world] Error 1
CMakeFiles/Makefile2:3029: recipe for target 'src/hello_world/CMakeFiles/sample_hello_world.dir/all' failed
make[1]: *** [src/hello_world/CMakeFiles/sample_hello_world.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I was able to build everything by copying libbcd,0* from ${VIBRANTE_PDK}/targetfs/lib/aarch64-linux-gnu/ to ${VIBRANTE_PDK}/lib-target. Not a solution but a hack to move forward.

Good to hear it works on your side. I saw you already fixed the command typo in your first post but I haven’t seen the libbcd,0* issue.

Please help to create another topic for this. Thanks.