[Libreoffice-commits] core.git: configure.ac

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 7 10:54:16 UTC 2020


 configure.ac |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 2f47a1fb74ce73d4b9ef49aaf02e3b0750fd0a79
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Sep 7 10:55:35 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Sep 7 12:53:34 2020 +0200

    Android apparently needs -lm in LIBXML_LIBS for --without-system-libxml2
    
    After a574bb602031f0d1febb059c7dc9d1c4937271c6 "external/redland: Honour
    LIBXML_CFLAGS/LIBS in raptor's configure", ExternalProject_raptor started to
    fail on Android with
    
    > configure: error: libxml2 is not available - please get it from http://xmlsoft.org/
    
    due to
    
    > configure:11263: checking for xmlCreatePushParserCtxt
    > configure:11263: .../android-ndk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang  -target aarch64-linux-android21 -no-canonical-prefixes -ffunction-sections -fdata-sections -Qunused-arguments -o conftest  -O -fvisibility=hidden     -I.../workdir/UnpackedTarball/libxml2/include     conftest.c     -L.../workdir/UnpackedTarball/libxml2/.libs -lxml2 >&5
    > .../workdir/UnpackedTarball/libxml2/.libs/libxml2.a(xpath.o): In function `xmlXPathFormatNumber':
    > xpath.c:(.text.xmlXPathFormatNumber+0x3d4): undefined reference to `log10'
    > .../workdir/UnpackedTarball/libxml2/.libs/libxml2.a(xpath.o): In function `xmlXPathStringEvalNumber':
    > xpath.c:(.text.xmlXPathStringEvalNumber+0x3e0): undefined reference to `pow'
    > xpath.c:(.text.xmlXPathStringEvalNumber+0x69c): undefined reference to `pow'
    > .../workdir/UnpackedTarball/libxml2/.libs/libxml2.a(xpath.o): In function `xmlXPathModValues':
    > xpath.c:(.text.xmlXPathModValues+0x144): undefined reference to `fmod'
    > .../workdir/UnpackedTarball/libxml2/.libs/libxml2.a(xpath.o): In function `xmlXPathCompNumber':
    > xpath.c:(.text.xmlXPathCompNumber+0x394): undefined reference to `pow'
    > xpath.c:(.text.xmlXPathCompNumber+0x62c): undefined reference to `pow'
    > clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    in workdir/UnpackedTarball/raptor/config.log, and the old way of unconditionally
    re-determining LIBXML_LIBS in workdir/UnpackedTarball/raptor/configure via
    `$XML_CONFIG --libs` had set it to
    
    > -L/data/sbergman/lo-android-aarch64/core/workdir/UnpackedTarball/libxml2/.libs -lxml2 -lm
    
    which differs from the value hardcoded in configure.ac in the trailing "-lm".
    
    Change-Id: Ifc4a70e014a826a38ad92125b6851d40e15c3c7a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102154
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/configure.ac b/configure.ac
index de64c5db4b40..02d9f81bb551 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8845,6 +8845,9 @@ else
         LIBXML_LIBS="${WORKDIR}/UnpackedTarball/libxml2/win32/bin.msvc/libxml2.lib"
     else
         LIBXML_LIBS="-L${WORKDIR}/UnpackedTarball/libxml2/.libs -lxml2"
+        if test "$_os" = Android; then
+            LIBXML_LIBS="$LIBXML_LIBS -lm"
+        fi
     fi
     BUILD_TYPE="$BUILD_TYPE LIBXML2"
 fi


More information about the Libreoffice-commits mailing list