cross compile

Hi guys,

I recently flash my PX2 platform ,I refer to DW-SDK-Ref to learn how to cross-compile the demo,But I met

some problems.

First , the “drive-t186ref-linux” located on the host or the tegra ,I just find it on the tegra,and

I use the address on the tegra to do this:

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks-1.2/samples/cmake/Toolchain-V5L.cmake -DVIBRANTE_PDK:STRING=/home/nvidia/drive-t186ref-linux /usr/local/driveworks-1.2/samples/

something wrong happened ,and

-- VIBRANTE_PDK = /home/nvidia/drive-t186ref-linux
-- VIBRANTE_PDK_DEVICE = t186ref
CMake Error at cmake/Toolchain-V5L.cmake:94 (message):
  Can't open
  /home/nvidia/drive-t186ref-linux/lib-target/version-nv-(pdk/sdk).txt for
  PDK branch detection
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:98 (include)
  CMakeLists.txt:17 (project)

Did I take a mistake?

thanks!

Dear pengxiaou,
Could you check it at $HOME/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DrivePDK/drive-t186ref-linux on your host PC. Please use this PATH to cross compile on host.

Hi SivaRamaKrishna,

I cannot find this PATH on my host, there are four docs “documentations DriveSDK PerfWorks SystemProfiler” ,and DriveSDK is empty.

Thx !

Dear pengxiaou,
Could you please check installing again using sdkmanager. Make sure you select host pc.

hi SivaRamaKrishna,

there is an error in the SDKManager, it seems that the address is wrong.

21:11:06 ERROR : DPX Patch : download error: https://developer.nvidia.com/drive/secure/drive_bundles/Drive_50103L_SDK_b135_OS_GA/drive-t186ref-linux-5.0.10.3-12606092-dpx-patch-v0.0.0-sdk.run failed with Error: Invalid file path: /home/lx/Downloads/nvidia/sdkm_downloads/drive-t186ref-linux-5.0.10.3-12606092-dpx-patch-v0.0.0-sdk.run.mtd

thx

Dear pengxiaou,
please delete ~/.nvsdkm, ~/.config/sdkmanager. Could you download sdkmanager again and check installing. Also, make sure you do not have any proxy issues.

Dear pengxiaou,
Is this issue resolved?

Hello,

I am having the same issue. SDKmanager says everything is installed but there is nothing inside the folder $HOME/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/SW/DrivePDK/

Note that the folder above DrivePDK is called SW and not OS as you mentioned. Could it be affecting?

Also, when the SDKmanager starts installing the cross compiler, it finishes very quickly, giving me the impression that something aborted the process.

I tried the steps you suggest but it did not work for me either.

P.S.: I am installing only the host. I deselected the target option on the sdkmanager.

Dear joao.barbosa,
Please delete installation folder, ~/.nvsdkm, sdkm_downloads foler and do a fresh installation using sdkmanager(https://developer.nvidia.com/DRIVE/secure/files/sdkmanager-0.9.9.2351) and share logs with us to investigate.

Hello SivaRamaKrishna,

I have done all the process again using the sdkmanager-0.9.9.2351 and I still have the same problem.

$HOME/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/SW/DrivePDK/ has no files inside

Below is the log for the DRIVE AV Cross Compile module:

13:00:35 INFO : DRIVE AV Cross Compile : start to download https://developer.nvidia.com/drive/secure/drive_bundles/DRIVE_50132L_SDK_b123_OS/driveav_cross_linux-v1.5.3584_13705565_20181221_da39a3e_13657380_drive-linux-5.0.13.2.deb to /home/avl/Downloads/nvidia/sdkm_downloads/driveav_cross_linux-v1.5.3584_13705565_20181221_da39a3e_13657380_drive-linux-5.0.13.2.deb
13:02:46 INFO : DRIVE AV Cross Compile : verifying checksum of /home/avl/Downloads/nvidia/sdkm_downloads/driveav_cross_linux-v1.5.3584_13705565_20181221_da39a3e_13657380_drive-linux-5.0.13.2.deb
13:02:47 INFO : DRIVE AV Cross Compile : download /home/avl/Downloads/nvidia/sdkm_downloads/driveav_cross_linux-v1.5.3584_13705565_20181221_da39a3e_13657380_drive-linux-5.0.13.2.deb successfully, checksum is correct
13:02:47 INFO : DRIVE AV Cross Compile : download 'DRIVE AV Cross Compile ' success
13:06:47 INFO : DRIVE AV Cross Compile : Start to install 'DRIVE AV Cross Compile '
13:06:47 DEBUG : DRIVE AV Cross Compile : running command < cd '/home/avl/nvidia/nvidia_sdk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W51eC01LjAuMTMuMi5kZWIifQ==' -i='NV_DRIVE_AV_HOST_CROSS_COMPILE_LINUX_COMP' -v='1.5' -l='/home/avl/nvidia/nvidia_sdk/DRIVE/Linux/5.0.13.2/SW' -L='/home/avl/.nvsdkm/logs/DRIVE/Linux/5.0.13.2/SW' -p='2254' -u='/opt/nvidia/sdkmanager/resources/app.asar.unpacked/output/installUtils/NV_DRIVE_LINUX_BUNDLE/common/_installer/InstallUtil' -t='' -x='SDK' -e='/home/avl/Downloads/nvidia/sdkm_downloads/driveav_cross_linux-v1.5.3584_13705565_20181221_da39a3e_13657380_drive-linux-5.0.13.2.deb' >
13:06:47 INFO : DRIVE AV Cross Compile : [ Disk Avail:400.22 GB ]
13:06:47 INFO : DRIVE AV Cross Compile : Using GenericInstaller to Install NV_DRIVE_AV_HOST_CROSS_COMPILE_LINUX_COMP
13:06:47 INFO : DRIVE AV Cross Compile : NV_DRIVE_AV_HOST_CROSS_COMPILE_LINUX_COMP include 1 package
13:06:47 INFO : DRIVE AV Cross Compile : [ Package Install Started ]
13:06:47 INFO : DRIVE AV Cross Compile : deb installer start to install
13:06:47 INFO : DRIVE AV Cross Compile : deb file /home/avl/Downloads/nvidia/sdkm_downloads/driveav_cross_linux-v1.5.3584_13705565_20181221_da39a3e_13657380_drive-linux-5.0.13.2.deb, package name [driveav_cross_linux], package version [1.5.3584]
13:06:47 INFO : DRIVE AV Cross Compile : exec_command: sudo dpkg -i /home/avl/Downloads/nvidia/sdkm_downloads/driveav_cross_linux-v1.5.3584_13705565_20181221_da39a3e_13657380_drive-linux-5.0.13.2.deb
13:06:47 INFO : DRIVE AV Cross Compile : Selecting previously unselected package driveav_cross_linux.
13:06:47 INFO : DRIVE AV Cross Compile : (Reading database ... 201903 files and directories currently installed.)
13:06:47 INFO : DRIVE AV Cross Compile : Preparing to unpack .../driveav_cross_linux-v1.5.3584_13705565_20181221_da39a3e_13657380_drive-linux-5.0.13.2.deb ...
13:06:47 INFO : DRIVE AV Cross Compile : Unpacking driveav_cross_linux (1.5.3584) ...
13:06:53 INFO : DRIVE AV Cross Compile : Setting up driveav_cross_linux (1.5.3584) ...
13:06:53 INFO : DRIVE AV Cross Compile : NV_DRIVE_AV_HOST_CROSS_COMPILE_LINUX_COMP driveav_cross_linux-v1.5.3584_13705565_20181221_da39a3e_13657380_drive-linux-5.0.13.2.deb installed successfully.
13:06:53 INFO : DRIVE AV Cross Compile : [ Package Install Finished Successfully ]
13:06:53 INFO : DRIVE AV Cross Compile : [ 803.73 MB used. Disk Avail: 399.44 GB ]
13:06:53 INFO : DRIVE AV Cross Compile : [ NV_DRIVE_AV_HOST_CROSS_COMPILE_LINUX_COMP Install took 7s ]
13:06:53 INFO : DRIVE AV Cross Compile : command finished successfully
13:06:53 INFO : DRIVE AV Cross Compile : install 'DRIVE AV Cross Compile ' success

Below are all the errors I got during the installation process:

13:00:44 ERROR : CUDA on Host : E
13:00:44 ERROR : CUDA on Host : : Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-arm64/Packages 404 Not Found [IP: 91.189.88.161 80]
13:01:03 ERROR : CUDA on Host : Extracting templates from packages: 57%
13:01:03 ERROR : CUDA on Host : Extracting templates from packages: 100%
13:02:34 ERROR : CUDA on Host : E: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-arm64/Packages 404 Not Found [IP: 91.189.88.152 80]
13:02:40 ERROR : CUDA on Host : Extracting templates from packages: 88%
13:02:40 ERROR : CUDA on Host : Extracting templates from packages: 100%

Dear joao.barbosa,
Please share sdkm logs zipfile for furthur investigation. I assume you have followed the prerequisites at https://developer.nvidia.com/nvidia-drive-downloads

Hello,

yes, I have followed all the prerequisites. Everything is working fine, I run the samples, I was able to build one sample in the host, I could flash the board (seems to be working as well). However, when \i was trying to cross compile I couldn’t find the file.

You can access the zip with the logs in this link:

Thank you!

Dear joao.barbosa,
From the log it appears you are trying to flash Drive AGX platform and not DrivePX2. If so, This is thread is for DrivePX2.
If you are using Drive AGX platform, you can follow sdkmanager 0.9.9 flash AGX failed - General - NVIDIA Developer Forums for SDKmanager installation issue.
Please confirm if you are using Drive AGX or Drive Px2 to resolve the issue?

Hello,

Yes, I am trying to go through this tutorial now, the problem happens in the step 2:

  1. Configure the location of the NVIDIA DRIVE SDK/PDK.
    Set the environment variable DriveSDK to point to the SDK/PDK folders:
/path/to/drive-t186ref-linux (NVIDIA DRIVE platform)

-or-
Define this location as a cmake parameter:

-DVIBRANTE_PDK:STRING=/path/to/drive-t186ref-linux

Problem: I can’t find the file drive-t186ref-linux in my host. Theoretically it should have been copied into the folder "$HOME/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/SW/DrivePDK/ " by the SDKManager install application, but it is not there.

Dear joao.barbosa,
As you said you are flashing Drive AGX, just to clairify, the latest sdkmanager installs 5.0.13.2 and not 5.0.10.3. Could you please file a separate topic for this issue in DRIVE AGX Xavier - NVIDIA Developer Forums with related information (Forum for Drive AGX related queries) for follow up.

Hello SivaRamaKrishna,

as I have flashed the board sometime ago and I was trying to configure a different host PC I was selecting only the host option in the SDKManager application cause I thought the hardware option was only for flashing the board, but, while talking to you I realised that it would be necessary to choose the board to get the cross compile for that specific board, makes total sense btw. I am sorry for the confusion. I reinstalled selecting the platform and I can find the file there now.

Thank you! Best regards!

Joao

i have the same problem with pengxiaoyu, i can’t find the file DrivePDK in my host computer. And i have installed by sdkmanager for many times ,could you tell me how to solve it?

i have the same problem with you, have you solved it now?

Dear wuhr15,
Did you flash the board successfully. Do you see any errors while flashing? I hope you have followed the suggested solutions in this. If so, please attach the sdkm logs to check

Really thanks for your reply. I have solved it by adding Drive PX2 components in sdkmanager. I flashed PX2 a month ago but i reinstalled ubuntu on my host PC, so i thought i should only reinstall Host PC components.Ummm…i made a stupid mistake.