Cannot find libcudart.so (aarch64) for PX2

Hi Sir,
I build opencv v3.4.0 via cross-compilation for px2 platform and suffered from lacking libcudart.so, please refer following log,

/home/garywang/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-9.0/lib64/libcudart.so when searching for -lcudart
/home/garywang/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: cannot find -lcudart
/home/garywang/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-9.0/lib64/libnppc.so when searching for -lnppc

I only saw it in my HOST but cannot find it in DRIVE SDK (only existing header)
My HOST,
/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudart.so
/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudart.so.9.0.225
/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudart.so.9.0
/usr/local/cuda-9.0//targets/x86_64-linux/lib/libcudart_static.a
/home/garywang/5050bL_SDK/DriveSDK/drive-t186ref-linux/targetfs/usr/include/hwloc/cudart.h

Is it something wrong in DRIVE SDK or I should install CUDA tools kit for cuda-cross-aarch64?

Thanks!

Gary

Hi Gary,

Please refer to below topic to see if can help:
https://devtalk.nvidia.com/default/topic/1032772/faq/cross-compiling-opencv-3-4-0-on-pdk-5-0-5-0/

Thanks

I used the same version of FindCUDA.cmake from https://gist.github.com/twailurus/03bb4bffcf21768a84f20b667de5403b. Still try to figure out the root cause… Thanks!

Dear garywang,

I think you need to install CUDA tools kit for cuda-cross-aarch64. Thanks.