travar ao construir com o ffmpeg e contribuir no raspberry pi 3 modelo B (debian)

3
  • OpenCV = > 3.3.0
    • Sistema operacional / plataforma = > raspberry pi 3 modelo B (debian)
    • Compilador = > Makefiles do UNIX
    • Cmake-GUI = > 3.6.2

link (saída de compilação do terminal)

[ 39%] Linking CXX shared library ../../lib/libopencv_videoio.so /usr/bin/ld: /usr/local/lib/libx264.a(common.o): relocation R_ARM_MOVW_ABS_NC against 'a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libx264.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:228: recipe for target 'lib/libopencv_videoio.so.3.3.0' failed make[2]: * [lib/libopencv_videoio.so.3.3.0] Error 1 CMakeFiles/Makefile2:4311: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed make[1]: * [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *** [all] Error 2

usando opencv = 3.3.0 opencv_contrib = 3.3.0

antes de criar I desmarcada: BUILD_opencv_world, BUILD_TBB, WITH_TBB, BUILD_opencv_python2, BUILD_opencv_python3, WITH_MATLAB, WITH_CUDA, BUILD_opencv_dnn, WITH_OPENGL, WITH_QT

e verificado: WITH_FFMPEG (padrão)

Eu instalei todas as bibliotecas (mencionadas no link abaixo) link (bibliotecas de pré-requisitos antes da construção)

Eu também tentei remover todas essas bibliotecas e construir fontes opencv com ffmpeg e contrib (ainda construo travamentos a 23% para o OPENV 3.4 e 39% para OPENV 3.3)

    
por Deekshith MR 29.01.2018 / 09:37

1 resposta

2

Parece que há algum conflito com a biblioteca x264 (você pode instalá-la mais tarde, depois de terminar com OpenCV build), remover essa biblioteca e instalar gstreamer

sudo apt-get install gstreamer1.0

Instalar dependências de
link

e

link

Abaixo está a saída de CMake

General configuration for OpenCV 3.4.0-dev
=====================================
Version control: 3.4.0-307-g14089b1

Platform:
Timestamp: 2018-02-06T06:30:15Z
Host: Linux 4.9.35-v7+ armv7l
CMake: 3.6.2
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: Release

CPU/HW features:
Baseline:
requested: DETECT
disabled: VFPV3 NEON

C/C++:
Built as dynamic libs?: YES
C++ Compiler: /usr/bin/c++ (ver 4.9.2)
C++ flags (Release):

-fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -mfp16-format=ieee -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG

C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -mfp16-format=ieee -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG

C Compiler: /usr/bin/cc
C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -mfp16-format=ieee -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG

C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -mfp16-format=ieee -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG

Linker flags (Release):
Linker flags (Debug):
ccache: NO
Precompiled headers: YES
Extra dependencies: dl m pthread rt
3rdparty dependencies:


OpenCV modules:
To be built: calib3d core features2d flann highgui
imgcodecs imgproc ml objdetect photo shape stitching superres ts video
videoio videostab
Disabled: dnn java_bindings_generator js
python_bindings_generator world
Disabled by dependency: -
Unavailable: cudaarithm cudabgsegm cudacodec
cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect
cudaoptflow cudastereo cudawarping cudev java python2 python3 viz
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: NO

GUI:
GTK+: YES (ver 3.14.5)
GThread : YES (ver 2.42.1)
GtkGlExt: NO
VTK support: NO

Media I/O:
ZLib: /usr/lib/arm-linux-gnueabihf/libz.so (ver 1.2.8)
JPEG: /usr/lib/arm-linux-gnueabihf/libjpeg.so (ver 80)
WEBP: build (ver encoder: 0x020e)
PNG: /usr/lib/arm-linux-gnueabihf/libpng.so (ver 1.2.50)
TIFF: build (ver 42 - 4.0.9)
JPEG 2000: /usr/lib/arm-linux-gnueabihf/libjasper.so (ver 1.900.1)
OpenEXR: build (ver 1.7.1)

Video I/O:
DC1394: NO
FFMPEG: YES
avcodec: YES (ver 56.1.0)
avformat: YES (ver 56.1.0)
avutil: YES (ver 54.3.0)
swscale: YES (ver 3.0.0)
avresample: YES (ver 2.1.0)
GStreamer:
base: YES (ver 1.4.4)
video: YES (ver 1.4.4)
app: YES (ver 1.4.4)
riff: YES (ver 1.4.4)
pbutils: YES (ver 1.4.4)
libv4l/libv4l2: NO
v4l/v4l2: linux/videodev2.h
gPhoto2: NO

Parallel framework: pthreads

Trace: YES (built-in)

Other third-party libraries:
Lapack: NO
Eigen: NO
Custom HAL: YES (carotene (ver 0.0.1))
Protobuf: build (3.5.1)

OpenCL: YES (no extra features)
Include path: /home/pi/OpenCV/Source/opencv/3rdparty/include/opencl/1.2
Link libraries: Dynamic load

Python (for build):

Install to:
/usr/local
-----------------------------------------------------------------

Configuring done

    
por 07.02.2018 / 07:18