I'm trying to install glib 2.8.3 (I do not think it is
too much different from 2.8.5). I have little-endian mips
architecture (mipsel) and am installing the library on
the RedHat Linux with core 2.4 (both on a target and on a
host).
Well, my machines use 2.6 kernel and headers, however I don't think that
is the problem and/or answer in this case.
I'm using the following parameters with configure:
./configure --prefix=<path> --build=mipsel-linux --
host=i686-linux --with-libiconv=gnu
That shouldn't be a problem as far as I can see. For what it's worth,
my glib was configured with:
./configure --prefix=/usr --host=mips64-unknown-linux-gnu
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--sysconfdir=/etc --localstatedir=/var/lib --with-threads=posix
--disable-gtk-doc --build=mips64-unknown-linux-gnu
Do you have you gtk/glib compiled from the sources on
your machine or just a binaries installed?
Compiled from sources (natively, not cross-compiled). I do use Gentoo
after all...
Do you have a ./glib/gatomic.c file compiled?
Sure do:
cthulhu .libs # file gatomic.o
gatomic.o: ELF 32-bit MSB relocatable, MIPS, N32 MIPS-IV version 1
(SYSV), not stripped
I do not quite understand how that can be (I could not see there a
section for MIPS/MIPSEL). Also, do you have any of the
G_ATOMIC_<platform> macros defined in the config.h file?
I suspect that glib is broken for cross-compile in this way. It is
probably detecting that your host i686 install can use asm code for
atomic operations, and thus enables it, which of course kills your
build. Natively, it looks like it does the RightThing(TM):
checking whether to use assembler code for atomic operations... none
-Steve