After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796085 - Meson: Many apps breaks on non-glibc because of missing libintl
Meson: Many apps breaks on non-glibc because of missing libintl
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 790954 795982
 
 
Reported: 2018-05-13 23:44 UTC by Xavier Claessens
Modified: 2018-05-15 17:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Meson: libintl is a public dependency of glib-2.0 (6.54 KB, patch)
2018-05-13 23:45 UTC, Xavier Claessens
committed Details | Review

Description Xavier Claessens 2018-05-13 23:44:27 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.
Comment 1 Xavier Claessens 2018-05-13 23:45:13 UTC
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:".
Comment 2 Philip Withnall 2018-05-14 09:22:48 UTC
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?)
Comment 3 Xavier Claessens 2018-05-14 11:21:59 UTC
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.
Comment 4 Nirbheek Chauhan 2018-05-15 09:54:30 UTC
Review of attachment 371984 [details] [review]:

lgtm
Comment 5 Xavier Claessens 2018-05-15 17:01:40 UTC
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