Skip to content

Build source code for android, face detect sample crash #13676

Closed

Description

@fengshenzhu
System information (version)
  • OpenCV => 4.0.1
  • Operating System / Platform => Android / Android 7.1.1(Device: Nexus 6)
  • Compiler => Android NDK
Detailed description

My source code build on Ubuntu is success, but the output sample face detect crashed at native. This is the crash log:

2019-01-23 14:27:30.284 21034-21100/org.opencv.samples.facedetect A/libc: Fatal signal 7 (SIGBUS), code 1, fault addr 0x95b02d13 in tid 21100 (Thread-2)
2019-01-23 14:27:30.366 21121-21121/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-01-23 14:27:30.366 21121-21121/? A/DEBUG: Build fingerprint: 'google/shamu/shamu:7.1.1/N6F27M/4299435:user/release-keys'
2019-01-23 14:27:30.366 21121-21121/? A/DEBUG: Revision: '0'
2019-01-23 14:27:30.366 21121-21121/? A/DEBUG: ABI: 'arm'
2019-01-23 14:27:30.366 21121-21121/? A/DEBUG: pid: 21034, tid: 21100, name: Thread-2  >>> org.opencv.samples.facedetect <<<
2019-01-23 14:27:30.366 21121-21121/? A/DEBUG: signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x95b02d13
2019-01-23 14:27:30.366 21121-21121/? A/DEBUG:     r0 95b02d00  r1 00000008  r2 ae95a000  r3 00000025
2019-01-23 14:27:30.366 21121-21121/? A/DEBUG:     r4 95b02d54  r5 00000000  r6 95b02d13  r7 94c6f9e0
2019-01-23 14:27:30.366 21121-21121/? A/DEBUG:     r8 0000002d  r9 00000013  sl 00000000  fp ffffffff
2019-01-23 14:27:30.366 21121-21121/? A/DEBUG:     ip 00000008  sp 94c6f998  lr ae95a020  pc 96df840c  cpsr 800b0030
2019-01-23 14:27:30.380 21121-21121/? A/DEBUG: backtrace:
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #00 pc 0030040c  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #01 pc 0030123f  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #02 pc 001f45f1  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so (_ZN2cv13parallel_for_ERKNS_5RangeERKNS_16ParallelLoopBodyEd+404)
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #03 pc 002f5e29  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #04 pc 002f41f9  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so (_ZN2cv3hal6resizeEiPKhjiiPhjiiddi+1424)
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #05 pc 002f6ba1  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so (_ZN2cv6resizeERKNS_11_InputArrayERKNS_12_OutputArrayENS_5Size_IiEEddi+464)
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #06 pc 004fe92f  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #07 pc 00501349  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #08 pc 005016db  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #09 pc 00501805  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #10 pc 005027fb  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so (_ZN2cv17CascadeClassifier16detectMultiScaleERKNS_11_InputArrayERNSt6__ndk16vectorINS_5Rect_IiEENS4_9allocatorIS7_EEEEdiiNS_5Size_IiEESD_+106)
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #11 pc 00145873  /data/app/org.opencv.samples.facedetect-1/lib/arm/libopencv_java4.so (Java_org_opencv_objdetect_CascadeClassifier_detectMultiScale_10+114)
2019-01-23 14:27:30.381 21121-21121/? A/DEBUG:     #12 pc 000f7ccf  /data/app/org.opencv.samples.facedetect-1/oat/arm/base.odex (offset 0x97000)
Steps to reproduce
  • set env of path: ANDROID_SDK, ANDROID_NDK
  • clone opencv source code and checkout branch 4.0.1
  • build source code
mkdir build
cd build
python ../platforms/android/build_sdk.py
  • Install the apko4a/opencv_android/face-detection/build/outputs/apk/debug/face-detection-armeabi-v7a-debug.apk

