Skip to contentSkip to conversation

libxml2: fix static build with xz

PATCH New Baruch Siach 2 participants 3 messages Mar 28, 2016 – May 19, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxml2: fix static build with xz

Add a patch that adds '-llzma' to the output of 'xml2-config --libs' when xz is enabled. This fixes static build when xz is enabled.

Fixes:
http://autobuild.buildroot.net/results/496/496715348d1f0fb1ff1b729ab457c1993e4cab31/
http://autobuild.buildroot.net/results/89c/89c9dad226fa4df46cbbfd21e48358eb52ccadc4/

---
 .../0001-Add-xz-to-xml2-config-libs-output.patch   | 32 ++++++++++++++++++++++
 package/libxml2/libxml2.mk                         |  2 ++
 2 files changed, 34 insertions(+)
 create mode 100644 package/libxml2/0001-Add-xz-to-xml2-config-libs-output.patch
package/libxml2/0001-Add-xz-to-xml2-config-libs-output.patch new file +32 -0
new file mode 100644
index 000000000000..bb4cc873eb4a
@@ -0,0 +1,32 @@
+From: Baruch Siach <[email protected]>
+Date: Mon, 28 Mar 2016 19:56:05 +0300
+Subject: [PATCH] Add xz to xml2-config --libs output
+
+XML_LIBS should include LZMA_LIBS. This ensures that 'xml2-config --libs'
+shows -llzma when xz is enabled. Otherwise static link fails because of
+missing xz symbols.
+
+Signed-off-by: Baruch Siach <[email protected]>
+---
+Patch status: posted upstream
+(https://mail.gnome.org/archives/xml/2016-March/msg00018.html)
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 55a5a6f2c818..d965fca1eb7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1480,7 +1480,7 @@ case "$host" in
+ 	*) M_LIBS="-lm"
+ 	;;
+ esac
+-XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
++XML_LIBS="-lxml2 $Z_LIBS $LZMA_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
+ XML_LIBTOOLLIBS="libxml2.la"
+ AC_SUBST(WITH_ICONV)
+ 
+-- 
+2.8.0.rc3
+
package/libxml2/libxml2.mk +2 -0
index ee9b2ca44e30..5990ad1b2cdf 100644
@@ -10,6 +10,8 @@ LIBXML2_INSTALL_STAGING = YES
 LIBXML2_LICENSE = MIT
 LIBXML2_LICENSE_FILES = COPYING
 LIBXML2_CONFIG_SCRIPTS = xml2-config
+# Patching configure.ac
+LIBXML2_AUTORECONF = YES
 
 LIBXML2_CONF_OPTS = --with-gnu-ld --without-python --without-debug
 
Signature · 1 line
2.8.0.rc3
#1 lore raw

PATCH 1/1 libxml2: fix static build with xz

Am Mon, 28 Mar 2016 20:54:49 +0300 schrieb Baruch Siach:

Quoted 2 lines

Add a patch that adds '-llzma' to the output of 'xml2-config --libs' when xz is enabled. This fixes static build when xz is enabled.

(compile-tested http://autobuild.buildroot.net/
results/6db/6db405a097b192876c0b1b8d59051d614563c617/defconfig)

#2 lore raw

PATCH 1/1 libxml2: fix static build with xz

Hi Bernd,

Quoted 7 lines · Bernd Kuhls

Am Mon, 28 Mar 2016 20:54:49 +0300 schrieb Baruch Siach:

Quoted 2 lines

Add a patch that adds '-llzma' to the output of 'xml2-config --libs' when xz is enabled. This fixes static build when xz is enabled.

(compile-tested http://autobuild.buildroot.net/
results/6db/6db405a097b192876c0b1b8d59051d614563c617/defconfig)

Thanks.

Upstream applied this patch[1], and version 2.9.4 should be release any time now[2]. So I thought we'll just wait for that. This patch may still be considered for master though.

[1]
https://git.gnome.org/browse/libxml2/commit/?id=2e354d7432dd4fd946328c242ff5289d9bfb3ce9

[2]
https://mail.gnome.org/archives/xml/2016-May/msg00010.html

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -