Skip to contentSkip to conversation

GTK/GLIB port for mipsel

DISCUSSION [email protected] 2 participants 5 messages Jan 19, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

Hello,

I'm working on building (cross-compiling) GTK for mipsel. Currently I'm in the process of installing GLIB. I could manage to successfully pass its configure script, but when running make I get an error on the gatomic.c (unsupported asm instructions). Looking there I've found out that there is no port for mipsel (neither mips) for that functionality. I checked in the glib CVS, and there is nothing about that there either.
Anyway, I suspect that porting of glib is more than just writing these 50 lines of asm code, so probably I need a mipsel port.
Unfortunately, I could not find the port in the internet -
the only reference I've found is the Debian mipsel port,
but it contains only binaries in libraries' packets. Supposedly there are source packages available from this
page: http://packages.debian.org/stable/libs/libglib2.0-0
but trying to download it I constantly see the message "packages.debian.org is down at the moment due to performance issues."

Can anybody here point me to a source where I can download a glib and gtk ports for mipsel, or at least get more info on this.

With respect,
Oleg Kruzhkov

#1 lore raw
Quoted 1 line

Can anybody here point me to a source where I can download a glib and gtk ports for mipsel, or at least get more info on this.

Well, it wouldn't surprise me if something is broken, as I get the feeling that the GNOME folks are notorious for doing unportable crap in their code. However, GTK/glib builds and works just fine for me. I suspect that either something is broken in your cross-compile setup, or you might be using ancient versions of these packages. I have both glib-2.8.5 and gtk+-2.8.10 installed on my (big-endian) machines here without any problems.

-Steve

#2 lore raw
Quoted 2 lines
Quoted 2 lines

Can anybody here point me to a source where I can download a glib and gtk ports for mipsel, or at least

get

Quoted 3 lines
Quoted 1 line

more info on this.

Well, it wouldn't surprise me if something is broken, as

I get the

Quoted 1 line

feeling that the GNOME folks are notorious for doing

unportable crap in

Quoted 1 line

their code. However, GTK/glib builds and works just

fine for me. I

Quoted 1 line

suspect that either something is broken in your cross-

compile setup, or

Quoted 1 line

you might be using ancient versions of these packages.

I have both

Quoted 1 line

glib-2.8.5 and gtk -2.8.10 installed on my (big-endian)

machines here

Quoted 1 line

without any problems.

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).
I'm using the following parameters with configure:
./configure --prefix=<path> --build=mipsel-linux -- host=i686-linux --with-libiconv=gnu

Do you have you gtk/glib compiled from the sources on your machine or just a binaries installed? Do you have a ./glib/gatomic.c file compiled? 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?

With respect,
Oleg Kruzhkov

#3 lore raw
Quoted 1 line

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.

Quoted 3 lines

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

Quoted 1 line

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...

Quoted 1 line

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

Quoted 1 line

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

#4 lore raw
Quoted 1 line

I suspect that glib is broken for cross-compile in this

way. It is

Quoted 1 line

probably detecting that your host i686 install can use

asm code for

Quoted 1 line

atomic operations, and thus enables it, which of course

kills your

Quoted 1 line

build. Natively, it looks like it does the RightThing

(TM):

Quoted 2 lines

checking whether to use assembler code for atomic

operations... none

Steve, you are absolutely correct!
I've just encountered the same thing.
I fixed the configure script and it now does not forces the atomic operations to be compiled in asm - it takes C implementation instead.

Thanks a lot!

With respect,
Oleg Kruzhkov