This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new a2d0bf344f Link zlib explicitly against static libxml2.a on macOS
a2d0bf344f is described below

commit a2d0bf344fa40ddde04b4358d51e919637b11787
Author: Jim Jagielski <[email protected]>
AuthorDate: Tue Aug 4 08:47:48 2026 -0400

    Link zlib explicitly against static libxml2.a on macOS
---
 main/forms/util/makefile.mk       | 5 ++++-
 main/xmlsecurity/util/makefile.mk | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/main/forms/util/makefile.mk b/main/forms/util/makefile.mk
index d86e08b972..dea1f96486 100644
--- a/main/forms/util/makefile.mk
+++ b/main/forms/util/makefile.mk
@@ -58,7 +58,10 @@ SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
 # missing symbols (xmlXPathValuePush, xmlXPathValuePop) that xformsxpath
 # needs. Link the intended libxml2 statically by absolute path so the
 # search order can't shadow it and no dylib needs to be bundled.
-FORMS_LIBXML2LIB:=$(shell xml2-config --prefix)/lib/libxml2.a
+# The static archive carries no dependency info (unlike a dylib, which
+# records its own link to libz), so zlib must be linked explicitly here
+# to satisfy libxml2's HTTP/gzip symbols (deflate, inflate, gzopen, ...).
+FORMS_LIBXML2LIB:=$(shell xml2-config --prefix)/lib/libxml2.a $(ZLIB3RDLIB)
 .ELSE
 FORMS_LIBXML2LIB=$(LIBXML2LIB)
 .ENDIF
diff --git a/main/xmlsecurity/util/makefile.mk 
b/main/xmlsecurity/util/makefile.mk
index ac0df884a2..34fe3c8a9b 100644
--- a/main/xmlsecurity/util/makefile.mk
+++ b/main/xmlsecurity/util/makefile.mk
@@ -127,8 +127,11 @@ SHL2STDLIBS+= $(NSS3LIB) $(NSPR4LIB)
 # and it is missing symbols (xmlCtxtPushInput, xmlXPathValuePush) that
 # xmlsec1 needs. Link the intended libxml2 statically by absolute path
 # so the search order can't shadow it and no dylib needs to be bundled.
+# The static archive carries no dependency info (unlike a dylib, which
+# records its own link to libz), so zlib must be linked explicitly here
+# to satisfy libxml2's HTTP/gzip symbols (deflate, inflate, gzopen, ...).
 XMLSECURITY_SYSTEM_LIBXML2:=$(shell xml2-config --prefix)/lib/libxml2.a
-SHL2STDLIBS+= $(XMLSECLIB-NSS) $(XMLSECLIB) $(XMLSECURITY_SYSTEM_LIBXML2) 
$(NSS3LIB) $(NSPR4LIB) $(PLC4LIB)
+SHL2STDLIBS+= $(XMLSECLIB-NSS) $(XMLSECLIB) $(XMLSECURITY_SYSTEM_LIBXML2) 
$(ZLIB3RDLIB) $(NSS3LIB) $(NSPR4LIB) $(PLC4LIB)
 .ELSE
 SHL2STDLIBS+= $(NSSCRYPTOLIBS)
 .ENDIF

Reply via email to