[avahi] Crosscompiling Avahi onto a uClinux system

Grant Erickson gerickson at nuovations.com
Fri Feb 8 17:12:12 PST 2008


On 2/8/08 4:22 AM, Antony Barton wrote:
> I'm a fairly inexperienced linux developer and i have been landed the task of
> implementing zeroconf on our embedded linux 2.4 system to provide the name
> translation service (so we can refer to each device - whose ip will invariably
> be unknown - by name), no other functionality is required and i would ideally
> like to omit for space considerations.
>  
> Has anyone done this or something similar, and can anyone suggest what
> components of the avahi package would be necessary to achieve this? I have
> investigated bonjour also, but have had difficulties cross compiling it and i
> also get the impression that avahi is a more appropriate choice for a linux
> based system.
>  
> Any help that anyone could provide would be greatly appreciated.
>  
> Many thanks,
>  
> Antony Barton

Anthony,

I have been using the following cross-compilation invocation, where CC, AR,
et al are set to those for your cross-compilation toolchain. Set/replace
objdir, srcdir and resultdir as appropriate for your build tree.

    cd $(objdir) && \
    $(CURDIR)/$(srcdir)/configure \
    CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) STRIP=$(STRIP) \
    CPPFLAGS="-I$(resultdir)../expat/usr/include \
    -I$(resultdir)../gdbm/usr/include \
    -I$(resultdir)../libcap/usr/include" \
    LDFLAGS="-L$(resultdir)../expat/usr/lib \
    -L$(resultdir)../gdbm/usr/lib \
    -L$(resultdir)../libcap/usr/lib" \
    LIBDAEMON_CFLAGS=-I$(resultdir)../libdaemon/usr/include \
    LIBDAEMON_LIBS=-L$(resultdir)../libdaemon/usr/lib \
    --build=$(build) \
    --host=$(host) \
    --disable-dbus \
    --disable-glib \
    --disable-gobject \
    --disable-gtk \
    --disable-manpages \
    --disable-monodoc \
    --disable-python \
    --disable-qt3 \
    --disable-qt4 \
    --with-distro=none \
    --with-xml=expat \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var

Per Trent Lloyd's later response to you, it sounds like you can trim this
down even further yet. That's good news, since the above invocation will run
into problems sourcing the Expat library from the wrong place (picks up
what's in /usr/lib rather than specified by LDFLAGS).

Good luck!

Regards,

Grant Erickson




More information about the avahi mailing list