CUDAToolkit cross compile linking error

I setup the cross-compile environment on x86 for Xavier arm64

I use find_package in cmake for searching CUDAToolkit
and it pass but when I run make command
it occurs error at linking

[100%] Linking CXX executable testingopencv
/home/gw/cross_compile/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 -lcuda
/usr/local/cuda-10.2/lib64/ error adding symbols: File in wrong format

there are two error here, one is compiler cannot find -lcuda and the other is file in wrong format.
I know the second one is due to point to x86 file rather than arm64 file but I don’t know how to change
the path. I’ve tried specifying LD_LIBRARY_PATH to cuda-10.2/targets/aarch64-linux/lib but it cannot work

thanks for anything idea in advance


Here is a related topic that should give you some information.
Please remember to modify the CUDA version based on your software.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.