Problem with Cross Compiling OpenCV for Xilinx Zynq – ARM with FFmpeg on Ubuntu Linux OS


I followed the instructions mentioned by Xilinx at in order to cross compile the OpenCV-2.4.9 with FFmpeg for Xilinx Zynq Platform on Ubuntu 14.04.

While configuring the FFmpeg, it gave me the following warning:

“WARNING: arm-xilinx-linux-gnueabi-pkg-config not found, library detection may fail.”

The FFmpeg did compile ok and generated all the necessary SO files however as a result of the warning when I tried to build the OpenCV-2.4.9, I got errors that, etc FFmpeg libraries are not found.

Following errors while build takes place :

/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: warning:, needed by opencv/ffmpeg-2.7.1/lib/, not found (try using -rpath or -rpath-link)
opencv/ffmpeg-2.7.1/lib/ undefined reference to `swr_close@LIBSWRESAMPLE_1′

/opt/Xilinx/SDK/2014.4/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.8.3/../../../../arm-xilinx-linux-gnueabi/bin/ld: warning:, needed by ../../lib/, not found (try using -rpath or -rpath-link)
../../lib/ undefined reference to `avcodec_decode_video2@LIBAVCODEC_56′


The way I have manged to resolve this and successfully cross compile OpenCV is by manually copying the SO libs from FFmpeg/lib folder to the OpenCV/build/lib directory and then rerunning the make. After this OpenCV was successfully built.


Share Button