Error while building DRIVE OS 6.0.6 driveworks samples

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

Hardware Platform
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

While running “make” to build DRIVE OS 6.0.6 driveworks samples I got this error:
/usr/local/driveworks/samples/src/dwchannel/CustomRawBuffer.cpp: In member function ‘virtual void CustomRawBufferNvSciPacket::initializeFromNvSciBufObjs(dw::core::span<NvSciBufObjRefRec*>)’:
/usr/local/driveworks/samples/src/dwchannel/CustomRawBuffer.cpp:242:62: error: ‘cudaExternalMemoryHandleTypeNvSciBuf’ was not declared in this scope; did you mean ‘cudaExternalMemoryHandleTypeOpaqueFd’?
242 | cudaMemHandleDesc.type = cudaExternalMemoryHandleTypeNvSciBuf;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| cudaExternalMemoryHandleTypeOpaqueFd
/usr/local/driveworks/samples/src/dwchannel/CustomRawBuffer.cpp:243:38: error: ‘union cudaExternalMemoryHandleDesc::’ has no member named ‘nvSciBufObject’
243 | cudaMemHandleDesc.handle.nvSciBufObject = m_bufferPtrBufObj;
| ^~~~~~~~~~~~~~
make[2]: *** [src/dwchannel/CMakeFiles/sample_cgf_dwchannel.dir/build.make:76: src/dwchannel/CMakeFiles/sample_cgf_dwchannel.dir/CustomRawBuffer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3102: src/dwchannel/CMakeFiles/sample_cgf_dwchannel.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

(Note: Previously, I got:
– **** Samples will be installed to `/home/lidwave/src/dw_ws/build-x86/install/usr/local/driveworks/samples/bin’ on the host filesystem. ****
CMake Error at cmake/FindCUDART.cmake:100 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
CMakeLists.txt:99 (find_package)

– Found CUDART: /usr/include (found version “11.4.327”)
CMake Error at cmake/FindcuBLAS.cmake:100 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
CMakeLists.txt:100 (find_package)
When running ‘cmake -B $DRIVEWORKS_WORKSPACE/build-x86 -S /usr/local/driveworks/samples’ but resolved it by eclosing the parameters of the REPLACE command by double quotes).

Dear @moshe9,
Could you share complete log output and used commands as text? I am assuming you have followed DriveWorks SDK Reference: Getting Started Using the NVIDIA DRIVE OS Debian Package Repository

Also, could you check if you can compile the samples in docker container to unblock your development?


I used the sdkmanager following the instructions in Install DRIVE OS with SDK Manager | NVIDIA Docs.

Now I see, there are at least 3 different sources for installation, each with multiple ways of installation and slightly different instructions.

Which one is recommended?

  1. Install DRIVE OS with SDK Manager | NVIDIA Docs
  2. DriveWorks SDK Reference: Getting Started Using the NVIDIA SDK Manager
  3. Setting Up DRIVE OS with Debian Packages | NVIDIA Docs

I will also try using Docker. Also here, there are multiple different guides.
For now, this one:

works for me better than this:

I don’t have success with running samples in the Docker:
________:~$ xhost +local:docker
non-network local connections being added to access control list
________:~$ sudo docker run -it --privileged --net=host -v /dev/bus/usb:/dev/bus/usb -v ${WORKSPACE}:/home/nvidia/
[sudo] password for ________:
root@ /usr/local/driveworks/bin/sample_hello_world

Welcome to Driveworks SDK
[02-04-2023 17:39:01] Platform: Detected Generic x86 Platform
[02-04-2023 17:39:01] TimeSource: monotonic epoch time offset is 1680454360812418
[02-04-2023 17:39:01] Adding variable DW_Base:DW_Version
[02-04-2023 17:39:01] Added variable DW_Base:DW_Version
[02-04-2023 17:39:01] Driveworks exception thrown: Platform: cannot acquire CUDA context. Error cudaErrorSystemDriverMismatch: system has unsupported display driver / cuda driver combination

Dear @moshe9,
As I understand, you can compile the sample on docker and notice issues host. If so, as asked could you please share the complete compilation logs.
Meanwhile, could you continue using docker for compilation and copy binary to target/host for testing?

Dear @moshe9,
I followed below steps to compile DW samples on host

sudo apt-get update
sudo apt-get -y --no-install-recommends install \
>     cmake g++ g++-aarch64-linux-gnu gcc gcc-aarch64-linux-gnu gnupg \
>     libdrm-dev libegl-dev libgl-dev libgles-dev libglu1-mesa-dev libglx-dev \
>     libqt5core5a libqt5gui5 libqt5qml5 libqt5quick5 libusb-1.0-0 libx11-dev \
>     libxcursor-dev libxinerama-dev libxrandr-dev libxxf86vm-dev make minicom \
>     nfs-kernel-server openssh-client pkg-config python3 python3-crypto \
>     python3-jinja2 python3-jsonschema python3-matplotlib python3-numpy \
>     python3-pil python3-prompt-toolkit python3-pycryptodome python3-pygments \
>     python3-regex python3-tabulate python3-tk python3-yaml zlib1g-dev

mkdir ~/DW-5.10-host
cmake -B ~/DW-5.10-host/ -S /usr/local/driveworks-5.10/samples/
cd ~/DW-5.10-host
make install

Seems I have packages version conflict.
What are the recommended versions for - kernel, nvidia driver, cuda, cmake and gcc?

Dear @moshe9,
Could you check release properties in DRIVE OS 6.0.6 release notes

The sdkmanager installs the required cuda toolkit on host. You may remove other cuda toolkits from host if you see any issue.

After removing the DRIVE OS SDK by sdkmanager, removing the Nvidia driver and reinstalling them in the reverse order, I’m able to build the samples into the Docker and running them either in the Docker and outside.
Outside the Docker it seems to have problems with cmake (that I’m able to overcome) and compilation.
I can live with this.
Attaching the outputs logs for your information.
Building in Host 23_04_03_17_03-After_fix_cmake_files.txt (26.5 KB)
Building in Host 23_04_03_17_03-cmake_files_error.txt (6.0 KB)
Building under Docker 23_04_03_17_03.txt (49.9 KB)

CMakeCache.txt (53.8 KB)
CMakeCache.txt (62.5 KB)

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