Error building GLib
Im trying to build GLib-2.4.0 using the makefile.
I get this error:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -pthreads -g -O2 -Wall -MT gatomic.lo -MD -MP -MF .deps/gatomic.Tpo -c gatomic.c -fno-common -DPIC -o .libs/gatomic.o /var/tmp//cctTsmw7.s:103:Incorrect register `%rdx' used with `l' suffix make: *** [gatomic.lo] Error 1 make: *** [install-recursive] Error 1 make: *** [install-recursive] Error 1 make: *** [install] Error 2
It's likely that a newer version of glib will fix this problem.
However, if you're stuck with 2.4 for some reason, this was discussed in the gtk-devel-list at http://email@example.com/msg10924.html ... here is the workaround that was reported there.
Here is the workaround that was successful for two users in that thread:
Ah yes, I think I have stumbled on this as well. This is probably caused because the default jhbuildrc for the Mac forces a build for the 486:
When building on intel, force build to be 486, since glib won't enable asm atomic operations otherwise.
try: _f = os.popen("uname -p") if _f.read().startswith("i386"): append_autogenargs("glib", "--build=i486-apple-darwin")
I changed the last line to:
And that fixed it for me. (If you have a Mac with a Core2 processor, the user land will be in 64-bit in Snow Leopard).