I’m trying to integrate a custom application into an image, using Yocto. The application relies on OpenCV4Tegra and CUDA, from the meta-toradex-tegra layer.
The application’s source code can be compiled, but linking fails with these errors:
| /home/vagrant/yocto/build-apalis-tk1/tmp/sysroots/x86_64-linux/usr/libexec/arm-SCAP-linux-gnueabi/gcc/arm-SCAP-linux-gnueabi/6.4.0/ld: warning: libjpeg.so.8, needed by /home/vagrant/yocto/build-apalis-tk1/tmp/sysroots/apalis-tk1/usr/lib/libopencv_highgui.so.2.4.13, not found (try using -rpath or -rpath-link)
| /home/vagrant/yocto/build-apalis-tk1/tmp/sysroots/x86_64-linux/usr/libexec/arm-SCAP-linux-gnueabi/gcc/arm-SCAP-linux-gnueabi/6.4.0/ld: warning: libavcodec.so.54, needed by /home/vagrant/yocto/build-apalis-tk1/tmp/sysroots/apalis-tk1/usr/lib/libopencv_highgui.so.2.4.13, not found (try using -rpath or -rpath-link)
| /home/vagrant/yocto/build-apalis-tk1/tmp/sysroots/x86_64-linux/usr/libexec/arm-SCAP-linux-gnueabi/gcc/arm-SCAP-linux-gnueabi/6.4.0/ld: warning: libavformat.so.54, needed by /home/vagrant/yocto/build-apalis-tk1/tmp/sysroots/apalis-tk1/usr/lib/libopencv_highgui.so.2.4.13, not found (try using -rpath or -rpath-link)
| /home/vagrant/yocto/build-apalis-tk1/tmp/sysroots/x86_64-linux/usr/libexec/arm-SCAP-linux-gnueabi/gcc/arm-SCAP-linux-gnueabi/6.4.0/ld: warning: libavutil.so.52, needed by /home/vagrant/yocto/build-apalis-tk1/tmp/sysroots/apalis-tk1/usr/lib/libopencv_highgui.so.2.4.13, not found (try using -rpath or -rpath-link)
| /home/vagrant/yocto/build-apalis-tk1/tmp/sysroots/x86_64-linux/usr/libexec/arm-SCAP-linux-gnueabi/gcc/arm-SCAP-linux-gnueabi/6.4.0/ld: warning: libswscale.so.2, needed by /home/vagrant/yocto/build-apalis-tk1/tmp/sysroots/apalis-tk1/usr/lib/libopencv_highgui.so.2.4.13, not found (try using -rpath or -rpath-link)
I.e. the correct versions of libjpeg, libavcodec, libavformat, libavutil and libswscale are missing. libopencv_highgui.so is installed as pre-compiled binary with the opencv4tegra recipe. These missing libraries result in a lot of missing references to these libraries slightly later on in the linking process.
The versions that are available in the sysroot are:
- libjpeg.so.62
- libavcodec.so.57
- libavformat.so.57
- libavutil.so.55
- libswscale.so.4
Am I missing a configuration step to get the correct versions of these libraries (or is there perhaps a specific image recipe I should base my own recipe on)? Is there a way to get the correct versions of these libraries integrated into the system?
Thanks for helping.