Activity

  1. fengshenzhu commented on Jan 23, 2019

    @fengshenzhu
    Author

    I have tried the official release at version 4.0.1, it run well. The sample prints logs when first library loaded. This is my log:

    2019-01-23 14:27:29.403 21034-21034/org.opencv.samples.facedetect D/OpenCV/StaticHelper: Library opencv_java4 loaded
    2019-01-23 14:27:29.404 21034-21034/org.opencv.samples.facedetect D/OpenCV/StaticHelper: First attempt to load libs is OK
    2019-01-23 14:27:29.405 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper: General configuration for OpenCV 4.0.1 =====================================
    2019-01-23 14:27:29.405 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Version control:               4.0.1
    2019-01-23 14:27:29.405 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Platform:
    2019-01-23 14:27:29.405 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Timestamp:                   2019-01-23T05:15:35Z
    2019-01-23 14:27:29.405 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Host:                        Linux 4.4.0-140-generic x86_64
    2019-01-23 14:27:29.405 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Target:                      Android 1 armv7-a
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     CMake:                       3.6.0-rc2
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     CMake generator:             Ninja
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     CMake build tool:            /home/em/Android/Sdk/cmake/3.6.4111459/bin/ninja
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Configuration:               Release
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   CPU/HW features:
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Baseline:                    NEON
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:       requested:                 DETECT
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   C/C++:
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Built as dynamic libs?:      NO
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C++ Compiler:                /home/em/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  (ver 8.0)
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C++ flags (Release):         --sysroot /home/em/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mfpu=vfpv3-d16 -fno-addrsig -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security -stdlib=libc++    -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 -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -Oz -DNDEBUG   -DNDEBUG
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C++ flags (Debug):           --sysroot /home/em/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mfpu=vfpv3-d16 -fno-addrsig -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security -stdlib=libc++    -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 -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -O0 -fno-limit-debug-info   -DDEBUG -D_DEBUG -g
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C Compiler:                  /home/em/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C flags (Release):           --sysroot /home/em/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mfpu=vfpv3-d16 -fno-addrsig -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security    -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 -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -Oz -DNDEBUG   -DNDEBUG
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C flags (Debug):             --sysroot /home/em/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mfpu=vfpv3-d16 -fno-addrsig -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security    -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 -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -O0 -fno-limit-debug-info   -DDEBUG -D_DEBUG -g
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Linker flags (Release):      -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now    
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Linker flags (Debug):        -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now    
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     ccache:                      YES
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Precompiled headers:         NO
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Extra dependencies:          dl m log
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     3rdparty dependencies:       tbb libcpufeatures libprotobuf zlib libjpeg-turbo libwebp libpng libtiff libjasper IlmImf quirc tegra_hal
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   OpenCV modules:
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     To be built:                 calib3d core dnn features2d flann highgui imgcodecs imgproc java java_bindings_generator ml objdetect photo stitching video videoio
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Disabled:                    world
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Disabled by dependency:      -
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Unavailable:                 gapi js python2 python3 ts
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Applications:                -
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Documentation:               NO
    2019-01-23 14:27:29.406 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Non-free algorithms:         NO
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Android NDK:                   /home/em/Android/Sdk/ndk-bundle (ver 19.0.5232133)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Android ABI:                 armeabi-v7a
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     NDK toolchain:               arm-linux-androideabi-clang
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     STL type:                    c++_static
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Native API level:            16
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Android SDK:                   /home/em/Android/Sdk (tools: 26.1.1 build tools: 28.0.3)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   GUI: 
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Media I/O: 
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     ZLib:                        build (ver 1.2.11)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     JPEG:                        build-libjpeg-turbo (ver 1.5.3-62)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     WEBP:                        build (ver encoder: 0x020e)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     PNG:                         build (ver 1.6.35)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     TIFF:                        build (ver 42 - 4.0.9)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     JPEG 2000:                   build (ver 1.900.1)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     OpenEXR:                     build (ver 1.7.1)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     HDR:                         YES
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     SUNRASTER:                   YES
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     PXM:                         YES
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     PFM:                         YES
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Video I/O:
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Parallel framework:            TBB (ver 2018.0 interface 10001)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Trace:                         YES (built-in)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Other third-party libraries:
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Custom HAL:                  YES (carotene (ver 0.0.1))
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Protobuf:                    build (3.5.1)
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Python (for build):            /usr/bin/python2.7
    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Java:                          export all functions
    2019-01-23 14:27:29.408 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     ant:                         NO
    2019-01-23 14:27:29.408 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Java wrappers:               YES
    2019-01-23 14:27:29.408 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Java tests:                  NO
    2019-01-23 14:27:29.408 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Install to:                    /home/em/proj/opencv/build/o4a/install
    2019-01-23 14:27:29.408 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper: -----------------------------------------------------------------
    2019-01-23 14:27:29.408 21034-21034/org.opencv.samples.facedetect D/OCVSample::Activity: OpenCV library found inside package. Using it!
    2019-01-23 14:27:29.408 21034-21034/org.opencv.samples.facedetect I/OCVSample::Activity: OpenCV loaded successfully
    

    And, this is the official's:

    2019-01-23 13:08:22.423 18144-18144/org.opencv.samples.facedetect D/OpenCV/StaticHelper: First attempt to load libs
    2019-01-23 13:08:22.423 18144-18144/org.opencv.samples.facedetect D/OpenCV/StaticHelper: Trying to init OpenCV libs
    2019-01-23 13:08:22.423 18144-18144/org.opencv.samples.facedetect D/OpenCV/StaticHelper: Trying to load library opencv_java4
    2019-01-23 13:08:22.423 18144-18144/org.opencv.samples.facedetect D/OpenCV/StaticHelper: Library opencv_java4 loaded
    2019-01-23 13:08:22.423 18144-18144/org.opencv.samples.facedetect D/OpenCV/StaticHelper: First attempt to load libs is OK
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper: General configuration for OpenCV 4.0.1 =====================================
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Version control:               4.0.1
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Platform:
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Timestamp:                   2018-12-22T07:35:25Z
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Host:                        Linux 4.15.0-42-generic x86_64
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Target:                      Android 1 armv7-a
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     CMake:                       3.6.0-rc2
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     CMake generator:             Ninja
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     CMake build tool:            /opt/android/android-sdk.gradle/cmake/3.6.4111459/bin/ninja
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Configuration:               Release
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   CPU/HW features:
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Baseline:                    NEON
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:       requested:                 DETECT
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   C/C++:
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Built as dynamic libs?:      NO
    2019-01-23 13:08:22.424 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C++ Compiler:                /opt/android/android-ndk-r18b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  (ver 7.0)
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C++ flags (Release):         -isystem /opt/android/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security -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 -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -Oz -DNDEBUG   -DNDEBUG
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C++ flags (Debug):           -isystem /opt/android/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security -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 -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -O0 -fno-limit-debug-info   -DDEBUG -D_DEBUG -g
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C Compiler:                  /opt/android/android-ndk-r18b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C flags (Release):           -isystem /opt/android/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security    -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 -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -Oz -DNDEBUG   -DNDEBUG
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     C flags (Debug):             -isystem /opt/android/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security    -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 -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -O0 -fno-limit-debug-info   -DDEBUG -D_DEBUG -g
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Linker flags (Release):      -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot /opt/android/android-ndk-r18b/platforms/android-16/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a -L/opt/android/android-ndk-r18b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now    
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Linker flags (Debug):        -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot /opt/android/android-ndk-r18b/platforms/android-16/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a -L/opt/android/android-ndk-r18b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now    
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     ccache:                      YES
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Precompiled headers:         NO
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Extra dependencies:          z dl m log
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     3rdparty dependencies:       tbb libcpufeatures libprotobuf libjpeg-turbo libwebp libpng libtiff libjasper IlmImf quirc tegra_hal
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   OpenCV modules:
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     To be built:                 calib3d core dnn features2d flann highgui imgcodecs imgproc java java_bindings_generator ml objdetect photo stitching video videoio
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Disabled:                    world
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Disabled by dependency:      -
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Unavailable:                 gapi js python2 python3 ts
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Applications:                -
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Documentation:               NO
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Non-free algorithms:         NO
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Android NDK:                   /opt/android/android-ndk-r18b (ver 18.1.5063045)
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Android ABI:                 armeabi-v7a
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     NDK toolchain:               arm-linux-androideabi-clang
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     STL type:                    c++_static
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Native API level:            16
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Android SDK:                   /opt/android/android-sdk.gradle (tools: 26.1.1 build tools: 28.0.3)
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   GUI: 
    2019-01-23 13:08:22.425 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Media I/O: 
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     ZLib:                        z (ver 1.2.7)
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     JPEG:                        build-libjpeg-turbo (ver 1.5.3-62)
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     WEBP:                        build (ver encoder: 0x020e)
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     PNG:                         build (ver 1.6.35)
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     TIFF:                        build (ver 42 - 4.0.9)
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     JPEG 2000:                   build (ver 1.900.1)
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     OpenEXR:                     build (ver 1.7.1)
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     HDR:                         YES
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     SUNRASTER:                   YES
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     PXM:                         YES
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     PFM:                         YES
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Video I/O:
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Parallel framework:            TBB (ver 2018.0 interface 10001)
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Trace:                         YES (built-in)
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Other third-party libraries:
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Custom HAL:                  YES (carotene (ver 0.0.1))
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Protobuf:                    build (3.5.1)
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Python (for build):            /usr/bin/python2.7
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Java:                          export all functions
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     ant:                         NO
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Java wrappers:               YES
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:     Java tests:                  NO
    2019-01-23 13:08:22.426 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Install to:                    /build/master_pack-android/build/o4a/install
    2019-01-23 13:08:22.427 18144-18144/org.opencv.samples.facedetect I/OpenCV/StaticHelper: -----------------------------------------------------------------
    2019-01-23 13:08:22.427 18144-18144/org.opencv.samples.facedetect D/OCVSample::Activity: OpenCV library found inside package. Using it!
    2019-01-23 13:08:22.427 18144-18144/org.opencv.samples.facedetect I/OCVSample::Activity: OpenCV loaded successfully
    
  2. fengshenzhu commented on Jan 23, 2019

    @fengshenzhu
    Author

    Change ndk to version r18b, it worked!

  3. hannesa2 commented on Jan 24, 2019

    @hannesa2
    Contributor

    Did you try to build with NDK 19.0 too ?

  4. fengshenzhu commented on Jan 24, 2019

    @fengshenzhu
    Author

    Did you try to build with NDK 19.0 too ?

    Yes, compiled with NDK 19 will crash. r18b is OK.

  5. fengshenzhu commented on Jan 24, 2019

    @fengshenzhu
    Author

    When loading opencv library, the version of ndk will be print like this.

    2019-01-23 14:27:29.407 21034-21034/org.opencv.samples.facedetect I/OpenCV/StaticHelper:   Android NDK:                   /home/em/Android/Sdk/ndk-bundle (ver 19.0.5232133)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions