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

Re: [microblaze-uclinux] GLib ... uClinux



Hello,

Sridhar Addagada <asridhars@xxxxxxxxx> wrote:
> I found the reference at
> http://www.uckernel.org/pub/uClinux/archive/10641.html, But in the
> source tree of both uClibc and uClinux there are no references to GLib
> anywhere. Does someone hace a working copy of Glib for uClinux?
> 
> I was trying to corss compile GLib for my microblaze target.  Here i
> hit the wall with the configure script, i got the following error.
> 
> *** You must have either have gettext support in your C library, or use the
> *** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
> 
> 
> Any help is appreciated.
> 

here is my way how I have compiled successfully the glib library (version 2)
for the uclinux microblaze platform:

1. configure gettext support into uClibc and compile uclinux
   see http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2006/07/msg00006.html

2. Unpack glib2 tar ball and create file "mb.cache"
   tar xjf glib-2.12.0.tar.bz2
   cd glib-2.12.0
   { echo glib_cv_stack_grows=no; echo ac_cv_func_posix_getpwuid_r=yes; } > mb.cache
   chmod a-w mb.cache

3. Make sure that "ucfront" and "mb-gcc" can be found by setting the PATH variable
   . ~/etc/microblaze-settings
   . ~/etc/ucfront-settings

4. Build and install glib package
   ./configure -C --cache-file=mb.cache \
   	--enable-static --disable-shared \
	--prefix ~/projects/eubus/uclinux-microblaze/external-components/glib-2.12.0 \
	--build i386 --host none-uclinux-uclibc \
	CC='ucfront mb-gcc' LDFLAGS='-Wl,-elf2flt'
   make
   make install # DESTDIR=$PWD/__I__

5. Compile your glib application outside of the uClinux-dist area
   PKG_CONFIG_PATH=~/projects/eubus/uclinux-microblaze/external-components/glib-2.12.0/lib/pkgconfig ./configure \
   	--build i386 --host none-uclinux CC='ucfront mb-gcc' LDFLAGS='-Wl,-elf2flt'
   make

I have tested this method with an application which consists of a server
application using the "GThreadPool" and "GMainLoop" methods and it runs
fantastic.

I'm doing all these things on Debian Sarge as development platform!

Good luck!

-- 
Dr. Johann Pfefferl   ------------   mailto j.pfefferl at eubus dot net
Eubus GmbH            http://www.eubus.net +++++ http://www.hydraxc.com
Phone: +49 (0)89 45 22 578-67
Fax:   +49 (0)89 45 22 578-55
==
 -o)   A computer program does what you tell it to do,
 /\\        not what you want it to do.               
_\_v-                                                 
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/