Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencv4.2.0 can't find ffmpeg #19906

Closed
huzgHost opened this issue Apr 14, 2021 · 2 comments
Closed

opencv4.2.0 can't find ffmpeg #19906

huzgHost opened this issue Apr 14, 2021 · 2 comments
Labels
category: build/install question (invalid tracker) ask questions and other "no action" items here: https://forum.opencv.org

Comments

@huzgHost
Copy link

System information (version)
  • OpenCV => 4.2.0
  • Operating System / Platform => ubuntu20.04 / ubuntu16.04
  • Compiler => arm-linux-gnueabihf-gcc(4.9.4)
Detailed description
  • build ffmpeg with arm-linux-gnueabihf-gcc( libz, x264, xvid), prefix:/workspace/arm_build/opencv_3thpart_lib
  • add to /etc/profile,and source it
    export LD_LIBRARY_PATH=/workspace/arm_build/opencv_3thpart_lib/lib
    export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/workspace/arm_build/opencv_3thpart_lib/lib/pkgconfig
    export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:/workspace/arm_build/opencv_3thpart_lib/lib
  • add new file arm_toolchain.make
    set( CMAKE_SYSTEM_NAME Linux )
    set( CMAKE_SYSTEM_PROCESSOR arm )
    set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc )
    set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ )
    set( OPENCV_ENABLE_PKG_CONFIG ON)
    set( CMAKE_FIND_ROOT_PATH "/workspace/arm_build/opencv_3thpart_lib/lib" )
    set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
    set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
    set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
  • build opencv info:
    -- The CXX compiler identification is GNU 4.9.4
    -- The C compiler identification is GNU 4.9.4
    -- Check for working CXX compiler: /workspace/arm-linux/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
    -- Check for working CXX compiler: /workspace/arm-linux/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Check for working C compiler: /workspace/arm-linux/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
    -- Check for working C compiler: /workspace/arm-linux/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detected processor: arm
    -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB (check file: cmake/checks/atomic_check.cpp)
    -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
    -- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.18", minimum required is "2.7")
    -- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "2.7")
    -- Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)
    -- If you want to enable Python/Numpy support, set the following variables:
    -- PYTHON2_INCLUDE_PATH
    -- PYTHON2_LIBRARIES (optional on Unix-like systems)
    -- PYTHON2_NUMPY_INCLUDE_DIRS
    -- PYTHON3_INCLUDE_PATH
    -- PYTHON3_LIBRARIES (optional on Unix-like systems)
    -- PYTHON3_NUMPY_INCLUDE_DIRS
    -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.5", minimum required is "3.2")
    -- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "3.8")
    -- Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)
    -- If you want to enable Python/Numpy support, set the following variables:
    -- PYTHON2_INCLUDE_PATH
    -- PYTHON2_LIBRARIES (optional on Unix-like systems)
    -- PYTHON2_NUMPY_INCLUDE_DIRS
    -- PYTHON3_INCLUDE_PATH
    -- PYTHON3_LIBRARIES (optional on Unix-like systems)
    -- PYTHON3_NUMPY_INCLUDE_DIRS
    -- Looking for ccache - found (/usr/bin/ccache)
    -- Performing Test HAVE_CXX_FSIGNED_CHAR
    -- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
    -- Performing Test HAVE_C_FSIGNED_CHAR
    -- Performing Test HAVE_C_FSIGNED_CHAR - Success
    -- Performing Test HAVE_CXX_W
    -- Performing Test HAVE_CXX_W - Success
    -- Performing Test HAVE_C_W
    -- Performing Test HAVE_C_W - Success
    -- Performing Test HAVE_CXX_WALL
    -- Performing Test HAVE_CXX_WALL - Success
    -- Performing Test HAVE_C_WALL
    -- Performing Test HAVE_C_WALL - Success
    -- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
    -- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
    -- Performing Test HAVE_C_WERROR_RETURN_TYPE
    -- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
    -- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
    -- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success
    -- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR
    -- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success
    -- Performing Test HAVE_CXX_WERROR_ADDRESS
    -- Performing Test HAVE_CXX_WERROR_ADDRESS - Success
    -- Performing Test HAVE_C_WERROR_ADDRESS
    -- Performing Test HAVE_C_WERROR_ADDRESS - Success
    -- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
    -- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
    -- Performing Test HAVE_C_WERROR_SEQUENCE_POINT
    -- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
    -- Performing Test HAVE_CXX_WFORMAT
    -- Performing Test HAVE_CXX_WFORMAT - Success
    -- Performing Test HAVE_C_WFORMAT
    -- Performing Test HAVE_C_WFORMAT - Success
    -- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
    -- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
    -- Performing Test HAVE_C_WERROR_FORMAT_SECURITY
    -- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
    -- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
    -- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
    -- Performing Test HAVE_C_WMISSING_DECLARATIONS
    -- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
    -- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
    -- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
    -- Performing Test HAVE_C_WMISSING_PROTOTYPES
    -- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
    -- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
    -- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
    -- Performing Test HAVE_C_WSTRICT_PROTOTYPES
    -- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
    -- Performing Test HAVE_CXX_WUNDEF
    -- Performing Test HAVE_CXX_WUNDEF - Success
    -- Performing Test HAVE_C_WUNDEF
    -- Performing Test HAVE_C_WUNDEF - Success
    -- Performing Test HAVE_CXX_WINIT_SELF
    -- Performing Test HAVE_CXX_WINIT_SELF - Success
    -- Performing Test HAVE_C_WINIT_SELF
    -- Performing Test HAVE_C_WINIT_SELF - Success
    -- Performing Test HAVE_CXX_WPOINTER_ARITH
    -- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
    -- Performing Test HAVE_C_WPOINTER_ARITH
    -- Performing Test HAVE_C_WPOINTER_ARITH - Success
    -- Performing Test HAVE_CXX_WSIGN_PROMO
    -- Performing Test HAVE_CXX_WSIGN_PROMO - Success
    -- Performing Test HAVE_C_WSIGN_PROMO
    -- Performing Test HAVE_C_WSIGN_PROMO - Failed
    -- Performing Test HAVE_CXX_WUNINITIALIZED
    -- Performing Test HAVE_CXX_WUNINITIALIZED - Success
    -- Performing Test HAVE_C_WUNINITIALIZED
    -- Performing Test HAVE_C_WUNINITIALIZED - Success
    -- Performing Test HAVE_CXX_WSUGGEST_OVERRIDE
    -- Performing Test HAVE_CXX_WSUGGEST_OVERRIDE - Failed
    -- Performing Test HAVE_C_WSUGGEST_OVERRIDE
    -- Performing Test HAVE_C_WSUGGEST_OVERRIDE - Failed
    -- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
    -- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
    -- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
    -- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
    -- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
    -- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
    -- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
    -- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
    -- Performing Test HAVE_CXX_WNO_COMMENT
    -- Performing Test HAVE_CXX_WNO_COMMENT - Success
    -- Performing Test HAVE_C_WNO_COMMENT
    -- Performing Test HAVE_C_WNO_COMMENT - Success
    -- Performing Test HAVE_CXX_WNO_MISSING_FIELD_INITIALIZERS
    -- Performing Test HAVE_CXX_WNO_MISSING_FIELD_INITIALIZERS - Success
    -- Performing Test HAVE_C_WNO_MISSING_FIELD_INITIALIZERS
    -- Performing Test HAVE_C_WNO_MISSING_FIELD_INITIALIZERS - Success
    -- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
    -- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
    -- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
    -- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
    -- Performing Test HAVE_CXX_PTHREAD
    -- Performing Test HAVE_CXX_PTHREAD - Success
    -- Performing Test HAVE_C_PTHREAD
    -- Performing Test HAVE_C_PTHREAD - Success
    -- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
    -- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
    -- Performing Test HAVE_C_FOMIT_FRAME_POINTER
    -- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
    -- Performing Test HAVE_CXX_FFUNCTION_SECTIONS
    -- Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success
    -- Performing Test HAVE_C_FFUNCTION_SECTIONS
    -- Performing Test HAVE_C_FFUNCTION_SECTIONS - Success
    -- Performing Test HAVE_CXX_FDATA_SECTIONS
    -- Performing Test HAVE_CXX_FDATA_SECTIONS - Success
    -- Performing Test HAVE_C_FDATA_SECTIONS
    -- Performing Test HAVE_C_FDATA_SECTIONS - Success
    -- Performing Test HAVE_CXX_MFPU_VFPV3
    -- Performing Test HAVE_CXX_MFPU_VFPV3 - Success
    -- Performing Test HAVE_CPU_NEON_SUPPORT (check file: cmake/checks/cpu_neon.cpp)
    -- Performing Test HAVE_CPU_NEON_SUPPORT - Failed
    -- Performing Test HAVE_CXX_MFPU_NEON (check file: cmake/checks/cpu_neon.cpp)
    -- Performing Test HAVE_CXX_MFPU_NEON - Success
    -- Performing Test HAVE_CPU_FP16_SUPPORT (check file: cmake/checks/cpu_fp16.cpp)
    -- Performing Test HAVE_CPU_FP16_SUPPORT - Failed
    -- Performing Test HAVE_CXX_MFPU_NEON_FP16_MFP16_FORMAT_IEEE (check file: cmake/checks/cpu_fp16.cpp)
    -- Performing Test HAVE_CXX_MFPU_NEON_FP16_MFP16_FORMAT_IEEE - Success
    -- Performing Test HAVE_CPU_BASELINE_FLAGS
    -- Performing Test HAVE_CPU_BASELINE_FLAGS - Success
    -- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
    -- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
    -- Performing Test HAVE_C_FVISIBILITY_HIDDEN
    -- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
    -- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
    -- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
    -- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
    -- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed
    -- Looking for pthread.h
    -- Looking for pthread.h - found
    -- Looking for posix_memalign
    -- Looking for posix_memalign - found
    -- Looking for malloc.h
    -- Looking for malloc.h - found
    -- Looking for memalign
    -- Looking for memalign - found
    -- Check if the system is big endian
    -- Searching 16 bit integer
    -- Looking for sys/types.h
    -- Looking for sys/types.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for stddef.h
    -- Looking for stddef.h - found
    -- Check size of unsigned short
    -- Check size of unsigned short - done
    -- Using unsigned short
    -- Check if the system is big endian - little endian
    -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) (Required is at least version "1.2.3")
    -- Looking for fseeko
    -- Looking for fseeko - found
    -- Looking for unistd.h
    -- Looking for unistd.h - found
    -- Check size of off64_t
    -- Check size of off64_t - failed
    -- Performing Test HAVE_C_WNO_SHORTEN_64_TO_32
    -- Performing Test HAVE_C_WNO_SHORTEN_64_TO_32 - Failed
    -- Performing Test HAVE_C_WNO_ATTRIBUTES
    -- Performing Test HAVE_C_WNO_ATTRIBUTES - Success
    -- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES
    -- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES - Success
    -- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES
    -- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES - Success
    -- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS
    -- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS - Success
    -- Performing Test HAVE_C_WNO_SHIFT_NEGATIVE_VALUE
    -- Performing Test HAVE_C_WNO_SHIFT_NEGATIVE_VALUE - Failed
    -- Performing Test HAVE_C_WNO_UNDEF
    -- Performing Test HAVE_C_WNO_UNDEF - Success
    -- Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH
    -- Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH - Failed
    -- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
    -- Performing Test HAVE_C_WNO_UNUSED_PARAMETER
    -- Performing Test HAVE_C_WNO_UNUSED_PARAMETER - Success
    -- Performing Test HAVE_C_WNO_SIGN_COMPARE
    -- Performing Test HAVE_C_WNO_SIGN_COMPARE - Success
    -- libjpeg-turbo: VERSION = 2.0.2, BUILD = opencv-4.2.0-libjpeg-turbo
    -- Check size of size_t
    -- Check size of size_t - done
    -- Check size of unsigned long
    -- Check size of unsigned long - done
    -- Performing Test HAVE_BUILTIN_CTZL
    -- Performing Test HAVE_BUILTIN_CTZL - Success
    -- Looking for include file locale.h
    -- Looking for include file locale.h - found
    -- Looking for include file stdlib.h
    -- Looking for include file stdlib.h - found
    -- Looking for include file sys/types.h
    -- Looking for include file sys/types.h - found
    -- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
    -- Looking for assert.h
    -- Looking for assert.h - found
    -- Looking for dlfcn.h
    -- Looking for dlfcn.h - found
    -- Looking for fcntl.h
    -- Looking for fcntl.h - found
    -- Looking for inttypes.h
    -- Looking for inttypes.h - found
    -- Looking for io.h
    -- Looking for io.h - not found
    -- Looking for limits.h
    -- Looking for limits.h - found
    -- Looking for memory.h
    -- Looking for memory.h - found
    -- Looking for search.h
    -- Looking for search.h - found
    -- Looking for string.h
    -- Looking for string.h - found
    -- Looking for strings.h
    -- Looking for strings.h - found
    -- Looking for sys/time.h
    -- Looking for sys/time.h - found
    -- Looking for unistd.h
    -- Looking for unistd.h - found
    -- Performing Test C_HAS_inline
    -- Performing Test C_HAS_inline - Success
    -- Check size of signed short
    -- Check size of signed short - done
    -- Check size of unsigned short
    -- Check size of unsigned short - done
    -- Check size of signed int
    -- Check size of signed int - done
    -- Check size of unsigned int
    -- Check size of unsigned int - done
    -- Check size of signed long
    -- Check size of signed long - done
    -- Check size of signed long long
    -- Check size of signed long long - done
    -- Check size of unsigned long long
    -- Check size of unsigned long long - done
    -- Check size of unsigned char *
    -- Check size of unsigned char * - done
    -- Check size of ptrdiff_t
    -- Check size of ptrdiff_t - done
    -- Check size of INT8
    -- Check size of INT8 - failed
    -- Check size of INT16
    -- Check size of INT16 - failed
    -- Check size of INT32
    -- Check size of INT32 - failed
    -- Looking for floor
    -- Looking for floor - not found
    -- Looking for pow
    -- Looking for pow - not found
    -- Looking for sqrt
    -- Looking for sqrt - not found
    -- Looking for isascii
    -- Looking for isascii - found
    -- Looking for memset
    -- Looking for memset - found
    -- Looking for mmap
    -- Looking for mmap - found
    -- Looking for getopt
    -- Looking for getopt - found
    -- Looking for memmove
    -- Looking for memmove - found
    -- Looking for setmode
    -- Looking for setmode - not found
    -- Looking for strcasecmp
    -- Looking for strcasecmp - found
    -- Looking for strchr
    -- Looking for strchr - found
    -- Looking for strrchr
    -- Looking for strrchr - found
    -- Looking for strstr
    -- Looking for strstr - found
    -- Looking for strtol
    -- Looking for strtol - found
    -- Looking for strtol
    -- Looking for strtol - found
    -- Looking for strtoull
    -- Looking for strtoull - found
    -- Looking for lfind
    -- Looking for lfind - found
    -- Performing Test HAVE_SNPRINTF
    -- Performing Test HAVE_SNPRINTF - Success
    -- Check if the system is big endian
    -- Searching 16 bit integer
    -- Using unsigned short
    -- Check if the system is big endian - little endian
    -- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE
    -- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE - Success
    -- Performing Test HAVE_C_WNO_UNUSED
    -- Performing Test HAVE_C_WNO_UNUSED - Success
    -- Performing Test HAVE_C_WNO_CAST_ALIGN
    -- Performing Test HAVE_C_WNO_CAST_ALIGN - Success
    -- Performing Test HAVE_C_WNO_SHADOW
    -- Performing Test HAVE_C_WNO_SHADOW - Success
    -- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED
    -- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED - Success
    -- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST
    -- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST - Success
    -- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST
    -- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST - Success
    -- Performing Test HAVE_C_WNO_MISLEADING_INDENTATION
    -- Performing Test HAVE_C_WNO_MISLEADING_INDENTATION - Failed
    -- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS
    -- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success
    -- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER
    -- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success
    -- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES
    -- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Failed
    -- Performing Test HAVE_CXX_WNO_UNDEF
    -- Performing Test HAVE_CXX_WNO_UNDEF - Success
    -- Performing Test HAVE_C_STD_C99
    -- Performing Test HAVE_C_STD_C99 - Success
    -- Performing Test HAVE_C_WNO_UNUSED_VARIABLE
    -- Performing Test HAVE_C_WNO_UNUSED_VARIABLE - Success
    -- Performing Test HAVE_C_WNO_UNUSED_FUNCTION
    -- Performing Test HAVE_C_WNO_UNUSED_FUNCTION - Success
    -- Found JPEG: libjpeg-turbo
    -- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR)
    -- Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION
    -- Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION - Success
    -- Performing Test HAVE_C_WNO_UNINITIALIZED
    -- Performing Test HAVE_C_WNO_UNINITIALIZED - Success
    -- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER
    -- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER - Success
    -- Performing Test HAVE_C_WNO_STRICT_OVERFLOW
    -- Performing Test HAVE_C_WNO_STRICT_OVERFLOW - Success
    -- Performing Test HAVE_C_WNO_POINTER_COMPARE
    -- Performing Test HAVE_C_WNO_POINTER_COMPARE - Failed
    -- Performing Test HAVE_C_WNO_ABSOLUTE_VALUE
    -- Performing Test HAVE_C_WNO_ABSOLUTE_VALUE - Failed
    -- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) (found version "1.2.11")
    -- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
    -- math lib 'libm' not found; floating point support disabled
    -- Checking for module 'gtk+-3.0'
    -- No package 'gtk+-3.0' found
    -- Checking for module 'gtk+-2.0'
    -- No package 'gtk+-2.0' found
    -- Checking for module 'gthread-2.0'
    -- No package 'gthread-2.0' found
    -- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
    -- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
    -- Could NOT find Atlas (missing: Atlas_CBLAS_INCLUDE_DIR Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY)
    -- Looking for sgemm_
    -- Looking for sgemm_ - not found
    -- Looking for pthread.h
    -- Looking for pthread.h - found
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
    -- Found Threads: TRUE
    -- Could NOT find BLAS (missing: BLAS_LIBRARIES)
    -- LAPACK requires BLAS
    -- A library with LAPACK API not found. Please specify library location.
    -- Performing Test HAVE_CXX_WNO_DEPRECATED
    -- Performing Test HAVE_CXX_WNO_DEPRECATED - Success
    -- Performing Test HAVE_CXX_WNO_SHADOW
    -- Performing Test HAVE_CXX_WNO_SHADOW - Success
    -- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS
    -- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS - Success
    -- Performing Test HAVE_CXX_WNO_SIGN_COMPARE
    -- Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success
    -- Performing Test HAVE_CXX_WNO_SIGN_PROMO
    -- Performing Test HAVE_CXX_WNO_SIGN_PROMO - Success
    -- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE
    -- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Failed
    -- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS
    -- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS - Success
    -- Performing Test HAVE_CXX_WNO_EXTRA
    -- Performing Test HAVE_CXX_WNO_EXTRA - Success
    -- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION
    -- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION - Success
    -- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE
    -- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE - Failed
    -- Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32
    -- Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32 - Failed
    -- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF
    -- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF - Success
    -- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH
    -- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH - Failed
    -- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE
    -- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE - Failed
    -- Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE
    -- Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE - Failed
    -- Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH
    -- Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH - Failed
    -- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS
    -- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS - Success
    -- Performing Test CXX_HAS_MFPU_NEON
    -- Performing Test CXX_HAS_MFPU_NEON - Success
    -- Performing Test C_HAS_MFPU_NEON
    -- Performing Test C_HAS_MFPU_NEON - Success
    -- Looking for dlerror in dl
    -- Looking for dlerror in dl - found
    -- ADE: Download: v0.1.1f.zip
    -- OpenCV Python: during development append to PYTHONPATH: /workspace/arm/opencv-4.2.0/build/python_loader
    -- Checking for modules 'libavcodec;libavformat;libavutil;libswscale'
    -- Found libavcodec, version 58.54.100
    -- Found libavformat, version 58.29.100
    -- Found libavutil, version 56.31.100
    -- Found libswscale, version 5.5.100
    CMake Warning at cmake/OpenCVUtils.cmake:845 (message):
    ocv_check_modules(FFMPEG): can't find library 'avcodec'. Specify
    'pkgcfg_lib_FFMPEG_avcodec' manually
    Call Stack (most recent call first):
    modules/videoio/cmake/detect_ffmpeg.cmake:28 (ocv_check_modules)
    modules/videoio/cmake/init.cmake:3 (include)
    modules/videoio/cmake/init.cmake:22 (add_backend)
    cmake/OpenCVModule.cmake:312 (include)
    cmake/OpenCVModule.cmake:375 (_add_modules_1)
    modules/CMakeLists.txt:7 (ocv_glob_modules)

