Subject: Re: bug#17118: 24.3 build on Centos 6.5: undefined ref to `g_settings_get_value

From: Glenn Morris <[email-masked]>
Date: Thu, 27 Mar 2014 11:59:04 -0400

Klaus Zeitler wrote:

> I'm trying to build emacs on my Centos 6.5 PC
> (Linux destgd0h411156 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed Oct 16
> 18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux).
>
> I simply ran "configure --prefix=..." and then "make", but make fails
> with linker errors for temacs:
[...]
> xsettings.o: In function `something_changed_gsettingsCB':
> /opt/kze/emacs-24.3/src/xsettings.c:215: undefined reference to `g_settings_get_value'

Please see my explanation here:

http://lists.gnu.org/archive/html/help-gnu-emacs/2014-03/msg00503.html

Red Hat has taken the unusual step of ripping out the gsettings related
parts of their glib library. So they have something that advertises
itself as gio 2.26.1, but does not include gsettings.

I think this is an odd thing to do. I encourage anyone with a RH
subscription to report it as a bug against glib2-devel.

In Emacs, you can work around it by using configure --without-gsettings.

But Emacs should add a configure test to check that gsettings is really
present. I tried to do this by simply testing for gio/gsettings.h, but
sadly you can't include that header directly, it throws an error if not
included via gio/gio.h.