mxe
mxe copied to clipboard
Failed to build package librsvg for target x86_64-w64-mingw32.static!
build stops at libsvg. Relevant message is "Package pangoft2 was not found in the pkg-config search path."
Logfile: https://gist.github.com/kiatoa/be2c4d25f92e14f4e16ff4ff52cbdbce
Thanks.
This is a duplicate. I searched for tickets mentioning libsvg but I guess I haven't figured out the magic in github search. I'll retry using one of the supported OSes.
Update: using a debian lxc instance (created with lxc launch images:debian/12 mxe) I get the exact same result.
I wasn't clear from the docs if there was a specific debian release I should use.
To make life for those of us new to cross compiling easier I suggest emphasizing not running "make" or pointing to a page with details on how to work-around or avoid this problem.
Update: using a debian lxc instance (created with lxc launch images:debian/12 mxe) I get the exact same result.
I wasn't clear from the docs if there was a specific debian release I should use.
To make life for those of us new to cross compiling easier I suggest emphasizing not running "make" or pointing to a page with details on how to work-around or avoid this problem.
The error is (really) talking: pango is not able to automatically pickup fontconfig and freetype. If you modify src/pango.mk to do it you will see that librsvg will be compiled.
I see fontconfig and freetype both mentioned in deps:
$(PKG)_DEPS := cc meson-wrapper cairo fontconfig freetype glib harfbuzz fribidi
I am new to mxe, can you give more detail on what you mean by "pango is not able to automatically pickup fontconfig and freetype" and suggest what to change? Thanks.
I had the same problem trying to compile gst-plugins-bad, which needs librsvg, which needs pangoft2 and pangocairo. As it stands right now, pangoft2 is not compiled by default when building pango. This leads to pangoft2.pc missing.
The solution is to modify pango's compilation configuration. The default for pango fontconfig and pango freetype is 'auto' (see https://github.com/GNOME/pango/blob/main/meson_options.txt), but that seems to not work. The solution is to add -Dfreetype=enabled and -Dfontconfig=enabled to the _BUILD command of mxe/src/pango.mk. Here's my example pango.mk:
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := pango
$(PKG)_WEBSITE := https://www.pango.org/
$(PKG)_DESCR := Pango
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.51.0
$(PKG)_CHECKSUM := 74efc109ae6f903bbe6af77eaa2ac6094b8ee245a2e23f132a7a8f0862d1a9f5
$(PKG)_SUBDIR := pango-$($(PKG)_VERSION)
$(PKG)_FILE := pango-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://download.gnome.org/sources/pango/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)
$(PKG)_DEPS := cc meson-wrapper cairo fontconfig freetype glib harfbuzz fribidi
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://gitlab.gnome.org/GNOME/pango/tags' | \
$(SED) -n "s,.*<a [^>]\+>v\?\([0-9]\+\.[0-9.]\+\)<.*,\1,p" | \
head -1
endef
define $(PKG)_BUILD
'$(MXE_MESON_WRAPPER)' $(MXE_MESON_OPTS) \
-Dintrospection=disabled \
-Dfreetype=enabled \
-Dfontconfig=enabled \
'$(BUILD_DIR)' '$(SOURCE_DIR)' && \
'$(MXE_NINJA)' -C '$(BUILD_DIR)' -j '$(JOBS)' && \
'$(MXE_NINJA)' -C '$(BUILD_DIR)' -j '$(JOBS)' install
endef
And a little sed command to edit the file on the fly:
sed --in-place 's:-Dintrospection=disabled \\:-Dintrospection=disabled -Dfreetype=enabled -Dfontconfig=enabled \\:g' "src/pango.mk"
Since I am building on Ubuntu 22.04, I also needed the fix from here: https://github.com/aruiz/webp-pixbuf-loader/issues/9#issuecomment-537437407
Thanks