Subject: pkg/24078: bug in glib2 causes gtk2 build to dump core
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/13/2004 17:22:52
>Number:         24078
>Category:       pkg
>Synopsis:       bug in glib2 causes gtk2 build to dump core
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 13 15:43:00 UTC 2004
>Originator:     Jorge Acereda
>Release:        NetBSD 1.6ZG
System: NetBSD locus.dlsi 1.6ZG NetBSD 1.6ZG (LOCUS) #32: Mon Dec 22 16:41:55 CET 2003 root@locus.dlsi:/sys/arch/i386/compile/LOCUS i386
Architecture: i386
Machine: i386

Building gtk2 dumps core when trying to convert icons. This is due to
a bug in glib2 causing infinite recursion.

On a clean system, cd /usr/pkgsrc/x11/gtk2 && make install

My relevant settings from /etc/mk.conf:

CFLAGS+=-march=pentiumpro -pipe -g


The following workaround patch disables the call to g_strerror() that
causes the infinite loop: This should be notified to the glib
maintainers so that they can solve it The Right Way.

--- glib/gconvert.c.orig	2004-01-13 17:06:25.000000000 +0100
+++ glib/gconvert.c
@@ -403,7 +403,9 @@ open_converter (const gchar *to_codeset,
     g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
 		 _("Could not open converter from '%s' to '%s': %s"),
-		 from_codeset, to_codeset, g_strerror (errno));
+		 from_codeset, to_codeset, 
+		 "XXX error disabled to avoid recursion" /*g_strerror (errno)*/
+		 );
   return cd;