GNOME Bugzilla – Bug 796085
Meson: Many apps breaks on non-glibc because of missing libintl
Last modified: 2018-05-15 17:01:48 UTC
I made a mistake in previous bugs that fixed missing link to libintl. I thought it was an internal dependency of glib and apps were linking on it explicitly. That's wrong, actually when building glib for Android with autotools -lintl is in public libraries of the .pc file.
Created attachment 371984 [details] [review] Meson: libintl is a public dependency of glib-2.0 On non-glibc platforms gettext is provided by extra libintl dependency. We wrongly thought libintl is an internal dependency and applications needs to explicitly link on it, but turns out that breaks many applications and with autotools the .pc generated actually has -lintl in public "Libs:".
Have you checked this by looking at the .pc files generated by the autotools build for non-glibc platforms? I assume they’re going to be correct. (And what else differs between the Meson and autotools .pc files for non-glibc platforms?)
glib-2.0 generated by meson for Android: prefix=/home/xclaesse/programmation/cerbero-meson/build/dist/android_arm64 libdir=${prefix}/lib includedir=${prefix}/include bindir=${prefix}/bin glib_genmarshal=${bindir}/glib-genmarshal gobject_query=${bindir}/gobject-query glib_mkenums=${bindir}/glib-mkenums Name: GLib Description: C Utility Library Version: 2.57.0 Libs: -L${libdir} -lglib-2.0 -lintl Libs.private: -L${libdir} -lcharset -lgnulib -lpcre -pthread -liconv Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include glib-2.0 generated by autotools for Android: prefix=/home/xclaesse/programmation/cerbero-plop/build/dist/android_arm64 exec_prefix=${prefix} libdir=/home/xclaesse/programmation/cerbero-plop/build/dist/android_arm64/lib includedir=${prefix}/include glib_genmarshal=glib-genmarshal gobject_query=gobject-query glib_mkenums=glib-mkenums Name: GLib Description: C Utility Library Version: 2.57.0 Requires.private: Libs: -L${libdir} -lglib-2.0 -lintl Libs.private: -pthread -lintl -liconv Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include I checked other pc files and they seems all correct to the exception of the missing --export-dynamic but there is already an open bug about that.
Review of attachment 371984 [details] [review]: lgtm
qgit show# Bug 796085 - Meson: Many apps breaks on non-glibc because of missing libintl - NEW Attachment 371984 [details] pushed as 7b8d883 - Meson: libintl is a public dependency of glib-2.0