From 81e2fcfff71e799652fbdd3b6e16b95eb1a3f22b Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 24 Mar 2026 10:20:29 +0100 Subject: [PATCH] Add missing libs to miniunzip linker command. This is a variant of 81015585d278 ("Add missing libs to minizip linker command.") applying to miniunzip instead of minizip. When linking these tools dynamically, the -L flag is searched for explicitly given libraries. The -lz is transitive via libminizip.la and hence the linker does not search the earlier -L$(zlib_top_builddir). This tends to not fail on native builds, because very few native builds lack a system libz.so.1, but that system copy is the one being used here. Another way to make this work would be influencing the searching of those libraries via -Wl,--rpath-link=$(zlib_top_builddir), but the explicit linking is already being used for minizip and less fragile. --- contrib/minizip/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/minizip/Makefile.am b/contrib/minizip/Makefile.am index b7dea4f7e..b626f42c1 100644 --- a/contrib/minizip/Makefile.am +++ b/contrib/minizip/Makefile.am @@ -40,7 +40,7 @@ pkgconfig_DATA = minizip.pc EXTRA_PROGRAMS = miniunzip minizip miniunzip_SOURCES = miniunz.c -miniunzip_LDADD = libminizip.la +miniunzip_LDADD = libminizip.la -lz minizip_SOURCES = minizip.c minizip_LDADD = libminizip.la -lz