summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2022-12-13 15:08:26 +0200
committerTor Lillqvist <tml@collabora.com>2023-02-09 15:26:25 +0000
commit6a0e3532ff2c152813ee1557969d5b24c698d379 (patch)
treed8a381dc97bb9b7045c98dcf9c403bbd634ac242 /external
parent4f1527e066d440f2a15c595a38a8fcfe7d8bcfec (diff)
Use libxml2 instead of expat in bundled fontconfig in the Emscripten case
For just running LO itdelf as WASM it presumably does not matter. But, when building Collabora Online as WASM, using expat in fontconfig turns out to be problematic. The Poco library that Online uses includes a bundled expat library. For some reason the function signatures in that expat are different from those in the bundled expat library from LO core. Thus you get "RuntimeError: null function or function signature mismatch" as only the Poco copy of expat gets linked in in the WASM binary and when code in fontconfig tries to call expat code the signatures don't match. Change-Id: Ic035bb7aab06564ad0050519a2d7a0975ad3a14d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144049 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146716 Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'external')
-rw-r--r--external/fontconfig/ExternalProject_fontconfig.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/external/fontconfig/ExternalProject_fontconfig.mk b/external/fontconfig/ExternalProject_fontconfig.mk
index 9f85faa393e4..f3675258fdea 100644
--- a/external/fontconfig/ExternalProject_fontconfig.mk
+++ b/external/fontconfig/ExternalProject_fontconfig.mk
@@ -27,6 +27,7 @@ $(call gb_ExternalProject_get_state_target,fontconfig,build) :
$(if $(filter EMSCRIPTEN,$(OS)),-pthread)" \
$(if $(filter ANDROID,$(OS)),LIBS="-lm") \
LDFLAGS="$(call gb_ExternalProject_get_link_flags,fontconfig)" \
+ $(if $(filter EMSCRIPTEN,$(OS)),LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" LIBXML2_LIBS="$(LIBXML_LIBS)") \
$(gb_RUN_CONFIGURE) ./configure \
--disable-shared \
--disable-silent-rules \
@@ -39,6 +40,7 @@ $(call gb_ExternalProject_get_state_target,fontconfig,build) :
--with-baseconfigdir=/instdir/share/fontconfig \
--with-cache-dir=/instdir/share/fontconfig/cache \
--with-add-fonts=/instdir/share/fonts \
+ --enable-libxml2 \
ac_cv_func_fstatfs=no ac_cv_func_fstatvfs=no \
) \
&& $(MAKE) -C src && $(MAKE) fonts.conf \