I was trying to cross compile the driveworks-2.2 samples on my PC. I followed the steps on https://docs.nvidia.com/driveworks/dwx_samples_building_V5L.html. However, when I call make, I get the following compilation error:
Scanning dependencies of target update_cuda_deps
Scanning dependencies of target lodepng-src
Scanning dependencies of target samples_allocator
[ 0%] Building CXX object 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/src/lodepng.cpp.o
[ 0%] Dependencies for /home/drive10/samplesNvidia/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend.stamp
[ 0%] Dependencies for /home/drive10/samplesNvidia/src/imageprocessing/motion/denseopticalflow/CMakeFiles/sample_denseopticalflow.dir//gen_utils.cu.o.depend.stamp
[ 2%] Dependencies for /home/drive10/samplesNvidia/src/imageprocessing/stereo/stereoPVA/CMakeFiles/sample_stereo_disparity_pva.dir//gen_utils.cu.o.depend.stamp
[ 2%] Dependencies for /home/drive10/samplesNvidia/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.stamp
[ 2%] Building CXX object src/framework/CMakeFiles/samples_allocator.dir/Allocator.cpp.o
Scanning dependencies of target glfw-x11
[ 2%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_init.c.o
In file included from /usr/local/driveworks-2.2/samples/3rdparty/src/lodepng/include/lodepng.h:29:0,
from /usr/local/driveworks-2.2/samples/3rdparty/src/lodepng/src/lodepng.cpp:31:
/home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/string.h:41:1: error: ‘__BEGIN_NAMESPACE_STD’ does not name a type; did you mean ‘__BEGIN_DECLS’?
__BEGIN_NAMESPACE_STD
^~~~~~~~~~~~~~~~~~~~~
__BEGIN_DECLS
[ 3%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/egl_context.c.o
[ 3%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/posix_time.c.o
[ 3%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/input.c.o
[ 3%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/glx_context.c.o
[ 3%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/context.c.o
[ 5%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_window.c.o
[ 5%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/window.c.o
/home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/string.h:49:1: error: ‘__END_NAMESPACE_STD’ does not name a type
__END_NAMESPACE_STD
^~~~~~~~~~~~~~~~~~~
[ 6%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/init.c.o
[ 7%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/x11_monitor.c.o
[ 7%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/linux_joystick.c.o
[ 7%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/vulkan.c.o
In file included from /home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/wchar.h:37:0,
from /home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1/cwchar:44,
from /home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1/bits/postypes.h:40,
from /home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1/iosfwd:40,
from /home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1/memory:72,
from /usr/local/driveworks-2.2/samples/src/framework/Allocator.cpp:32:
/home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdio.h:47:1: error: ‘__BEGIN_NAMESPACE_STD’ does not name a type; did you mean ‘__BEGIN_DECLS’?
__BEGIN_NAMESPACE_STD
^~~~~~~~~~~~~~~~~~~~~
__BEGIN_DECLS
[ 8%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/posix_tls.c.o
/home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdio.h:50:1: error: ‘__END_NAMESPACE_STD’ does not name a type
__END_NAMESPACE_STD
^~~~~~~~~~~~~~~~~~~
/home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/string.h:61:1: error: ‘__BEGIN_NAMESPACE_STD’ does not name a type; did you mean ‘__BEGIN_DECLS’?
__BEGIN_NAMESPACE_STD
^~~~~~~~~~~~~~~~~~~~~
__BEGIN_DECLS
[ 9%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/monitor.c.o
In file included from /home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1/cwchar:44:0,
from /home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1/bits/postypes.h:40,
from /home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1/iosfwd:40,
from /home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1/memory:72,
from /usr/local/driveworks-2.2/samples/src/framework/Allocator.cpp:32:
/home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/wchar.h:105:1: error: ‘__BEGIN_NAMESPACE_C99’ does not name a type; did you mean ‘_GLIBCXX_NAMESPACE_CXX11’?
__BEGIN_NAMESPACE_C99
^~~~~~~~~~~~~~~~~~~~~
_GLIBCXX_NAMESPACE_CXX11
/home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/string.h:96:1: error: ‘__END_NAMESPACE_STD’ does not name a type
__END_NAMESPACE_STD
^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/driveworks-2.2/samples/3rdparty/src/glfw/3.2-screen/src/x11_platform.h:32:0,
from /usr/local/driveworks-2.2/samples/3rdparty/src/glfw/3.2-screen/src/internal.h:163,
from /usr/local/driveworks-2.2/samples/3rdparty/src/glfw/3.2-screen/src/x11_init.c:28:
/home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/signal.h:40:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
typedef __sig_atomic_t sig_atomic_t;
^~~~~~~
/home/drive10/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/signal.h:49:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
...
These and similar error continue for a total of over 100,000 lines.
The PC has a fresh installation of Ubuntu 18.04 LTS as well as the installation of Nvidia Drive Software 10.0 on it. I used this PC to flash Drive Software 10.0 to the DriveAGX, which did work fine. Also, our own program runs on the DriveAGX when cross compiled on that PC. Does anybody hava an idea what went wrong there?