Subject: GLib conversion failure on OpenBSD when building gtk2
To: None <firstname.lastname@example.org>
From: Alexander Nasonov <email@example.com>
Date: 05/11/2007 12:33:21
I cannot compile x11/gtk2 on OpenBSD 4.1 because an execution of gtk-update-icon-cache --force <more args> fails with "GLib: Cannot convert message: Conversion from character set 'UTF-8' to '646' is not supported" message (it fails even without <more args> if executed manually).
I found that glib2 function _g_locale_charset_raw calls nl_langinfo (CODESET) which returns "646".
Code around nl_langinfo call looks like
# if HAVE_LANGINFO_CODESET
/* Most systems support nl_langinfo (CODESET) nowadays. */
codeset = nl_langinfo (CODESET);
/* On old systems which lack it, use setlocale or getenv. */
I disabled the first branch and ran LANG=en_US.ISO8859-1 gtk-update-icon-cache --force manually. It executed without an error but it still fails if I run LANG=en_US.ISO8859-1 bmake.
Presumably, pkgsrc either clean LANG or set it to a portable value (which is good) but it makes me wonder how to patch the _g_locale_charset_raw function without hardcoding "en_US.ISO8859-1" into it.
cvs comment of the last version of nl_langinfo.c says that
> CODESET support. okay millert@, otto@
> (not really useful for now, it mostly helps some programs which want
> to use it, it will become useful when we have full 16 bits locale).
Does anybody has an idea how to fix this problem?