From 0d8247947eb756a8505b5930c66b034e58b10df0 Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Sat, 2 Sep 2017 22:07:41 +0200 Subject: [PATCH] package/xmlstarlet: fix host build MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Provide the path to HOST_DIR for libxml, libxslt and libiconv like for the target variant to avoid a build issue on host where /bin is a symlink to /usr/bin. Indeed, the configure script use a custom m4 macro XSTAR_LIB_CHECK to find xml2-config: XSTAR_LIB_CHECK([LIBXML], [xml2-config]) This macro 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 by $LIBXXX()_PREFIX, AC_PATH_PROG look by itself at /bin/ for xml2-config. So the PATH variable set by Buildroot containing HOST_DIR/bin is ignored. The wrong xml2-config is used during the build and the build fail when no xml2 headers are installed on the host. Fixes: src/xml_C14N.c:12:31: fatal error : libxml/xmlversion.h : No such file or directory #include ^ 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 Signed-off-by: Romain Naour Cc: Bernd Kuhls [Thomas: remove french messages from the commit log, drop --with-libiconv-prefix option, since we don't have a libiconv dependency for the host.] Signed-off-by: Thomas Petazzoni --- package/xmlstarlet/xmlstarlet.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/xmlstarlet/xmlstarlet.mk b/package/xmlstarlet/xmlstarlet.mk index 9920dcfc70..1d748dc594 100644 --- a/package/xmlstarlet/xmlstarlet.mk +++ b/package/xmlstarlet/xmlstarlet.mk @@ -26,5 +26,9 @@ endif HOST_XMLSTARLET_DEPENDENCIES += host-libxml2 host-libxslt +HOST_XMLSTARLET_CONF_OPTS += \ + --with-libxml-prefix=$(HOST_DIR)/usr \ + --with-libxslt-prefix=$(HOST_DIR)/usr + $(eval $(autotools-package)) $(eval $(host-autotools-package)) -- 2.30.2