Sample can not work on the target machine

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version

DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)

I compiled the "sample_hello_word.cpp " on my host pc ,then i used “scp” command to send the binary file “sample_hello_word” to my target machine . It does not work and print the error “cannot execute binary file:Exec format error”

Dear @FYJ,
I think you have not cross compiled the sample. If so, please see the instructions at https://docs.nvidia.com/drive/driveworks-3.5/dwx_samples_building_V5L.html

Dear @SivaRamaKrishnaNV , I followed the link that you gave to me step by step, and the step 3 .3 as shown below(I have no PDK now). I still can not run the sample on target machine and print the error “cannot execute binary file:Exec format error”

(base)kang@kang-HP-Z2-Tower-G4-Workstation:~/build$ cmake -DCMAKE_BUTLD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks-3.5/samples/cmake/Toolchain-V5L.cmake
-DTRT VERSION: STRING-6.3.1.3
/usr/local/driveworks-3.5/samples

  • Found /usr/lib/x86_64-linux-gnu/libEGL. so:
  • Includes: [/usr/include]
  • Librartes: /usr/ltb/x86_64-1inux-gnu/libEGL.so
  • DW_EXPERIMENTAL_FORCE_EGL not set, EGL Support Disabled
  • Building with TRT version 6.3.1.3 and cudnn verston 7.6.6.184
  • Building GLFW for X11 (static)
  • Driveworks Samples Install dir: /home/kang/build/install
  • Found ‘dw/core/Verstin.h’ in /usr/local/driveworks-3.5/targets/x86_64-Linux/include
  • Found driveworks Library in /usr/local/driveworks-3.5/targets/x86_64-Linux/lib/libdriveworks.so
  • Found ‘dwvisualization/core/Visualization.h’ in /usr/local/driveworks-3.5/targets/x86_64-Linux/include
  • Found driveworks_visualization Library in /usr/local/drtveworks-3.5/targets/x86_64-Linux/lib/libdriveworks_visualization. so
  • Confiquring done
  • Generating done

Hi, @FYJ
Your command has some typos. Please double-check and try again.

Dear @VickNV there are some typos when converting images to text , because I can’t upload my screenshots .One thing that can be confirmed is that my command is correct.

(base)kang@kang-HP-Z2-Tower-G4-Workstation:~/build$ cmake -DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks-3.5/samples/cmake/Toolchain-V5L.cmake
-DTRT VERSION: STRING-6.3.1.3
/usr/local/driveworks-3.5/samples

  • Found /usr/lib/x86_64-linux-gnu/libEGL. so:
  • Includes: [/usr/include]
  • Librartes: /usr/ltb/x86_64-1inux-gnu/libEGL.so
  • DW_EXPERIMENTAL_FORCE_EGL not set, EGL Support Disabled
  • Building with TRT version 6.3.1.3 and cudnn verston 7.6.6.184
  • Building GLFW for X11 (static)
  • Driveworks Samples Install dir: /home/kang/build/install
  • Found ‘dw/core/Verstin.h’ in /usr/local/driveworks-3.5/targets/x86_64-Linux/include
  • Found driveworks Library in /usr/local/driveworks-3.5/targets/x86_64-Linux/lib/libdriveworks.so
  • Found ‘dwvisualization/core/Visualization.h’ in /usr/local/driveworks-3.5/targets/x86_64-Linux/include
  • Found driveworks_visualization Library in /usr/local/drtveworks-3.5/targets/x86_64-Linux/lib/libdriveworks_visualization. so
  • Confiquring done
  • Generating done

Dear @FYJ,
Could you share the logs of -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/path/to/driveworks/samples/cmake/Toolchain-V5L.cmake -DVIBRANTE_PDK:STRING=/path/to/drive-t186ref-linux -DTRT_VERSION:STRING=6.3.1.3 /path/to/driveworks/samples/folder and make -j12 to see what is the issue. If the compilation is successful, the build folder is expected to have all binaries

Dear @SivaRamaKrishnaNV , I have no PDK now, I can not do the command “-DVIBRANTE_PDK:STRING=/path/to/drive-t186ref-linux”. Is this why I can not cross compile?

Dear @FYJ,
I can not do the command “-DVIBRANTE_PDK:STRING=/path/to/drive-t186ref-linux

Does that mean, you don’t have drive-t186ref-linux folder on host? If so, you can not cross compile the sample in that case. To cross compile DW sample on host, You need to install DRIVE Release on host and also you need to select flashing target option in sdkmanager to have all neccessary things installed for cross compilation.

Dear @SivaRamaKrishnaNV , I have no drive-t186ref-linux folder on host, I followed the guide step by step to install all necessary things. “You need to install DRIVE Release on host and also you need to select flashing target option in sdkmanager to have all neccessary things installed for cross compilation”&“-DVIBRANTE_PDK:STRING=/path/to/drive-t186ref-linux”, Does that mean I have to install PDK on my host ,then i will have the drive-t186ref-linux folder on host?

Dear @FYJ,
If you install DRIVE release on host using sdkmanager, it should be at ~/nvidia/ . Could you check what you see in that path?

Dear @SivaRamaKrishnaNV , here is my path list:

(base) kang@kang-HP-Z2-Tower-G4-Workstation:~/nvidia$ ls
nvidia_sdk
(base) kang@kang-HP-Z2-Tower-G4-Workstation:~/nvidia$ cd nvidia_sdk/
(base) kang@kang-HP-Z2-Tower-G4-Workstation:~/nvidia/nvidia_sdk$ ls
DRIVE_OS_5.2.0_SDK_Linux_OS DRIVE_Software_10.0_Linux_OS_DDPX
DRIVE_OS_5.2.0_SDK_Linux_OS_DRIVE_AGX_XAVIER DRIVE_Software_10.0_Linux_OS_DRIVE_AGX_XAVIER
(base) kang@kang-HP-Z2-Tower-G4-Workstation:~/nvidia/nvidia_sdk$ ls -l
total 16
drwxrwxr-x 2 kang kang 4096 12月 6 14:50 DRIVE_OS_5.2.0_SDK_Linux_OS
drwxrwxr-x 4 kang kang 4096 12月 10 12:48 DRIVE_OS_5.2.0_SDK_Linux_OS_DRIVE_AGX_XAVIER
drwxrwxr-x 5 kang kang 4096 5月 24 2021 DRIVE_Software_10.0_Linux_OS_DDPX
drwxrwxr-x 5 kang kang 4096 9月 1 14:53 DRIVE_Software_10.0_Linux_OS_DRIVE_AGX_XAVIER

Dear @FYJ,
Please check DRIVE_OS_5.2.0_SDK_Linux_OS_DRIVE_AGX_XAVIER folder contents for drive-t186ref-linux folder. If you don’t find, Please check re-installing using sdkmanager

Please try if the below command works on your side.

$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake -DVIBRANTE_PDK:STRING=$HOME/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DRIVE_AGX_XAVIER/DRIVEOS/drive-t186ref-linux -DTRT_VERSION:STRING=6.3.1.3 /usr/local/driveworks/samples

Dear @VickNV thanks a lot, I will try that later.

Dear @SivaRamaKrishnaNV thanks a lot, I have re-installed using sdkmanager, I find the folder now.

1 Like