Cross-compiling OpenCV on Raspberry Pi 3

asked 2017-06-19 10:14:01 -0600

bot1131357 gravatar image

Hi OpenCV community!

I'm trying to cross-compile OpenCV into Raspberry Pi 3.

I have built ffmpeg using the toolchain, and installed it at ~/Dev/build-pi3/ffmpeg

When I run cmake for OpenCV, I get this :

$ cmake  -D CMAKE_BUILD_TYPE=RELEASE -DENABLE_NEON=ON \
-DZLIB_INCLUDE_DIR=/home/ytan/Dev/build-pi3/libz/include \
-DZLIB_LIBRARY=/home/ytan/Dev/build-pi3/libz/lib -DZLIB_LIBRARIES=libz \
-DCMAKE_TOOLCHAIN_FILE=/home/ytan/Dev/opencv/platforms/linux/armv8-rpi3-linux-gnueabihf.toolchain.cmake -D CMAKE_INSTALL_PREFIX=~/Dev/build-pi3/opencv .. 
...
(many lines)
...
-- Checking for modules 'libavcodec;libavformat;libavutil;libswscale'
--   Found libavcodec, version 57.56.100
--   Found libavformat, version 57.49.100
--   Found libavutil, version 55.29.100
--   Found libswscale, version 4.1.100
-- Checking for module 'libavresample'
--   No package 'libavresample' found
-- WARNING: Can't build ffmpeg test code

Anyone encountered this problem? How can I check why libavresample is not found and why ffmpeg test code fail to build? Some help would be appreciated.

<full log="" here="">

I'm using Xubuntu 16.04, and used crosstool-ng to build my toolchain (ct-ng armv8-rpi3-linux-gnueabihf)

edit retag flag offensive close merge delete