external/fontconfig/ExternalProject_fontconfig.mk | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 6a0e3532ff2c152813ee1557969d5b24c698d379 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Tue Dec 13 15:08:26 2022 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Thu Feb 9 15:26:25 2023 +0000 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 <t...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146716 Tested-by: Tor Lillqvist <t...@collabora.com> 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 \