Cross-compile

When I try to cross compile the sample code on host machine, when I type the following command:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks-2.0/samples/cmake/Toolchain-V5L.cmake -DCAMKE_PDK:STRING=/home/zhang/nvidia/nvidia_sdk/DRIVE_Software_9.0_Linux_hyperion_E3550/DriveSDK/drive-t186ref-linux …

There is an error:
– The C compiler identification is unknown
– The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:17 (project):
The CMAKE_C_COMPILER:

/../toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux-gcc

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable “CC” or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:17 (project):
The CMAKE_CXX_COMPILER:

/../toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux-g++

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable “CXX” or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

Dear yu.zhang01,

Recently we’ve post Drive Software 10.0(DriveWorks 2.2).
Could you please update Drive Software 9.0 to 10?

I believe you already know DriveWorks starting guidance and cross-compilation way like below.
However could you please help to check it again?
https://docs.nvidia.com/driveworks/dwx_devguide_getting_started.html
https://docs.nvidia.com/driveworks/dwx_samples_building_V5L.html

Because I could run the command w/o any issue. Thanks.

/usr/local/driveworks/samples/hBuild$ sudo cmake -DCMAKE_BUILD_TYPE=Release       -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake       -DVIBRANTE_PDK:STRING=/home/sbyun/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-linux       /usr/local/driveworks/samples
[sudo] password for sbyun: 
-- Found EGL: /home/sbyun/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-linux/lib-target/libEGL.so  
-- Found /home/sbyun/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-linux/lib-target/libEGL.so:
--  - Includes: [/home/sbyun/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-linux/include]
--  - Libraries: [/home/sbyun/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-linux/lib-target/libEGL.so]
-- DW_EXPERIMENTAL_FORCE_EGL not set, EGL Support Disabled
-- Building with TRT version  and cudnn version 7.5.1.14
-- Building GLFW for X11 (static)
-- Driveworks Samples install dir: /usr/local/driveworks-2.2/samples/hBuild/install
-- Found Driveworks 
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_TOOLCHAIN_FILE


-- Build files have been written to: /usr/local/driveworks-2.2/samples/hBuild

Dear yu.zhang01,
I notice you have used DCAMKE_PDK:STRING instead of -DVIBRANTE_PDK:STRING in command. Also, the last parameter should point to DW samples folder. Could you check these things?
As Steve said, we recommend upgrading to latest DRIVE SW version to get new features and enhancements.

@SivaRamaKrishna
oh, I am so careless, Thank you!

Dear yu.zhang01,
Were you able to cross compile or you still have any issues?

Yes, I am able to cross compile, thank you.

Dear yu.zhang01,

Can this topic be closed as resolved? Thanks.