CMake Warning at cmake/OpenCVUtils.cmake:845 (message):
ocv_check_modules(FFMPEG): can't find library 'avformat'. Specify
'pkgcfg_lib_FFMPEG_avformat' manually
Call Stack (most recent call first):
modules/videoio/cmake/detect_ffmpeg.cmake:28 (ocv_check_modules)
modules/videoio/cmake/init.cmake:3 (include)
modules/videoio/cmake/init.cmake:22 (add_backend)
cmake/OpenCVModule.cmake:312 (include)
cmake/OpenCVModule.cmake:375 (_add_modules_1)
modules/CMakeLists.txt:7 (ocv_glob_modules)

CMake Warning at cmake/OpenCVUtils.cmake:845 (message):
ocv_check_modules(FFMPEG): can't find library 'avutil'. Specify
'pkgcfg_lib_FFMPEG_avutil' manually
Call Stack (most recent call first):
modules/videoio/cmake/detect_ffmpeg.cmake:28 (ocv_check_modules)
modules/videoio/cmake/init.cmake:3 (include)
modules/videoio/cmake/init.cmake:22 (add_backend)
cmake/OpenCVModule.cmake:312 (include)
cmake/OpenCVModule.cmake:375 (_add_modules_1)
modules/CMakeLists.txt:7 (ocv_glob_modules)

