Mipsel Cross-Compile Failure

Matt Johnston matt at ucc.asn.au
Sun May 22 02:31:29 WST 2005


On Sun, May 15, 2005 at 11:03:52AM -0500, Quantum Scientific wrote:
> Hello List,
> 
> Trying to cross-compile Dropbear to the WRT54G, but it's dumping out for not 
> finding utmpx.h .  This email seems long, but my comments are short.
> 
> -----------------------------------------------------------------------
> # ./configure --disable-lastlog --build=i686-pc-linux-gnu --host=mipsel-linux
> 	--disable-zlib
> ...
> checking for mipsel-linux-install... no
> ...
> checking whether __UCLIBC__ is declared... no
> ...
> checking for struct utmpx.ut_host... yes
> checking for struct utmpx.ut_syslen... no
> checking for struct utmpx.ut_type... yes
> checking for struct utmpx.ut_id... yes
> checking for struct utmpx.ut_addr... no
> checking for struct utmpx.ut_addr_v6... yes
> checking for struct utmpx.ut_time... no
> checking for struct utmpx.ut_tv... yes
> ...
> checking if your system defines UTMP_FILE... yes
> checking if your system defines WTMP_FILE... yes
> checking if your system defines UTMPX_FILE... no
> checking if your system defines WTMPX_FILE... no
> ...
> # make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI=1
> 	STATIC=1
> mipsel-uclibc-gcc -I. -I./libtomcrypt -I./zlibincludes -I../zlibincludes -Os
> 	-W -Wall -DDROPBEAR_SERVER -DDROPBEAR_CLIENT -DDBMULTI_dropbear
> 	-DDBMULTI_dbclient -DDBMULTI_dropbearkey -DDBMULTI_dropbearconvert
> 	-DDBMULTI_scp -DDROPBEAR_MULTI   -c -o dbmulti.o dbmulti.c
> In file included from dbmulti.c:25:
> includes.h:67:19: utmpx.h: No such file or directory
> dbmulti.c: In function `main':
> dbmulti.c:49: warning: implicit declaration of function `cli_main'
> make: *** [dbmulti.o] Error 1
> #
> -----------------------------------------------------------------------
> 
> Now, utmpx.h is in /opt/brcm/hndtools-mipsel-uclibc/include/bits .  It is 
> finding utmp.h, but which one it's finding is a mystery.

If you try running

mipsel-uclibc-gcc -I. -I./libtomcrypt -I./zlibincludes -I../zlibincludes -Os -W -Wall -DDROPBEAR_SERVER -DDROPBEAR_CLIENT -DDBMULTI_dropbear -DDBMULTI_dbclient -DDBMULTI_dropbearkey -DDBMULTI_dropbearconvert -DDBMULTI_scp -DDROPBEAR_MULTI dbmulti.c -E 

you'll get the preprocessed source, which should have
annotations where the header files are coming from? If
utmpx.h is only in the bits/ subdirectory, then it shouldn't
be getting defined as existing by configure. Perhaps hunt
about in config.log and see what path it's searching or
something?

I don't think you should be using the bits directory
explicitly.

> 
> One other issue.  When I try to include zlib, it can't find it.  I've put 
> zconf.h and zlib.h under zlibincludes.
> 
> -----------------------------------------------------------------------
> ./configure --disable-lastlog --build=i686-pc-linux-gnu --host=mipsel-linux
> 	-with-zlib=/dl/Skymesh2/MIMO_GPL_1.00.06/src/router/dropbear/zlibincludes
> ...
> checking for deflate in -lz... no
> configure: error: *** zlib missing - install first or check config.log ***
> #
> -----------------------------------------------------------------------

Firstly, sure you don't mean --with-zlib (missing '-')?

If that's not the problem, try with
--with-zlib=/dl/Skymesh2/MIMO_GPL_1.00.06/src/router/dropbear/zlib , and put
the headers in
/dl/Skymesh2/MIMO_GPL_1.00.06/src/router/dropbear/zlib/include
and the libraries in
/dl/Skymesh2/MIMO_GPL_1.00.06/src/router/dropbear/zlib/lib

Let me know how it goes, sorry for the delay in replying.

Matt


More information about the Dropbear mailing list