diff options
author | Tor Lillqvist <tml@collabora.com> | 2022-12-13 15:08:26 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2022-12-13 17:56:01 +0000 |
commit | 563c28b6508ac836fbe46369a4d2d300cda650cf (patch) | |
tree | 2edd39a50b17d51360d3a14c05a566aec3deeb2d /external | |
parent | 45003656f41858de86de38c9ef4441fb227d7bc8 (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>
Diffstat (limited to 'external')
-rw-r--r-- | external/fontconfig/ExternalProject_fontconfig.mk | 2 |
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 \ |