Closed FantasqueX closed 1 month ago
-- Media I/O: -- ZLib-Ng: build (zlib ver #define ZLIB_VERSION "1.3.0.zlib-ng", zlib-ng ver 2.1.6) -- JPEG: build-libjpeg-turbo (ver 2.1.3-62) -- SIMD Support Request: YES -- SIMD Support: YES -- PNG: build (ver 1.6.37) -- HDR: YES -- SUNRASTER: YES -- PXM: YES -- PFM: YES
currently cmake output seems like above. is this PR fix this?
-- Media I/O: -- ZLib-Ng: build (zlib ver #define ZLIB_VERSION "1.3.0.zlib-ng", zlib-ng ver 2.1.6) -- JPEG: build-libjpeg-turbo (ver 2.1.3-62) -- SIMD Support Request: YES -- SIMD Support: YES -- PNG: build (ver 1.6.37) -- HDR: YES -- SUNRASTER: YES -- PXM: YES -- PFM: YES
currently cmake output seems like above. is this PR fix this?
Yes
-- Media I/O: -- ZLib-Ng: build (zlib ver 1.3.0.zlib-ng, zlib-ng ver 2.1.6) -- JPEG: build-libjpeg-turbo (ver 2.1.3-62) -- SIMD Support Request: YES -- SIMD Support: YES -- PNG: build (ver 1.6.37) -- TIFF: build (ver 42 - 4.6.0) -- HDR: YES -- SUNRASTER: YES -- PXM: YES -- PFM: YES
output after patch
just a note:
-- Media I/O: -- ZLib-Ng: build (zlib ver 1.3.0.zlib-ng, zlib-ng ver 2.1.6) -- JPEG: build-libjpeg-turbo (ver 2.1.3-62) -- SIMD Support Request: YES -- SIMD Support: YES -- PNG: build (ver 1.6.37) -- TIFF: build (ver 42 - 4.6.0) -- HDR: YES -- SUNRASTER: YES -- PXM: YES -- PFM: YES
output after patch
Great, as expected.
@FantasqueX please provide cmake options and platform how you got the issue. The patch looks reasonable, but I cannot repoduce the original issue.
@FantasqueX please provide cmake options and platform how you got the issue. The patch looks reasonable, but I cannot repoduce the original issue.
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_ZLIB_NG=ON ..
I noticed this issue on Windows 11. However, I cannot reproduce it on ArchLinux :(
Windows 11: -- ZLib-Ng: build (zlib ver #define ZLIB_VERSION "1.3.0.zlib-ng", zlib-ng ver 2.1.6)
ArchLinux: -- ZLib-Ng: build (zlib ver 1.3.0, zlib-ng ver 2.1.6)
I successfully reproduced on ArchLinux. The reason is that other find_package
commands after ocv_parse_header_version(ZLIB "${${ZLIB_LIBRARY}_SOURCE_DIR}/zlib.h.in" ZLIB_VERSION)
include find_package(ZLIB)
which results in ZLIB_VERSION_STRING
changed.
Here is the reproducing command:
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_ZLIB_NG=ON -DWITH_PNG=ON -DBUILD_PNG=ON -DWITH_TIFF=OFF -DWITH_OPENEXR=OFF -DWITH_VTK=OFF ..
Currently, zlib-ng version is 'zlib ver #define ZLIB_VERSION "1.3.0.zlib-ng"'. Because ocv_parse_header_version only accepts dot and numbers and doesn't accepts 1.3.0.zlib-ng. This patch changes ocv_parse_header_version to accept all characters between parentheses.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request