package/xmlstarlet: fix host build
PATCH 1/1 package/xmlstarlet: fix host build
Provide the path to HOST_DIR for libxml, libxslt and libiconv like for the target variant.
Fixes:src/xml_C14N.c:12:31: erreur fatale?: libxml/xmlversion.h : No such file or directory
#include <libxml/xmlversion.h>
^In file included from src/trans.c:4:0:src/trans.h:32:30: erreur fatale?: libxml/xmlmemory.h : No such file or directory
#include <libxml/xmlmemory.h>
--- package/xmlstarlet/xmlstarlet.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/xmlstarlet/xmlstarlet.mk +5 -0
@@ -26,5 +26,10 @@ endif HOST_XMLSTARLET_DEPENDENCIES += host-libxml2 host-libxslt +HOST_XMLSTARLET_CONF_OPTS += \ + --with-libxml-prefix=$(HOST_DIR)/usr \ + --with-libxslt-prefix=$(HOST_DIR)/usr \ + --with-libiconv-prefix=$(HOST_DIR)/usr + $(eval $(autotools-package)) $(eval $(host-autotools-package))
Signature · 1 line
2.9.5
PATCH 1/1 package/xmlstarlet: fix host build
Hello,
Quoted 10 lines · Romain Naour
Provide the path to
HOST_DIRfor libxml, libxslt and libiconv like for the target variant.Fixes:
src/xml_C14N.c:12:31: erreur fatale?:libxml/xmlversion.h: No such file or directory#include <libxml/xmlversion.h> ^In file included from
src/trans.c:4:0:src/trans.h:32:30: erreur fatale?:libxml/xmlmemory.h: No such file or directory
#include <libxml/xmlmemory.h>
It would be nice to use LANG=C when building and copy/pasting error messages, to avoid French words in the middle :)
However: under which conditions does it fail? Why do we suddenly have this failure? Have the autobuilders noticed?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 package/xmlstarlet: fix host build
Hi Thomas,
Le 31 ao?t 2017 09:14, "Thomas Petazzoni" <
[email protected]> a ?crit :
Hello,
Quoted 5 lines · Romain Naour
Provide the path to
HOST_DIRfor libxml, libxslt and libiconv like for the target variant.Fixes:
src/xml_C14N.c:12:31: erreur fatale :libxml/xmlversion.h: No such file
or directory
Quoted 4 lines
#include <libxml/xmlversion.h> ^In file included from
src/trans.c:4:0:src/trans.h:32:30: erreur fatale :libxml/xmlmemory.h: No such file or
directory
Quoted 1 line
#include <
libxml/xmlmemory.h>
It would be nice to use LANG=C when building and copy/pasting error messages, to avoid French words in the middle :)
"No such file or directory" looks english to me at 0h40 :p
I'll fix this.
However: under which conditions does it fail? Why do we suddenly have this failure? Have the autobuilders noticed?
I had the issue locally, I think libxml-dev is installed on autobuilders. I was trying to reproduce the kodi build issue with glibc 2.26.
Bernd added recently a host variant for this package maybe that is why it was not noticed until now.
Best regards,
Romain
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170831/e82333ac/attachment.html>
PATCH 1/1 package/xmlstarlet: fix host build
Hello,
Your e-mail is badly quoted. What happened?
Quoted 4 lines · Romain Naour
It would be nice to use LANG=C when building and copy/pasting error messages, to avoid French words in the middle :)
"No such file or directory" looks english to me at 0h40 :p
But "erreur fatale" doesn't look very english, even at 0h40 :-)
Quoted 2 lines
I had the issue locally, I think libxml-dev is installed on autobuilders. I was trying to reproduce the kodi build issue with glibc 2.26.
I'd be good to understand a little bit better what's happening. My autobuilder definitely doesn't have libxml-dev installed:
$ dpkg -l | grep libxml ii libxml2:amd64 2.8.0+dfsg1-7+wheezy8 amd64 GNOME XML library
I think it could actually be the opposite: you have libxml-dev installed locally, and therefore the system-wide libxml installation gets picked up, instead of the libxml built by Buildroot in $(HOST_DIR). Could you verify this by checking if you have libxml-dev installed on your system, reproducing the issue, then see what happens when you uninstall libxml-dev ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 package/xmlstarlet: fix host build
Hi Thomas,
Le 31 ao?t 2017 09:39, "Thomas Petazzoni" <
[email protected]> a ?crit :
Hello,
Your e-mail is badly quoted. What happened?
Well, gmail app on my phone...
Quoted 4 lines · Romain Naour
It would be nice to use LANG=C when building and copy/pasting error messages, to avoid French words in the middle :)
"No such file or directory" looks english to me at 0h40 :p
But "erreur fatale" doesn't look very english, even at 0h40 :-)
I mean I missed it while copy paste ;)
Quoted 2 lines
I had the issue locally, I think libxml-dev is installed on autobuilders. I was trying to reproduce the kodi build issue with glibc 2.26.
I'd be good to understand a little bit better what's happening. My autobuilder definitely doesn't have libxml-dev installed:
$ dpkg -l | grep libxml
ii libxml2:amd64 2.8.0+dfsg1-7+wheezy8 amd64
GNOME XML libraryI think it could actually be the opposite: you have libxml-dev installed locally, and therefore the system-wide libxml installation gets picked up, instead of the libxml built by Buildroot in $(HOST_DIR). Could you verify this by checking if you have libxml-dev installed on your system, reproducing the issue, then see what happens when you uninstall libxml-dev ?
Libxml-dev wasn't installed on my host.
I'll take a look later today.
Btw, host-xmlstarlet is a dependendy of kodi package which depends on java installed on the host.
Maybe host-xmlstarlet is never build on the autobuiders ?
Can you try to build it ?
Best regard,
Romain
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170831/2fde888d/attachment.html>
PATCH 1/1 package/xmlstarlet: fix host build
Hello,
Quoted 1 line · Romain Naour
Well, gmail app on my phone...
Gaah, horrible (again with this e-mail).
Quoted 9 lines
Libxml-dev wasn't installed on my host.
I'll take a look later today.Btw, host-xmlstarlet is a dependendy of kodi package which depends on java installed on the host.
Maybe host-xmlstarlet is never build on the autobuiders ?
Can you try to build it ?
It builds fine on my autobuilder:
Quoted 1 line
Quoted 1 line
Quoted 1 line
host-xmlstarlet 1.6.1 Building
PATH="/home/test/foo/host/bin:/home/test/foo/host/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" PKG_CONFIG="/home/test/foo/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/test/foo/host/lib/pkgconfig:/home/test/foo/host/share/pkgconfig" /usr/bin/make -j9 -C /home/test/foo/build/host-xmlstarlet-1.6.1/ /usr/bin/make all-am
GEN src/usage.c
GEN src/c14n-usage.c
GEN src/depyx-usage.c
GEN src/edit-usage.c
GEN src/elem-usage.c
GEN src/escape-usage.c
GEN src/format-usage.c
GEN src/ls-usage.c
GEN src/pyx-usage.c
GEN src/select-usage.c
GEN src/trans-usage.c
GEN src/unescape-usage.c
GEN src/validate-usage.c
CC src/trans.o
CC src/xml.o
CC src/xml_C14N.o
CC src/xml_depyx.o
CC src/xml_edit.o
CC src/xml_elem.o
CC src/xml_escape.o
CC src/xml_format.o
CC src/xml_ls.o
src/xml_edit.c: In function 'edInsert':
src/xml_edit.c:371:27: warning: 'node' may be used uninitialized in this function [-Wmaybe-uninitialized]
CC src/xml_pyx.o
CC src/xml_select.o
CC src/xml_trans.o
CC src/xml_validate.o
CC src/usage.o
CC src/c14n-usage.o
CC src/depyx-usage.o
CC src/edit-usage.o
CC src/elem-usage.o
src/xml_select.c: In function 'selPrepareXslt':
src/xml_select.c:552:17: warning: pointer targets in passing argument 3 of 'xmlStrPrintf' differ in signedness [-Wpointer-sign]
In file included from /home/test/foo/host/include/libxml2/libxml/tree.h:18:0,
from src/xml_select.c:38:
/home/test/foo/host/include/libxml2/libxml/xmlstring.h:98:17: note: expected 'const char *' but argument is of type 'xmlChar *'
CC src/escape-usage.o
CC src/format-usage.o
CC src/ls-usage.o
CC src/pyx-usage.o
CC src/select-usage.o
CC src/trans-usage.o
CC src/unescape-usage.o
CC src/validate-usage.o
CCLD xmlQuoted 1 line
Quoted 1 line
Quoted 1 line
host-xmlstarlet 1.6.1 Installing to host directory
PATH="/home/test/foo/host/bin:/home/test/foo/host/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" PKG_CONFIG="/home/test/foo/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/test/foo/host/lib/pkgconfig:/home/test/foo/host/share/pkgconfig" /usr/bin/make -j9 install -C /home/test/foo/build/host-xmlstarlet-1.6.1/
/bin/mkdir -p '/home/test/foo/host/share/doc/xmlstarlet'
/bin/mkdir -p '/home/test/foo/host/share/man/man1'
/usr/bin/install -c -m 644 doc/xmlstarlet-ug.html doc/html.css doc/xmlstarlet.txt '/home/test/foo/host/share/doc/xmlstarlet'
/usr/bin/install -c -m 644 doc/xmlstarlet.1 '/home/test/foo/host/share/man/man1'
/bin/mkdir -p '/home/test/foo/host/bin'
/usr/bin/install -c xml '/home/test/foo/host/bin'
It detects libxml and libxslt in $(HOST_DIR), according to the configure script:
checking for xml2-config... /home/test/foo/host/bin/xml2-config
configure: using libxml-2.9.4
checking for xslt-config... /home/test/foo/host/bin/xslt-config
configure: using libxslt-1.1.29
Indeed $(HOST_DIR)/bin is before /usr/bin in the PATH so it uses the Buildroot-built libraries.
Could you investigate a little bit more what's going on in your case? I believe your patch is OK, but I'd feel more comfortable with a more solid explanation.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 package/xmlstarlet: fix host build
Hi Thomas,
Le 31/08/2017 ? 13:10, Thomas Petazzoni a ?crit :
Quoted 7 lines
Hello,
Quoted 1 line · Romain Naour
Well, gmail app on my phone...
Gaah, horrible (again with this e-mail).
The phone is now in RO mode :)
Quoted 72 lines
Quoted 10 lines
Libxml-dev wasn't installed on my host.
I'll take a look later today.Btw, host-xmlstarlet is a dependendy of kodi package which depends on java installed on the host.
Maybe host-xmlstarlet is never build on the autobuiders ?
Can you try to build it ?
It builds fine on my autobuilder:
Quoted 1 line
Quoted 1 line
Quoted 1 line
host-xmlstarlet 1.6.1 Building
PATH="/home/test/foo/host/bin:/home/test/foo/host/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" PKG_CONFIG="/home/test/foo/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/test/foo/host/lib/pkgconfig:/home/test/foo/host/share/pkgconfig"
/usr/bin/make-j9 -C/home/test/foo/build/host-xmlstarlet-1.6.1//usr/bin/makeall-amGEN src/usage.c GEN src/c14n-usage.c GEN src/depyx-usage.c GEN src/edit-usage.c GEN src/elem-usage.c GEN src/escape-usage.c GEN src/format-usage.c GEN src/ls-usage.c GEN src/pyx-usage.c GEN src/select-usage.c GEN src/trans-usage.c GEN src/unescape-usage.c GEN src/validate-usage.c CC src/trans.o CC src/xml.o CC src/xml_C14N.o CC src/xml_depyx.o CC src/xml_edit.o CC src/xml_elem.o CC src/xml_escape.o CC src/xml_format.o CC src/xml_ls.o src/xml_edit.c: In function 'edInsert': src/xml_edit.c:371:27: warning: 'node' may be used uninitialized in this function [-Wmaybe-uninitialized] CC src/xml_pyx.o CC src/xml_select.o CC src/xml_trans.o CC src/xml_validate.o CC src/usage.o CC src/c14n-usage.o CC src/depyx-usage.o CC src/edit-usage.o CC src/elem-usage.o src/xml_select.c: In function 'selPrepareXslt': src/xml_select.c:552:17: warning: pointer targets in passing argument 3 of 'xmlStrPrintf' differ in signedness [-Wpointer-sign] In file included from /home/test/foo/host/include/libxml2/libxml/tree.h:18:0, from src/xml_select.c:38: /home/test/foo/host/include/libxml2/libxml/xmlstring.h:98:17: note: expected 'const char *' but argument is of type 'xmlChar *' CC src/escape-usage.o CC src/format-usage.o CC src/ls-usage.o CC src/pyx-usage.o CC src/select-usage.o CC src/trans-usage.o CC src/unescape-usage.o CC src/validate-usage.o CCLD xmlQuoted 1 line
Quoted 1 line
Quoted 1 line
host-xmlstarlet 1.6.1 Installing to host directory
PATH="/home/test/foo/host/bin:/home/test/foo/host/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" PKG_CONFIG="/home/test/foo/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/test/foo/host/lib/pkgconfig:/home/test/foo/host/share/pkgconfig"
/usr/bin/make-j9 install -C/home/test/foo/build/host-xmlstarlet-1.6.1/
/bin/mkdir-p '/home/test/foo/host/share/doc/xmlstarlet'
/bin/mkdir-p '/home/test/foo/host/share/man/man1'
/usr/bin/install-c -m 644 doc/xmlstarlet-ug.html doc/html.cssdoc/xmlstarlet.txt'/home/test/foo/host/share/doc/xmlstarlet'
/usr/bin/install-c -m 644 doc/xmlstarlet.1 '/home/test/foo/host/share/man/man1'
/bin/mkdir-p '/home/test/foo/host/bin'
/usr/bin/install-c xml '/home/test/foo/host/bin'
Quoted 7 lines
It detects libxml and libxslt in $(HOST_DIR), according to the configure script:
checking for xml2-config...
/home/test/foo/host/bin/xml2-config
configure: using libxml-2.9.4
checking for xslt-config.../home/test/foo/host/bin/xslt-config
configure: using libxslt-1.1.29
I haven't the same result here:
checking for xml2-config... /bin/xml2-config
configure: using libxml-2.9.4
checking for xslt-config... /home/naourr/buildroot-test/test/arete-glibc2.26/host/bin/xslt-config
configure: using libxslt-1.1.29
That trigger the issue (see -I//include/libxml2):
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I[...]/host/include -I//include/libxml2 -I[...]/host/include -Wall -pedantic -ansi -O2 -I[...]/host/include -c -o src/trans.o src/trans.c
[...]src/xml_C14N.c:12:31: fatal error: libxml/xmlversion.h: No such file or directory
#include <libxml/xmlversion.h>
^
In file included from src/trans.c:4:0:
src/trans.h:32:30: fatal error: libxml/xmlmemory.h: No such file or directory
#include <libxml/xmlmemory.h>
^Quoted 7 lines
Indeed $(HOST_DIR)/bin is before
/usr/binin the PATH so it uses the Buildroot-built libraries.Could you investigate a little bit more what's going on in your case? I believe your patch is OK, but I'd feel more comfortable with a more solid explanation.
Ok I'll respin...
What's about this instead ?
HOST_XMLSTARLET_CONF_ENV += \ ac_cv_path_LIBXML_CONFIG=$(HOST_DIR)/bin/xml2-config \ ac_cv_path_LIBXSLT_CONFIG=$(HOST_DIR)/bin/xslt-config
Best regards,
Romain
Quoted 5 lines
Best regards,
Thomas
PATCH 1/1 package/xmlstarlet: fix host build
Hello,
Quoted 5 lines · Romain Naour
checking for xml2-config...
/bin/xml2-config
configure: using libxml-2.9.4
checking for xslt-config.../home/naourr/buildroot-test/test/arete-glibc2.26/host/bin/xslt-config
configure: using libxslt-1.1.29
Is HOST_DIR/bin in the PATH when calling configure? Why does it use /bin/xml2-config and not the one in HOST_DIR/bin ?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 package/xmlstarlet: fix host build
Hi Thomas,
Le 31/08/2017 ? 21:33, Thomas Petazzoni a ?crit :
Quoted 4 lines
Hello,
On Thu, 31 Aug 2017 20:42:10 +0200, Romain Naour wrote:
Quoted 8 lines
Quoted 5 lines
checking for xml2-config...
/bin/xml2-config
configure: using libxml-2.9.4
checking for xslt-config.../home/naourr/buildroot-test/test/arete-glibc2.26/host/bin/xslt-config
configure: using libxslt-1.1.29Is HOST_DIR/bin in the PATH when calling configure? Why does it use
/bin/xml2-configand not the one in HOST_DIR/bin ?
HOST_DIR/bin is in the first place in the PATH used when calling configure
PATH="[...]/host/bin:...
And the content is:
ls -1 [...]/host/bin/
[...]
xml
xml2-config
xmlcatalog
xmllint
xslt-config
xsltproc
So all is ok
Let's take a look at the configure.ac:
XSTAR_LIB_CHECK([LIBXML], [xml2-config])
XSTAR_LIB_CHECK come from a local m4 file m4/xstar-check-libs.m4 where it use
AC_PATH_PROG(LIBXXX()_CONFIG, xxx_config(),
[], [$LIBXXX()_PREFIX/bin$PATH_SEPARATOR$PATH]
Since no prefix seems to be defined, AC_PATH_PROG look by itself at /bin/ for xml2-config... (bad)
Either we have to define a prefix like this patch is doing or override ac_cv_path_LIBXML_CONFIG
HOST_XMLSTARLET_CONF_ENV += \ ac_cv_path_LIBXML_CONFIG=$(HOST_DIR)/bin/xml2-config \ ac_cv_path_LIBXSLT_CONFIG=$(HOST_DIR)/bin/xslt-config
For some reason, I have this issue only on my machine at home... (Fedora 25) but not at work (debian 8).
On my machine
ls -l /
bin -> usr/bin
Maybe on debian /bin and /usr/bin is not the same directory... That's why this issue is not triged by autobuilders.
XSTAR_LIB_CHECK behavior looks dubious... why no prefix is set by default ??
Best regards,
Romain
Quoted 3 lines
Thomas