ZLIB not listed in Requires.private
meowtec opened this issue · comments
I want to static link libheif.a (on macOS) but got this problem:
ld: Undefined symbols:
_inflate, referenced from:
libheif.a
was built using options:
preset=release-noplugins
WITH_AOM_DECODER=OFF
WITH_AOM_ENCODER=OFF
WITH_JPEG_DECODER=OFF
WITH_JPEG_ENCODER=OFF
WITH_EXAMPLES=OFF
And pkg-config output has no zlib:
PKG_CONFIG_PATH=/out/libheif/lib/pkgconfig pkg-config --libs --static libheif
-L/out/libheif/lib -L/opt/homebrew/Cellar/libde265/1.0.14/lib -L/opt/homebrew/Cellar/x265/3.5/lib -L/opt/homebrew/Cellar/webp/1.3.2/lib -lheif -lc++ -lde265 -lstdc++ -lx265 -lc++ -ldl -lsharpyuv
I guess because zlib is not list in Requires.private
or Libs.private
or some else place.
My guess is that the dependency comes in through WITH_DEFLATE_HEADER_COMPRESSION
. Could you please try to set WITH_DEFLATE_HEADER_COMPRESSION=OFF
during configuration. Does that remove the zlib dependency?
Thank you for testing. I will fix this, but for now, you can probably keep this switched off since header compression is not widely used (if it is used at all).
Please confirm that this works now even if WITH_DEFLATE_HEADER_COMPRESSION
is ON
.
Thank you