errors in make file

Hi Fabian,
When I create a makefile, I don’t have any issue:
magna@MVBRWS019:~/nvidia/dw_samples/build-agx$ sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=…/cmake/Toolchain-V5L.cmake -DVIBRANTE_PDK:STRING=/home/magna/nvidia/nvidia_sdk/DRIVE_Software_9.0_Linux_hyperion_E3550/DriveSDK/drive-t186ref-linux …
[sudo] password for magna:
– VIBRANTE_PDK = /home/magna/nvidia/nvidia_sdk/DRIVE_Software_9.0_Linux_hyperion_E3550/DriveSDK/drive-t186ref-linux
– Vibrante version
– Found /home/magna/nvidia/nvidia_sdk/DRIVE_Software_9.0_Linux_hyperion_E3550/DriveSDK/drive-t186ref-linux/lib-target/
– - Includes: [/home/magna/nvidia/nvidia_sdk/DRIVE_Software_9.0_Linux_hyperion_E3550/DriveSDK/drive-t186ref-linux/include]
– - Libraries: [/home/magna/nvidia/nvidia_sdk/DRIVE_Software_9.0_Linux_hyperion_E3550/DriveSDK/drive-t186ref-linux/lib-target/]
– Found: /home/magna/nvidia/nvidia_sdk/DRIVE_Software_9.0_Linux_hyperion_E3550/DriveSDK/drive-t186ref-linux/lib-target/
– Header at: /home/magna/nvidia/nvidia_sdk/DRIVE_Software_9.0_Linux_hyperion_E3550/DriveSDK/drive-t186ref-linux/include
– DW_EXPERIMENTAL_FORCE_EGL set and EGL Support Enabled
– Cross Compiling for Vibrante
– Default - Building with TRT version and cudnn version 7.3
– Building GLFW for X11 (static)
– Found vibrante lib: /home/magna/nvidia/dw_samples/3rdparty/linux-aarch64/vibrante/lib/
– Found vibrante lib: /home/magna/nvidia/dw_samples/3rdparty/linux-aarch64/vibrante/lib/
– Found vibrante_Xlib: /home/magna/nvidia/dw_samples/3rdparty/linux-aarch64/vibrante_Xlibs/lib/
– Driveworks Samples install dir: /usr/local
– Cross Compiling for Vibrante
– Found Driveworks
– Configuring done
– Generating done
– Build files have been written to: /home/magna/nvidia/dw_samples/build-agx

But when I try to compile it, I have errors. I don’t know how to resolve them:

magna@MVBRWS019:~/nvidia/dw_samples/build-agx$ make -j
[ 12%] Built target lodepng-src
[ 12%] Built target samples_allocator
[ 12%] Built target update_cuda_deps
[ 12%] Linking CXX shared library
[ 12%] Built target glfw-x11
/usr/local/cuda-10.1/lib64/ error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
src/sensors/plugins/imu/CMakeFiles/sample_imu_plugin.dir/build.make:103: recipe for target ‘src/sensors/plugins/imu/’ failed
make[2]: *** [src/sensors/plugins/imu/] Error 1
CMakeFiles/Makefile2:1143: recipe for target ‘src/sensors/plugins/imu/CMakeFiles/sample_imu_plugin.dir/all’ failed
make[1]: *** [src/sensors/plugins/imu/CMakeFiles/sample_imu_plugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 12%] Built target glfw-src
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2

What to do ?


You can try out make -j1 -n and reproduce the past steps. Then you can check if you have included the correct library by manually adding the one you expect to be working.


Hi Fabian,
Eventually it works but in unexpected way.
Inside the folder build-agx I ran the following command without “…” in the end:

sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=…/cmake/Toolchain-V5L.cmake -DVIBRANTE_PDK:STRING=/home/magna/nvidia/nvidia_sdk/DRIVE_Software_9.0_Linux_hyperion_E3550/DriveSDK/drive-t186ref-linux

then I moved one level up (to dw_samples), and ran the command make -j, which worked successfully and created folders install/bin, and install/lib. I successfully ran the binaries of the samples in NVIDIA Drive platform.
It is unclear why I couldn’t successfully create install/bin folder inside build-agx.
I think it is related to cmake file. I just don’t know where is the configuration of BINARY_OUTPUT.

Hi Yaroslav,

Sorry for no reply during the past weeks, I have been on vacation.

Could you fix the problem? I am going to update the Tutorial this week and to speed you up I would suggest to initiate a call with you - what do you think?