ZLIB & PNG are found... then not found...
YLSnewb opened this issue · comments
Compiling v4.1.1 on Rocky Linux 9.2 freshly patched & booted. A fresh clone of the repository produces similar errors.
Only requisites installed are YASM and LibPNG.
$ cmake -G "Unix Makefiles"
-- CMAKE_ASM_NASM_COMPILER = /usr/local/bin/yasm
-- CMAKE_ASM_NASM_OBJECT_FORMAT = elf64
-- CMAKE_ASM_NASM_FLAGS = -DELF -D__x86_64__ -DPIC
-- SIMD extensions: x86_64 (WITH_SIMD = 1)
-- PNG reading support enabled (PNG_SUPPORTED = 1)
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Found PNG: /usr/local/lib/libpng.so (found suitable version "1.6.40", minimum required is "1.6")
-- PNG reading support enabled (PNG_SUPPORTED = 1)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find PNG (missing: PNG_LIBRARY) (Required is at least version "1.6")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindPNG.cmake:159 (find_package_handle_standard_args)
CMakeLists.txt:721 (find_package)
Disabling PNG works.
$ cmake -G "Unix Makefiles" -DPNG_SUPPORTED=OFF
-- SIMD extensions: x86_64 (WITH_SIMD = 1)
-- FLOATTEST = sse
-- RPM architecture = x86_64, DEB architecture = amd64
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/mozjpeg-4.1.1
make && make test
216/216 Test #216: jpegtran-static-crop-cmp .......................... Passed 0.00 sec
100% tests passed, 0 tests failed out of 216
Total Test time (real) = 117.51 sec
This seems related, but affected ~ v4.0.3 :
EDIT: Confirming that disabling the static build gets a clean compile...
cmake -G "Unix Makefiles" -DENABLE_STATIC=FALSE