No success cross compiling OpenCV for DrivePX2

I’ve followed the instructions here: https://devtalk.nvidia.com/default/topic/1032772/faq/cross-compiling-opencv-3-4-0-on-pdk-5-0-5-0/

The cross compile is successful, but without CUDA support. It appears I do not have aarch64 binaries in /usr/local/cuda-9.0/targets. What package did I miss when setting up my Ubuntu 16.04 host system?

Dear derekmj,

Could you apply below cuda patch for your topic? Thanks.
https://devtalk.nvidia.com/default/topic/1032172/faq/drivepx2-opencv3-cuda9-patch/

FindCUDA.cmake from FindCUDA.cmake - Google Drive appears to already have this patch applied.

I have resolved the original issue. I added a symbolic link /usr/local/cuda to point to /usr/local/cuda-9.0. It seems one of the find scripts is still using /usr/local/cuda despite setting CUDA_TOOLKIT_ROOT_DIR to /usr/local/cuda-9.0

Now the cmake scripts correctly find CUDA. However the build fails with:

/home/developer/NVIDIA/Drive/5050bL_SDK/DriveSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/…/…/libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.2/ld: skipping incompatible /usr/local/cuda/lib64/libcudart.so when searching for -lcudart

etc.

I believe this is because the CUDA 9.0 cross compile package is not installed. Where can I find the appropriate .deb?

Dear derekmj,

I’m not sure DPX2 SDK is installed on your system properly.
cuda-repo-drive50.deb is in /5050bL_SDK/DriveSDK/drive-t186ref-linux/targetfs/root/apt-repos/binary. Thanks.