CMake Warning at cmake/OpenCVUtils.cmake:845 (message):
ocv_check_modules(FFMPEG): can't find library 'swscale'. Specify
'pkgcfg_lib_FFMPEG_swscale' manually
Call Stack (most recent call first):
modules/videoio/cmake/detect_ffmpeg.cmake:28 (ocv_check_modules)
modules/videoio/cmake/init.cmake:3 (include)
modules/videoio/cmake/init.cmake:22 (add_backend)
cmake/OpenCVModule.cmake:312 (include)
cmake/OpenCVModule.cmake:375 (_add_modules_1)
modules/CMakeLists.txt:7 (ocv_glob_modules)

-- Checking for module 'libavresample'
-- No package 'libavresample' found
-- FFMPEG_INCLUDE_DIRS=/workspace/arm_build/opencv_3thpart_lib/include
CMake Error at modules/videoio/cmake/detect_ffmpeg.cmake:50 (message):
FFMPEG: test check build log:

Change Dir: /workspace/arm/opencv-4.2.0/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_531cf/fast && /usr/bin/make -f
CMakeFiles/cmTC_531cf.dir/build.make CMakeFiles/cmTC_531cf.dir/build

make[1]: Entering directory
'/workspace/arm/opencv-4.2.0/build/CMakeFiles/CMakeTmp'

