BananaPi & OpenCV 4.5x

Hi all,

I try to build OpenCV from source, but fail with the following compilation error:

-- Build files have been written to: /home/pi/opencv/build
[  0%] Built target gen-pkgconfig
[  0%] Built target opencv_highgui_plugins
[  3%] Built target carotene_objs
[  4%] Built target libopenjp2
[  4%] Built target opencv_videoio_plugins
[  4%] Built target ittnotify
[  7%] Built target libtiff
[  9%] Built target tbb
[  9%] Built target quirc
[ 12%] Built target libprotobuf
[ 13%] Built target ade
[ 14%] Built target gen_opencv_python_source
[ 15%] Built target tegra_hal
make[2]: *** No rule to make target '/lib/libz.so', needed by 'lib/libopencv_core.so.4.5.5'.  Stop.
CMakeFiles/Makefile2:2538: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed

I already asked google, installed zlib1g & zlib1g-dev, used the switch -D BUILD_ZLIB=OFF, tried a sugestion to fix it over brew - which doesn’t work…

The configuration finds zlib:

– Media I/O:
– ZLib: /lib/libz.so (ver 1.2.8)

I have no idea, has somebody already solved this?

Thanks and

br

Christian