Re: Glib cross compilation.



Hello Harsha,

On Mon, Aug 07, 2006 at 08:58:30AM -0600, harshavardhanreddy mandeepala wrote:
> I saw your posting in gtk list regarding this.
> I followed the same way to cross compile the glib package.

Great, you searched the archives! Would you mind if we take this
discussion to gtk-list so that others could potentially use it?


> It cross compiled perfectly but i have one doubt.
> I used
> ./configure --cache-file=arm-linux.cache --host=arm-linux
> I kept same thing in arm-linux.cache file as specified in the
> 
> http://developer.gnome.org/doc/API/2.0/glib/glib-cross-compiling.html
> 
> It compiled and created library also.
> The thing is which C library it will take.
> Because i didn't specifie CC=arm-linux-gcc in  ./configure .
> But if i run using CC=arm-linux-gcc it is creating error saying that
> " cannot run test program while cross compiling."
> So is it necessary to put CC=arm-linux-gcc or not.

Hmm, I would say specifying --host should be enough, but different
results are really strange; which compiler does configure choose if you
don't specify CC?


> If not my library created is currect. if require what is the problem for the
> error.

Just link against it and run the program on the target. Or check with
the file command. For a dynamic lib:

ibr medeu:~$ file libglib-2.0.so.0.400.8
libglib-2.0.so.0.400.8: ELF 32-bit LSB shared object, ARM, version 1 (ARM), stripped

For a static lib:

ibr medeu:~$ ar x libglib-2.0.a
ibr medeu:~$ file gmem.o
gmem.o: ELF 32-bit LSB relocatable, ARM, version 1 (ARM), not stripped

I guess your libraries are built for i386 (or whatever your $build is).


With kind regards,
Baurzhan.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]