php_7.3.2.bb: Fix cross build on hosts which have libxml2 installed
PATCH 1/1 php_7.3.2.bb: Fix cross build on hosts which have libxml2 installed
libxml2 is not detected properly, it pokes at host and takes the libraries and header files added to build which links in libraries like libicu which may not be available in sysroot causing configure failures like
checking for sqlite3 files in default path... found in TOPDIR/build/tmp/work/aarch64-yoe-linux/php/7.3.2-r0/recipe-sysroot/usr/lib/.. checking for SQLite 3.3.9+... checking for sqlite3_prepare_v2 in -lsqlite3... no
not found
configure: error: Please install SQLite 3.3.9 first or check libsqlite3 is present
the reason is configure test fails to find icu libraries since they were added based on build host's libxml2.pc
--- ...Use-pkg-config-for-libxml2-detection.patch | 23 ++++ ...e-pkg-config-for-FreeType2-detection.patch | 53 +++++++++ ...xt-intl-Use-pkg-config-to-detect-icu.patch | 111 ++++++++++++++++++ meta-oe/recipes-devtools/php/php_7.3.2.bb | 3 + 4 files changed, 190 insertions(+) create mode 100644 meta-oe/recipes-devtools/php/php/0001-Use-pkg-config-for-libxml2-detection.patch create mode 100644 meta-oe/recipes-devtools/php/php/0048-Use-pkg-config-for-FreeType2-detection.patch create mode 100644 meta-oe/recipes-devtools/php/php/0049-ext-intl-Use-pkg-config-to-detect-icu.patch
meta-oe/recipes-devtools/php/php/0001-Use-pkg-config-for-libxml2-detection.patch new file +23 -0
@@ -0,0 +1,23 @@ +Use pkg-config for libxml2 detection. + +xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Khem Raj <[email protected]> +--- + configure.in | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -2481,8 +2481,8 @@ AC_DEFUN([PHP_SETUP_LIBXML], [ + LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` + if test "$LIBXML_VERSION" -ge "2006011"; then + found_libxml=yes +- LIBXML_LIBS=`$XML2_CONFIG --libs` +- LIBXML_INCS=`$XML2_CONFIG --cflags` ++ LIBXML_LIBS=`pkg-config --libs libxml-2.0` ++ LIBXML_INCS=`pkg-config --cflags libxml-2.0` + else + AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.]) + fi
meta-oe/recipes-devtools/php/php/0048-Use-pkg-config-for-FreeType2-detection.patch new file +53 -0
53 lines not on this page · raw message
meta-oe/recipes-devtools/php/php/0049-ext-intl-Use-pkg-config-to-detect-icu.patch new file +111 -0
111 lines not on this page · raw message
meta-oe/recipes-devtools/php/php_7.3.2.bb +3 -0
@@ -3,6 +3,9 @@ require php.inc LIC_FILES_CHKSUM = "file://LICENSE;md5=fb07bfc51f6d5e0c30b65d9701233b2e" SRC_URI += "file://0001-acinclude.m4-don-t-unset-cache-variables.patch \ + file://0048-Use-pkg-config-for-FreeType2-detection.patch \ + file://0049-ext-intl-Use-pkg-config-to-detect-icu.patch \ + file://0001-Use-pkg-config-for-libxml2-detection.patch \ " SRC_URI_append_class-target = " \ file://pear-makefile.patch \
Signature · 1 line
2.20.1