Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libiio: fix build with libxml2 >= 2.12
@ 2023-12-29 22:04 Fabrice Fontaine
  2024-01-01 20:36 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2023-12-29 22:04 UTC (permalink / raw)
  To: buildroot; +Cc: Paul Cercueil, Fabrice Fontaine

Fix the following build failure raised since bump of libxml2 to version
2.12.1 in commit d8ac52108c12f0fcc9641b63e7922009270f96c6:

/home/buildroot/autobuild/instance-1/output-1/build/libiio-0.25/xml.c: In function 'xml_create_context':
/home/buildroot/autobuild/instance-1/output-1/build/libiio-0.25/xml.c:481:15: warning: implicit declaration of function 'xmlReadFile' [-Wimplicit-function-declaration]
  481 |         doc = xmlReadFile(xml_file, NULL, XML_PARSE_DTDVALID);
      |               ^~~~~~~~~~~
/home/buildroot/autobuild/instance-1/output-1/build/libiio-0.25/xml.c:481:43: error: 'XML_PARSE_DTDVALID' undeclared (first use in this function); did you mean 'XML_DOC_DTDVALID'?
  481 |         doc = xmlReadFile(xml_file, NULL, XML_PARSE_DTDVALID);
      |                                           ^~~~~~~~~~~~~~~~~~
      |                                           XML_DOC_DTDVALID

Fixes:
 - http://autobuild.buildroot.org/results/f97c2db33e07a02699e4650caf97de5f3c475eb8

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...l-Fix-compatibility-with-libxml-2-12.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/libiio/0001-xml-Fix-compatibility-with-libxml-2-12.patch

diff --git a/package/libiio/0001-xml-Fix-compatibility-with-libxml-2-12.patch b/package/libiio/0001-xml-Fix-compatibility-with-libxml-2-12.patch
new file mode 100644
index 0000000000..56c272aad3
--- /dev/null
+++ b/package/libiio/0001-xml-Fix-compatibility-with-libxml-2-12.patch
@@ -0,0 +1,33 @@
+From b1170cacff24cdfd3858edc2285c51cadef11488 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Sun, 10 Dec 2023 21:52:05 +0100
+Subject: [PATCH] xml: Fix compatibility with libxml 2.12
+
+libxml 2.12.0 reorganized includes, resulting in the following no longer being in scope:
+
+- XML_PARSE_DTDVALID
+- xmlReadMemory
+- xmlReadFile
+- xmlCleanupParser
+
+Signed-off-by: Jan Tojnar <jtojnar@gmail.com>
+(cherry picked from commit bb688d04294dda45e68dfaf13e3bc1187841e52a)
+
+Upstream: https://github.com/analogdevicesinc/libiio/commit/b1170cacff24cdfd3858edc2285c51cadef11488
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ xml.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/xml.c b/xml.c
+index 33f026103..3eaed92b3 100644
+--- a/xml.c
++++ b/xml.c
+@@ -10,6 +10,7 @@
+ #include "iio-private.h"
+ 
+ #include <errno.h>
++#include <libxml/parser.h>
+ #include <libxml/tree.h>
+ #include <string.h>
+ 
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libiio: fix build with libxml2 >= 2.12
  2023-12-29 22:04 [Buildroot] [PATCH 1/1] package/libiio: fix build with libxml2 >= 2.12 Fabrice Fontaine
@ 2024-01-01 20:36 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-01-01 20:36 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Paul Cercueil, buildroot

On Fri, 29 Dec 2023 23:04:27 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following build failure raised since bump of libxml2 to version
> 2.12.1 in commit d8ac52108c12f0fcc9641b63e7922009270f96c6:
> 
> /home/buildroot/autobuild/instance-1/output-1/build/libiio-0.25/xml.c: In function 'xml_create_context':
> /home/buildroot/autobuild/instance-1/output-1/build/libiio-0.25/xml.c:481:15: warning: implicit declaration of function 'xmlReadFile' [-Wimplicit-function-declaration]
>   481 |         doc = xmlReadFile(xml_file, NULL, XML_PARSE_DTDVALID);
>       |               ^~~~~~~~~~~
> /home/buildroot/autobuild/instance-1/output-1/build/libiio-0.25/xml.c:481:43: error: 'XML_PARSE_DTDVALID' undeclared (first use in this function); did you mean 'XML_DOC_DTDVALID'?
>   481 |         doc = xmlReadFile(xml_file, NULL, XML_PARSE_DTDVALID);
>       |                                           ^~~~~~~~~~~~~~~~~~
>       |                                           XML_DOC_DTDVALID
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/f97c2db33e07a02699e4650caf97de5f3c475eb8
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...l-Fix-compatibility-with-libxml-2-12.patch | 33 +++++++++++++++++++
>  1 file changed, 33 insertions(+)
>  create mode 100644 package/libiio/0001-xml-Fix-compatibility-with-libxml-2-12.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-01 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-29 22:04 [Buildroot] [PATCH 1/1] package/libiio: fix build with libxml2 >= 2.12 Fabrice Fontaine
2024-01-01 20:36 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox