glib2 problems on amd64
bernd at knorze.de
Fri Nov 11 10:09:56 PST 2005
I built an CLFS multilib system on amd64 from the CLFS-20051028-book.
Most things run really fine. I have KDE-3.5-beta2 running and many other apps
But there seems to be a problem with glib2, but only with the 64-bit version.
It started when I tried to compile gtk2. Compilation failed with some error
message like "gmem.c::141: failed to allocate 42XXXXXXXX bytes" (can't
Then I installed a precompiled gtk2 and compiled firefox (which depends on
gtk2) successfully. But firefox crashed on startup with many "assertion
So I tracked down the problem and found that gdk-pixbuf-csource called the
function g_ascii_strup (name, -1) (which you can find at the bottom of this
posting). It turned out that the parameter "len", which was -1, was
interpreted as 42XXXXXXXX in the "if (len < 0)"-clause, which lead to the
I tried to cast "len" to "int" and something seemed to work, but there were
still "assertion failed" messages and errors.
I assumed it had something to do with gssize and searched the place where it
was defined in the glib sources and found it in $glib_source/glibconfig.h. I
changed the line "typedef signed long gssize;" to "typedef signed int
gssize;" and the problem was gone, even firefox worked wonderfully.
But dbus didn't compile with a segmentation fault which I could track down to
glib but not solve, and gimp crashes on startup with a segfault, though I
didn't track down the problem here, but I assume it's also a glib-problem
I tried precompiled glib and different versions but nothing helped.
I had the same problem with a CLFS build about two weeks ago.
On my old CLFS-system, which I built using ryan's scripts the problem didn't
So I think it might have something to do with the different glibc/gcc versions
on my old system (glibc-2.3.5 and gcc-3.4.3).
I'd like to know if anybody has the same problem.
Could it have sth to do with the boot or chroot question (I chrooted) ?
g_ascii_strup (const gchar *str,
gchar *result, *s;
g_return_val_if_fail (str != NULL, NULL);
if (len < 0)
len = strlen (str);
result = g_strndup (str, len);
for (s = result; *s; s++)
*s = g_ascii_toupper (*s);
More information about the cross-lfs