LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to: Cross compile GLib (https://www.linuxquestions.org/questions/linux-software-2/how-to-cross-compile-glib-762319/)

lumdongtien 10-16-2009 03:27 AM

How to: Cross compile GLib
 
Hi all,

Currently, I have a mission to build a media player in mobile devices (particularly a Windows Mobile device).
I decided to build one based on GStreamer (core backend of GNU). In order to do that, I know I must do cross compile GLib (and after that cross compile GStreamer) into ARM/WinMobile architect.

I have already got/configure CeGCC & successfully cross-compiled a helloworld app. But now, I get confuse and do not know how to cross compile GLib(GStreamer also). I googled it for 2 days but the results are too general or weird. So, if anyone had experience with this kind of work or had done successfully, please give me some instruct & advice.

Thank in advance.

lumdongtien 10-16-2009 05:27 AM

Does anyone have any idea? :banghead:

knudfl 10-17-2009 04:44 PM

cd glib-x.xx.x ( 2.12.x ...... 2.22.x )
./configure CC=<path-to-cross-compiler> --prefix=/<install-path>

like
./configure CC=/opt/cross/bin/arm-gcc --prefix=/home/user/files/

Glib2 is an easy one, no dependencies.
For the most other libs and applications, you will have
to compile all dependencies beforehand and and point to
all in the configure line and / or do :
export LD_LIBRARY_PATH=/<path>

I assume, that the 'arm (g)libc + the linker, ld etc. are
installed correct. Else you will have to point to them too.
The system libc and system ld are unusable ...
.. Unless your host OS is an arm system itself.
.....

lumdongtien 10-18-2009 08:36 PM

Quote:

Originally Posted by knudfl (Post 3723121)
cd glib-x.xx.x ( 2.12.x ...... 2.22.x )
./configure CC=<path-to-cross-compiler> --prefix=/<install-path>

like
./configure CC=/opt/cross/bin/arm-gcc --prefix=/home/user/files/

Glib2 is an easy one, no dependencies.
For the most other libs and applications, you will have
to compile all dependencies beforehand and and point to
all in the configure line and / or do :
export LD_LIBRARY_PATH=/<path>

I assume, that the 'arm (g)libc + the linker, ld etc. are
installed correct. Else you will have to point to them too.
The system libc and system ld are unusable ...
.. Unless your host OS is an arm system itself.
.....

Thank for your reply,

But I really don't know where to obtain arm glibc + its linker! :(. Can you give me some more detail please!


All times are GMT -5. The time now is 12:18 PM.