I want to build cross compile platform on host computer(ubuntu x86)
and already clone the clone.img.raw from Jetson AGX Xavier and mount it
I can build jetson_multimedia_api/samples and throw them back to Xavier and run them on target.
Now, I want to cross compile my own package by CMakeList on host computer.
but I can’t build them really well because always miss some dependencies like
Could NOT find FFMPEG (missing: LIBAVCODEC_LIBRARY LIBAVCODEC_INCLUDE_DIR
LIBAVFORMAT_LIBRARY LIBAVUTIL_LIBRARY LIBAVDEVICE_LIBRARY
LIBAVFILTER_LIBRARY LIBSWSCALE_LIBRARY LIBSWRESAMPLE_LIBRARY)
or
CMake Error at /usr/local/share/cmake-3.24/Modules/FindCUDAToolkit.cmake:679 (message):
Could not find nvcc, please set CUDAToolkit_ROOT.
Call Stack (most recent call first):
CMakeLists.txt:48 (find_package)
the problem is ffmpeg and cuda toolkit are existed in clone.img.raw I mounted
but cmake can’t find the path or cmake just find path on host computer?
should I install all dependencies I need on host computer and then I can cross compile
or I need to change some kind of path to let cmake to find dependencies in device where I mount clone.img.raw?
I already have Jetpack 4.6.2 on Jetson AGX Xavier and I clone image from it to x86 ubuntu20.04
but I individually install L4T Driver Package (BSP) and Sample Root filesystem and CUDA 10.2 on host computer because I can’t install Jetpack 4.6.2 by SDK manager
and now I want to use cmake to build my package but cmake can’t find CUDAToolkit by find_package
Please use the SDK manager to install the CUDA for cross-compiling.
(since JP4.6.2 is a minor update from 4.6.1, please use 4.6.1 if no option for 4.6.2)
SDK manager will install a compatible CUDA library as well as a cross-compiling toolchain.
I’ve tried Jetpack5.0.2 on ubuntu20.04 and success to cross compile nvidia_multimedia_api examples
I have two questions
now on the Jetson AGX Xavier, the version of Jetpack is 4.6.2, cuda-10.2.
could I still can install jetpack5.0.2 on host computer ubuntu20.04 and
do cross compile by mounting the image cloned from Xavier with Jetpack4.6.2?
if do cross compile, those dependency like CUDA, OpenCV should be found in host computer system(/usr/)
or in clone.img.raw from($jetson/usr/local/cuda-10.2) ?
If you would like to work on Xavier 4.6.2, we would suggest use host Ubuntu 18.04. It may not work properly with 20.04. It would be stable to match Ubuntu version with Jetpack version.
Just a thought: If the cross compiler and cross linker are the correct version, and the libraries linked against are the mentioned clone.img.raw, then it shouldn’t matter if the host is Ubuntu 20.04 versus 18.04. On the other hand, I too would suggest not tempting problems and sticking with 18.04 on the host PC if this is to be used for developing for an 18.04 Jetson (L4T R32.x, JetPack 4.x). If you already have 20.04, then it is simple enough to find out (well, until something subtle shows up years later, but that might not ever happen).