Building CXX object CMakeFiles/cmTC_531cf.dir/ffmpeg_test.cpp.o

/workspace/arm-linux/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
-I/workspace/arm_build/opencv_3thpart_lib/include -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 -Wsign-promo
-Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment
-Wno-missing-field-initializers -fdiagnostics-show-option -pthread
-fomit-frame-pointer -ffunction-sections -fdata-sections
-fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -fPIE
-std=c++11 -o CMakeFiles/cmTC_531cf.dir/ffmpeg_test.cpp.o -c
/workspace/arm/opencv-4.2.0/cmake/checks/ffmpeg_test.cpp

Linking CXX executable cmTC_531cf

/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_531cf.dir/link.txt
--verbose=1

/workspace/arm-linux/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
-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 -Wsign-promo
-Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment
-Wno-missing-field-initializers -fdiagnostics-show-option -pthread
-fomit-frame-pointer -ffunction-sections -fdata-sections
-fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG
-Wl,--gc-sections CMakeFiles/cmTC_531cf.dir/ffmpeg_test.cpp.o -o cmTC_531cf
-lavcodec -lavformat -lavutil -lswscale

/workspace/arm-linux/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.4/../../../../arm-linux-gnueabihf/bin/ld:
cannot find -lavcodec

/workspace/arm-linux/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.4/../../../../arm-linux-gnueabihf/bin/ld:
cannot find -lavformat

