joachimBurket / esp32-opencv

Shrinked OpenCV for ESP32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

adding objdetect for esp32

MikeSnyder360 opened this issue · comments

I'd like to use objdetect, so I tried to add that, however the build fails in a new way, related to insn.
I'm using esp-2021r2-patch3 to overcome #11
Is there a recommended version to build this library?

I also tried esp-2020r3, which had the same failure. I cannot go back any farther as this is the first that supports esp32s3.

in build_opencv_for_esp32.sh :

OPENCV_MODULES_LIST=core,objdetect

output:

[ 50%] Linking CXX static library ../../lib/libopencv_core.a
[ 50%] Built target opencv_core
[ 51%] Processing OpenCL kernels (imgproc)
[ 52%] Building CXX object modules/flann/CMakeFiles/opencv_flann.dir/src/miniflann.cpp.obj
[ 52%] Building CXX object modules/flann/CMakeFiles/opencv_flann.dir/src/flann.cpp.obj
[ 52%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/accum.cpp.obj
[ 52%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/accum.dispatch.cpp.obj
[ 53%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/approx.cpp.obj
[ 53%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/bilateral_filter.dispatch.cpp.obj
[ 54%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/blend.cpp.obj
[ 54%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/box_filter.dispatch.cpp.obj
[ 54%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/canny.cpp.obj
In file included from /Users/mike/work/brew/esp32-opencv/modules/flann/include/opencv2/flann/all_indices.h:44,
from /Users/mike/work/brew/esp32-opencv/modules/flann/src/precomp.hpp:19,
from /Users/mike/work/brew/esp32-opencv/modules/flann/src/miniflann.cpp:1:
/Users/mike/work/brew/esp32-opencv/modules/flann/include/opencv2/flann/lsh_index.h: In member function 'void cvflann::LshIndex::knnSearch(const cvflann::Matrix&, cvflann::Matrix&, cvflann::Matrix&, int, const cvflann::SearchParams&) [with Distance = cvflann::L2]':
/Users/mike/work/brew/esp32-opencv/modules/flann/include/opencv2/flann/lsh_index.h:210:5: error: insn does not satisfy its constraints:
}
^
(insn 667 20 348 62 (set (reg/v:SF 19 f0 [orig:115 result ] [115])
(mem/u/c:SF (symbol_ref/u:SI ("*.LC2851") [flags 0x2]) [0 S4 A32])) "/Users/mike/work/brew/esp32-opencv/modules/flann/include/opencv2/flann/dist.h":158 47 {movsf_internal}
(nil))
during RTL pass: postreload
/Users/mike/work/brew/esp32-opencv/modules/flann/include/opencv2/flann/lsh_index.h:210:5: internal compiler error: in extract_constrain_insn, at recog.c:2210
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See https://gcc.gnu.org/bugs/ for instructions.
make[2]: *** [modules/flann/CMakeFiles/opencv_flann.dir/src/miniflann.cpp.obj] Error 1
make[1]: *** [modules/flann/CMakeFiles/opencv_flann.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....