Cross compile opencv

Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
Software Version
DRIVE OS Linux 5.2.0
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
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.5.0.7774
other

Host Machine Version
native Ubuntu 18.04
other

I’m trying to cross-compile opencv 3.2 after fixing a number of errors I have this one left, I’m not sure what i am doing wrong here:

/home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: skipping incompatible /usr/local/cuda-10.2/lib64/libcudart.so when searching for -lcudart
/home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: skipping incompatible /usr/local/cuda-10.2/lib64/libcudart.so when searching for -lcudart
/home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -lcudart
/home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: skipping incompatible /usr/local/cuda-10.2/lib64/libnppc.so when searching for -lnppc
/home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: skipping incompatible /usr/local/cuda-10.2/lib64/libnppc.so when searching for -lnppc
/home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -lnppc
/home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -ltrue-DWITH_CUDNN=ON
/home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: skipping incompatible /usr/local/cuda-10.2/lib64/libnpps.so when searching for -lnpps
/home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: skipping incompatible /usr/local/cuda-10.2/lib64/libnpps.so when searching for -lnpps
/home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -lnpps

Dear @jber4282,
We do not officially support OpenCV on DRIVE platform. I hope you have leveraged the work from OpenCV - compile OpenCV 4.1.1 on Drive Software 10.0 and made changes to DRIVE OS 5.2.0.

The issue looks like the linker is unable to find the libs in path. Could you install cuda cross compiled libs and make the libs available in path?

Hi @SivaRamaKrishnaNV
Fixed, thanks!

Dear @jber4282,
Glad to hear that the issue is fixed. Could you share the followed steps here to help others in the community

I had to change bits and pieces to have OpenCV 3.2 working with the Cuda version installed by DriveWorks 3.5; I just created a git repo for people who are having similar issues. GitHub - chinitaberrio/OpenCV3.2-Nvidia-Pegasus.