/workspace/arm-linux/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.4/../../../../arm-linux-gnueabihf/bin/ld:
cannot find -lavutil

/workspace/arm-linux/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.4/../../../../arm-linux-gnueabihf/bin/ld:
cannot find -lswscale

collect2: error: ld returned 1 exit status

make[1]: *** [CMakeFiles/cmTC_531cf.dir/build.make:87: cmTC_531cf] Error 1

make[1]: Leaving directory
'/workspace/arm/opencv-4.2.0/build/CMakeFiles/CMakeTmp'

make: *** [Makefile:121: cmTC_531cf/fast] Error 2

Call Stack (most recent call first):
modules/videoio/cmake/init.cmake:3 (include)
modules/videoio/cmake/init.cmake:22 (add_backend)
cmake/OpenCVModule.cmake:312 (include)
cmake/OpenCVModule.cmake:375 (_add_modules_1)
modules/CMakeLists.txt:7 (ocv_glob_modules)

-- Configuring incomplete, errors occurred!
See also "/workspace/arm/opencv-4.2.0/build/CMakeFiles/CMakeOutput.log".
See also "/workspace/arm/opencv-4.2.0/build/CMakeFiles/CMakeError.log".
CMake Warning:
Value of OPENCV_BUILD_INFO_STR contained a newline; truncating

