Repository: opencv
Issue: android static libs zlib missing
Labels: bug

### System Information

hello, I'm trying to use static libs on android, I included every file from the android-sdk package, in `3rdparty` and `staticlibs` directories, but

### Detailed description


	ld: error: undefined symbol: gzopen
	>>> referenced by persistence.cpp
	>>>               persistence.cpp.o:(cv::FileStorage::Impl::open(char const*, int, char const*)) /jniLibs/staticlibs/arm64-v8a/libopencv_core.a

	ld: error: undefined symbol: gzputs
	>>> referenced by persistence.cpp
	>>>               persistence.cpp.o:(cv::FileStorage::Impl::puts(char const*)) /jniLibs/staticlibs/arm64-v8a/libopencv_core.a

	ld: error: undefined symbol: gzgets
	>>> referenced by persistence.cpp
	>>>               persistence.cpp.o:(cv::FileStorage::Impl::getsFromFile(char*, int)) /jniLibs/staticlibs/arm64-v8a/libopencv_core.a

	ld: error: undefined symbol: gzeof
	>>> referenced by persistence.cpp
	>>>               persistence.cpp.o:(cv::FileStorage::Impl::eof()) /jniLibs/staticlibs/arm64-v8a/libopencv_core.a

	ld: error: undefined symbol: gzclose
	>>> referenced by persistence.cpp
	>>>               persistence.cpp.o:(cv::FileStorage::Impl::closeFile()) /jniLibs/staticlibs/arm64-v8a/libopencv_core.a

	ld: error: undefined symbol: gzrewind
	>>> referenced by persistence.cpp
	>>>               persistence.cpp.o:(cv::FileStorage::Impl::rewind()) /jniLibs/staticlibs/arm64-v8a/libopencv_core.a

	ld: error: undefined symbol: compressBound
	>>> referenced by ImfDwaCompressor.cpp:2176 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp:2176)
	>>>               ImfDwaCompressor.cpp.o:(Imf_opencv::DwaCompressor::compress(char const*, int, Imath_opencv::Box<Imath_opencv::Vec2<int> >, char const*&)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a
	>>> referenced by ImfDwaCompressor.cpp:2214 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp:2214)
	>>>               ImfDwaCompressor.cpp.o:(Imf_opencv::DwaCompressor::compress(char const*, int, Imath_opencv::Box<Imath_opencv::Vec2<int> >, char const*&)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a
	>>> referenced by ImfDwaCompressor.cpp:2267 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp:2267)
	>>>               ImfDwaCompressor.cpp.o:(Imf_opencv::DwaCompressor::compress(char const*, int, Imath_opencv::Box<Imath_opencv::Vec2<int> >, char const*&)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a
	>>> referenced 4 more times

	ld: error: undefined symbol: compress2
	>>> referenced by ImfDwaCompressor.cpp:2178 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp:2178)
	>>>               ImfDwaCompressor.cpp.o:(Imf_opencv::DwaCompressor::compress(char const*, int, Imath_opencv::Box<Imath_opencv::Vec2<int> >, char const*&)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a
	>>> referenced by ImfDwaCompressor.cpp:2217 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp:2217)
	>>>               ImfDwaCompressor.cpp.o:(Imf_opencv::DwaCompressor::compress(char const*, int, Imath_opencv::Box<Imath_opencv::Vec2<int> >, char const*&)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a
	>>> referenced by ImfDwaCompressor.cpp:2269 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp:2269)
	>>>               ImfDwaCompressor.cpp.o:(Imf_opencv::DwaCompressor::compress(char const*, int, Imath_opencv::Box<Imath_opencv::Vec2<int> >, char const*&)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a

	ld: error: undefined symbol: uncompress
	>>> referenced by ImfDwaCompressor.cpp:2518 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp:2518)
	>>>               ImfDwaCompressor.cpp.o:(Imf_opencv::DwaCompressor::uncompress(char const*, int, Imath_opencv::Box<Imath_opencv::Vec2<int> >, char const*&)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a
	>>> referenced by ImfDwaCompressor.cpp:2561 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp:2561)
	>>>               ImfDwaCompressor.cpp.o:(Imf_opencv::DwaCompressor::uncompress(char const*, int, Imath_opencv::Box<Imath_opencv::Vec2<int> >, char const*&)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a
	>>> referenced by ImfDwaCompressor.cpp:2621 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp:2621)
	>>>               ImfDwaCompressor.cpp.o:(Imf_opencv::DwaCompressor::uncompress(char const*, int, Imath_opencv::Box<Imath_opencv::Vec2<int> >, char const*&)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a
	>>> referenced 2 more times

	ld: error: undefined symbol: compress
	>>> referenced by ImfPxr24Compressor.cpp:402 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfPxr24Compressor.cpp:402)
	>>>               ImfPxr24Compressor.cpp.o:(Imf_opencv::Pxr24Compressor::compress(char const*, int, Imath_opencv::Box<Imath_opencv::Vec2<int> >, char const*&)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a
	>>> referenced by ImfZip.cpp:130 (/home/ci/opencv/3rdparty/openexr/IlmImf/ImfZip.cpp:130)
	>>>               ImfZip.cpp.o:(Imf_opencv::Zip::compress(char const*, int, char*)) /jniLibs/3rdparty/libs/arm64-v8a/libIlmImf.a

	ld: error: undefined symbol: crc32
	>>> referenced by png.c:130 (/home/ci/opencv/3rdparty/libpng/png.c:130)
	>>>               png.c.o:(png_reset_crc) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by png.c:173 (/home/ci/opencv/3rdparty/libpng/png.c:173)
	>>>               png.c.o:(png_calculate_crc) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by png.c:2375 (/home/ci/opencv/3rdparty/libpng/png.c:2375)
	>>>               png.c.o:(png_icc_set_sRGB) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced 1 more times

	ld: error: undefined symbol: inflateReset
	>>> referenced by png.c:980 (/home/ci/opencv/3rdparty/libpng/png.c:980)
	>>>               png.c.o:(png_reset_zstream) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by pngrutil.c:662 (/home/ci/opencv/3rdparty/libpng/pngrutil.c:662)
	>>>               pngrutil.c.o:(png_decompress_chunk) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by tif_zip.c:148 (/home/ci/opencv/3rdparty/libtiff/tif_zip.c:148)
	>>>               tif_zip.c.o:(ZIPPreDecode) /jniLibs/3rdparty/libs/arm64-v8a/liblibtiff.a

	ld: error: undefined symbol: adler32
	>>> referenced by png.c:2362 (/home/ci/opencv/3rdparty/libpng/png.c:2362)
	>>>               png.c.o:(png_icc_set_sRGB) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by png.c:2363 (/home/ci/opencv/3rdparty/libpng/png.c:2363)
	>>>               png.c.o:(png_icc_set_sRGB) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a

	ld: error: undefined symbol: inflateEnd
	>>> referenced by pngread.c:979 (/home/ci/opencv/3rdparty/libpng/pngread.c:979)
	>>>               pngread.c.o:(png_destroy_read_struct) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by tif_zip.c:283 (/home/ci/opencv/3rdparty/libtiff/tif_zip.c:283)
	>>>               tif_zip.c.o:(ZIPSetupEncode) /jniLibs/3rdparty/libs/arm64-v8a/liblibtiff.a
	>>> referenced by tif_zip.c:509 (/home/ci/opencv/3rdparty/libtiff/tif_zip.c:509)
	>>>               tif_zip.c.o:(ZIPCleanup) /jniLibs/3rdparty/libs/arm64-v8a/liblibtiff.a

	ld: error: undefined symbol: inflate
	>>> referenced by pngrutil.c:467 (/home/ci/opencv/3rdparty/libpng/pngrutil.c:467)
	>>>               pngrutil.c.o:(png_zlib_inflate) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by pngrutil.c:467 (/home/ci/opencv/3rdparty/libpng/pngrutil.c:467)
	>>>               pngrutil.c.o:(png_inflate_read) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by pngrutil.c:467 (/home/ci/opencv/3rdparty/libpng/pngrutil.c:467)
	>>>               pngrutil.c.o:(png_read_IDAT_data) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced 1 more times

	ld: error: undefined symbol: inflateInit2_
	>>> referenced by pngrutil.c:416 (/home/ci/opencv/3rdparty/libpng/pngrutil.c:416)
	>>>               pngrutil.c.o:(png_inflate_claim) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a

	ld: error: undefined symbol: inflateReset2
	>>> referenced by pngrutil.c:407 (/home/ci/opencv/3rdparty/libpng/pngrutil.c:407)
	>>>               pngrutil.c.o:(png_inflate_claim) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a

	ld: error: undefined symbol: deflateEnd
	>>> referenced by pngwrite.c:945 (/home/ci/opencv/3rdparty/libpng/pngwrite.c:945)
	>>>               pngwrite.c.o:(png_destroy_write_struct) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by pngwutil.c:395 (/home/ci/opencv/3rdparty/libpng/pngwutil.c:395)
	>>>               pngwutil.c.o:(png_deflate_claim) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by tif_zip.c:108 (/home/ci/opencv/3rdparty/libtiff/tif_zip.c:108)
	>>>               tif_zip.c.o:(ZIPSetupDecode) /jniLibs/3rdparty/libs/arm64-v8a/liblibtiff.a
	>>> referenced 1 more times

	ld: error: undefined symbol: deflate
	>>> referenced by pngwutil.c:981 (/home/ci/opencv/3rdparty/libpng/pngwutil.c:981)
	>>>               pngwutil.c.o:(png_compress_IDAT) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by pngwutil.c:580 (/home/ci/opencv/3rdparty/libpng/pngwutil.c:580)
	>>>               pngwutil.c.o:(png_text_compress) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a
	>>> referenced by tif_zip.c:471 (/home/ci/opencv/3rdparty/libtiff/tif_zip.c:471)
	>>>               tif_zip.c.o:(ZIPPostEncode) /jniLibs/3rdparty/libs/arm64-v8a/liblibtiff.a
	>>> referenced 1 more times

	ld: error: undefined symbol: deflateInit2_
	>>> referenced by pngwutil.c:417 (/home/ci/opencv/3rdparty/libpng/pngwutil.c:417)
	>>>               pngwutil.c.o:(png_deflate_claim) /jniLibs/3rdparty/libs/arm64-v8a/liblibpng.a


### Steps to reproduce

clang++

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)