Cross compile error on CAN communication module

I am still ramping up and working on “How to build first CAN communication module”

When I tried to cross compile, I have got the following errors. It looks dw package does not have dw/gl/GL.h.

[ 0%] Built target update_cuda_deps[ 8%] Built target lodepng-src[ 72%] Built target glfw
Scanning dependencies of target dw_samples_framework
[ 76%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/WindowLinuxEGL.cpp.o
[ 80%] Building CXX object src/framework/CMakeFiles/dw_samples_framework.dir/WindowEGL.cpp.o
In file included from /home/hw_qiwang/NVIDIA_DRIVE_CANBUS_Tutorial/src/framework/WindowEGL.hpp:37:0,
from /home/hw_qiwang/NVIDIA_DRIVE_CANBUS_Tutorial/src/framework/WindowEGL.cpp:31:
/home/hw_qiwang/NVIDIA_DRIVE_CANBUS_Tutorial/src/framework/Window.hpp:35:22: fatal error: dw/gl/GL.h: No such file or directory
#include <dw/gl/GL.h>
^
compilation terminated.
src/framework/CMakeFiles/dw_samples_framework.dir/build.make:110: recipe for target ‘src/framework/CMakeFiles/dw_samples_framework.dir/WindowEGL.cpp.o’ failed
make[2]: *** [src/framework/CMakeFiles/dw_samples_framework.dir/WindowEGL.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs…
In file included from /home/hw_qiwang/NVIDIA_DRIVE_CANBUS_Tutorial/src/framework/WindowEGL.hpp:37:0,
from /home/hw_qiwang/NVIDIA_DRIVE_CANBUS_Tutorial/src/framework/WindowLinuxEGL.hpp:37,
from /home/hw_qiwang/NVIDIA_DRIVE_CANBUS_Tutorial/src/framework/WindowLinuxEGL.cpp:31:
/home/hw_qiwang/NVIDIA_DRIVE_CANBUS_Tutorial/src/framework/Window.hpp:35:22: fatal error: dw/gl/GL.h: No such file or directory
#include <dw/gl/GL.h>
^
compilation terminated.
src/framework/CMakeFiles/dw_samples_framework.dir/build.make:134: recipe for target ‘src/framework/CMakeFiles/dw_samples_framework.dir/WindowLinuxEGL.cpp.o’ failed
make[2]: *** [src/framework/CMakeFiles/dw_samples_framework.dir/WindowLinuxEGL.cpp.o] Error 1
CMakeFiles/Makefile2:301: recipe for target ‘src/framework/CMakeFiles/dw_samples_framework.dir/all’ failed
make[1]: *** [src/framework/CMakeFiles/dw_samples_framework.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2

Hi deltack,

I assume you’re with DRIVE Software 10.0. Currently the header file is at /usr/local/driveworks/targets/aarch64-Linux/include/dwvisualization/gl/GL.h. Could you modify the code accordingly? Thanks!

Hi VickNV, it is actually DRIVE Software 9.0 since I need to stay in Ubuntu 16.04.

Could you try to locate the header file in DRIVE Software 9.0? I assume it’s at the same path.

Tried and got the following

[ 0%] Built target update_cuda_deps [ 8%] Built target lodepng-src [ 72%] Built target glfw [ 92%] Built target dw_samples_framework
[ 96%] Linking CXX executable sample_canbus
/usr/local/driveworks-2.0/targets/aarch64-Linux/lib/libnvonnxparser.so.0: undefined reference to std::runtime_error::runtime_error(char const*)@GLIBCXX_3.4.21' /usr/local/driveworks-2.0/targets/aarch64-Linux/lib/libnvonnxparser.so.0: undefined reference to std::runtime_error::runtime_error(char const*)@GLIBCXX_3.4.21
/usr/local/driveworks-2.0/targets/aarch64-Linux/lib/libcudnn.so.7: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21' /usr/local/driveworks-2.0/targets/aarch64-Linux/lib/libcudnn.so.7: undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21’
collect2: error: ld returned 1 exit status
src/sample_canbus/CMakeFiles/sample_canbus.dir/build.make:110: recipe for target ‘src/sample_canbus/sample_canbus’ failed
make[2]: *** [src/sample_canbus/sample_canbus] Error 1
CMakeFiles/Makefile2:358: recipe for target ‘src/sample_canbus/CMakeFiles/sample_canbus.dir/all’ failed
make[1]: *** [src/sample_canbus/CMakeFiles/sample_canbus.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2

Could you run the command and provide the output? Thanks!

$ objdump -T /usr/local/driveworks/targets/aarch64-Linux/lib/libcudnn.so.7.* | grep _M_create

0000000000000000 DF UND 0000000000000000 GLIBCXX_3.4.21 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm

My host is ubuntu 18.04 and I’m on DRIVE Software 10.0.
Could you share your current package and steps to reproduce? I would like to see if I can see the same issue on DRIVE Software 10.0 and check it on my side. Thanks!

My host is Ubuntu 16.04 and on DRIVE Software 9.0.
I followed the instruction shown below

$ cd …/AGX_build/
$ cmake -DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=/path/to/samples/cmake/Toolchain-V5L.cmake
-DVIBRANTE_PDK:STRING=/path/to/drive-t186ref-linux

$ make -j1
$ make install

@VickNV are you able to duplicate the issue?

I’m not able to duplicate the issue on DRIVE Software 10.0. I only met the issue you mentioned at comment #1.

Please try it on DRIVE Software 10.0. Thanks!