dump like this

pkg-config --libs libavcodec
-L/workspace/arm_build/opencv_3thpart_lib/lib -lavcodec
pkg-config --cflags libavcodec
-I/workspace/arm_build/opencv_3thpart_lib/include

@huzgHost
Copy link
Author

  • add pkg-config(ffmpeg...) to ~/.bashrc
    export PKG_CONFIG_PATH=/workspace/arm_build/opencv_3thpart_lib/lib/pkgconfig
    export LD_LIBRARY_PATH=/workspace/arm_build/opencv_3thpart_lib/lib
    export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:/workspace/arm_build/opencv_3thpart_lib/lib
  • arm_toolchain.make
    set( CMAKE_SYSTEM_NAME Linux )
    set( CMAKE_SYSTEM_PROCESSOR arm )
    set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc )
    set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ )
    set( OPENCV_ENABLE_PKG_CONFIG ON)
    set( CMAKE_C_FLAGS "-Wl,-rpath-link=/workspace/arm_build/opencv_3thpart_lib/lib")
    #set( CMAKE_FIND_ROOT_PATH "/workspace/arm_build/opencv_3thpart_lib/lib" )
    #set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
    #set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
    #set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
  • cmake -D CMAKE_TOOLCHAIN_FILE=../arm_toolchain.make ../
    -- Video I/O:
    -- DC1394: NO
    -- FFMPEG: YES
    -- avcodec: YES (58.54.100)
    -- avformat: YES (58.29.100)
    -- avutil: YES (56.31.100)
    -- swscale: YES (5.5.100)
    -- avresample: NO
    -- GStreamer: NO
    -- v4l/v4l2: YES (linux/videodev2.h)

@zchrissirhcz
Copy link
Contributor

zchrissirhcz commented Jun 2, 2021

+1 The rpath setting is required if using ffmpeg shared libs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: build/install question (invalid tracker) ask questions and other "no action" items here: https://forum.opencv.org
Projects
None yet
Development

No branches or pull requests

3 participants