Ошибка 'std :: exception' при кросс-компиляции OpenCV 4 - PullRequest
0 голосов
/ 15 апреля 2019

При кросс-компиляции OpenCV 4.0.1 получает ошибку:

/ home / atmark / opencv-4.0.1 / modules / core / src / parallel.cpp: 267: 14: ошибка: «exception_ptr» в пространстве имен «std» не называет тип std :: exception_ptr pException;

Но я уже включил C ++ 11.

CMake:

sizeof(void) = 4 on x86 / x86_64 processor. Assume 32-bit compilation mode (X86=1)
Looking for ccache - not found
SSE is not supported by C++ compiler
SSE2 is not supported by C++ compiler
SSE3 is not supported by C++ compiler
SSSE3 is not supported by C++ compiler
SSE4_1 is not supported by C++ compiler
POPCNT is not supported by C++ compiler
SSE4_2 is not supported by C++ compiler
FP16 is not supported by C++ compiler
AVX is not supported by C++ compiler
Optimization SSE2 is not available, skipped
Dispatch optimization SSE4_1 is not available, skipped
Dispatch optimization SSE4_2 is not available, skipped
Dispatch optimization AVX is not available, skipped
Dispatch optimization FP16 is not available, skipped
Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR) (Required is at least version "1.2.3")
Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR) 
libjpeg-turbo: VERSION = 1.5.3, BUILD = opencv-4.0.1-libjpeg-turbo
Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 
Could NOT find Jasper (missing:  JASPER_LIBRARIES JASPER_INCLUDE_DIR) 
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
Checking for module 'gstreamer-base-1.0'
  No package 'gstreamer-base-1.0' found
Checking for module 'gstreamer-video-1.0'
  No package 'gstreamer-video-1.0' found
Checking for module 'gstreamer-app-1.0'
  No package 'gstreamer-app-1.0' found
Checking for module 'gstreamer-riff-1.0'
  No package 'gstreamer-riff-1.0' found
Checking for module 'gstreamer-pbutils-1.0'
  No package 'gstreamer-pbutils-1.0' found
Checking for module 'gstreamer-base-0.10'
  No package 'gstreamer-base-0.10' found
Checking for module 'gstreamer-video-0.10'
  No package 'gstreamer-video-0.10' found
Checking for module 'gstreamer-app-0.10'
  No package 'gstreamer-app-0.10' found
Checking for module 'gstreamer-riff-0.10'
  No package 'gstreamer-riff-0.10' found
Checking for module 'gstreamer-pbutils-0.10'
  No package 'gstreamer-pbutils-0.10' found
Checking for module 'libdc1394-2'
  No package 'libdc1394-2' found
Checking for module 'libdc1394'
  No package 'libdc1394' found
Looking for linux/videodev2.h
Looking for linux/videodev2.h - found
Looking for sys/videoio.h
Looking for sys/videoio.h - not found
Checking for modules 'libavcodec;libavformat;libavutil;libswscale'
  No package 'libavcodec' found
  No package 'libavformat' found
  No package 'libavutil' found
  No package 'libswscale' found
Checking for module 'libavresample'
  No package 'libavresample' found
On 32-bit Linux Intel IPP can not currently be used with dynamic libs because of linker errors. Set BUILD_SHARED_LIBS=OFF
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) 
A library with BLAS API not found. Please specify library location.
LAPACK requires BLAS
A library with LAPACK API not found. Please specify library location.
Could NOT find JNI (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
OpenCV Python: during development append to PYTHONPATH: /home/atmark/opencv-4.0.1/build/python_loader
Excluding from source files list: <BUILD>/modules/core/mathfuncs_core.avx.cpp
Excluding from source files list: <BUILD>/modules/core/stat.sse4_2.cpp
Excluding from source files list: <BUILD>/modules/core/arithm.sse4_1.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse2.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse3.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.ssse3.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse4_1.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse4_2.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.avx.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.fp16.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.avx2.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin256.avx2.cpp
Excluding from source files list: modules/imgproc/src/resize.sse4_1.cpp
Excluding from source files list: modules/imgproc/src/corner.avx.cpp
Excluding from source files list: modules/imgproc/src/imgwarp.sse4_1.cpp
Excluding from source files list: modules/imgproc/src/filter.avx2.cpp
Excluding from source files list: modules/imgproc/src/imgwarp.avx2.cpp
Excluding from source files list: modules/imgproc/src/resize.avx2.cpp
Excluding from source files list: <BUILD>/modules/imgproc/accum.sse4_1.cpp
Excluding from source files list: <BUILD>/modules/imgproc/accum.avx.cpp
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx.cpp
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx2.cpp
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
Excluding from source files list: <BUILD>/modules/gapi/backends/fluid/gfluidimgproc_func.sse4_1.cpp
Excluding from source files list: modules/features2d/src/fast.avx2.cpp
Excluding from source files list: modules/calib3d/src/undistort.avx2.cpp

General configuration for OpenCV 4.0.1 =====================================
  Version control:               unknown

  Platform:
    Timestamp:                   2019-04-15T07:25:55Z
    Host:                        Linux 3.2.0-4-amd64 x86_64
    CMake:                       3.5.1
    CMake generator:             Unix Makefiles
    CMake build tool:            /usr/bin/make
    Configuration:               Release

  CPU/HW features:
    Baseline:
      requested:                 SSE2
    Dispatched code generation:
      requested:                 SSE4_1 SSE4_2 AVX FP16

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                /usr/bin/arm-linux-gnueabi-g++-4.9  (ver 4.9.2)
    C++ flags (Release):         -std=c++11   -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-narrowing -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  -DNDEBUG
    C++ flags (Debug):           -std=c++11   -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-narrowing -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 -g  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  /usr/bin/arm-linux-gnueabi-gcc-4.9
    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 -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -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 -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -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 dnn features2d flann gapi highgui imgcodecs imgproc java_bindings_generator ml objdetect photo python_bindings_generator stitching ts video videoio
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 java js python2 python3
    Applications:                tests perf_tests apps
    Documentation:               NO
    Non-free algorithms:         NO

  GUI: 
    GTK+:                        NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        build (ver 1.2.11)
    JPEG:                        libjpeg-turbo (ver 1.5.3-62)
    WEBP:                        build (ver encoder: 0x020e)
    PNG:                         build (ver 1.6.35)
    TIFF:                        build (ver 42 - 4.0.9)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 1.7.1)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      NO
      avcodec:                   NO
      avformat:                  NO
      avutil:                    NO
      swscale:                   NO
      avresample:                NO
    GStreamer:                   NO
    v4l/v4l2:                    linux/videodev2.h

  Parallel framework:            pthreads

  Trace:                         YES (with Intel ITT)

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

  OpenCL:                        YES (no extra features)
    Include path:                /home/atmark/opencv-4.0.1/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python (for build):            /usr/bin/python2.7

  Java:                          
    ant:                         NO
    JNI:                         NO
    Java wrappers:               NO
    Java tests:                  NO

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

Configuring done
Generating done

Если у вас есть лучшее решение, поделитесь им, вот мой нынешний способ ...

#undef CV__EXCEPTION_PTR // Add this line, disable the EXCEPTION_PTR
#ifndef CV__EXCEPTION_PTR
#  define CV__EXCEPTION_PTR 0
#elif CV__EXCEPTION_PTR
#  include <exception>  // std::exception_ptr
#endif
...