[uClibc]OpenSSH and mipsel

Erik Andersen andersen at codepoet.org
Tue Feb 11 09:14:08 UTC 2003


On Tue Feb 11, 2003 at 05:46:11AM -0800, Dana Soward wrote:
> I've been getting a lot of help with this in the uclibc IRC channel, but
> I thought I would post my issues here as well to cover my bases, and
> stop bothering the channel so much...
> 
> I'm trying to build openssh against the latest CVS (as of tonight)
> toolchain, compiled on an i686 system for a mipsel system.  Busybox,
> tinylogin, zlib, and openssl all build fine against the toolchain.  I
> have openssh configuring ok using a hacked up configure script and a
> config.cache from a native mipsel build.  Everything seems to compile
> ok, but then at link time I run into problems...if anyone else has
> crosscompiled openssh using this type of setup, and was successful, I'd
> love some hints.  My error output is below. Thanks
> 
> 
> /opt/toolchain/bin/mipsel-uclibc-ld -o ssh ssh.o sshconnect.o
> sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o
> -Lopenbsd-compat/ -L/opt/toolchain/usr/local/lib
> -L/opt/toolchain/usr/lib/  -L. -L.. -L/opt/toolchain/lib
> -L/opt/toolchain/usr/lib -L/opt/toolchain/usr/local/lib -lc -lssh
> -lopenbsd-compat -lutil -lz  -lcrypto -lcrypt
> /opt/toolchain/bin/mipsel-uclibc-ld: warning: cannot find entry symbol
> __start; defaulting to 000000000040fef0

By using 'ld' to perform the link, rather than 'gcc' the link is
failing to include crt1.o (along with various other useful files
such as crti.o, crtbegin.o, crtn.o, crtend.o, and libgcc).  As a
result, it cannot find __start.  Despite the fact that the linker
is bravely carrying on, this really is fatal error...

> ssh.o: In function `usage':
> /home/dragon/src/openssh-3.5p1/ssh.c:164: undefined reference to
> `__progname'

This is because your "hacked up configure script" is
insufficiently hacked up....  The openssh configure script has a
"checking if libc defines __progname" test which sets
"ac_cv_libc_defines___progname".  For some reason this test is
coming out "yes" when it should be "no".  I suspect you probably
configured openssh vs glibc and then are using the resulting
config.cache file.  If that is indeed what you did, be aware that
is a really bad idea.  If you are going to use a pre-canned
config.cache file, make sure it was built doing a native mipsel
build vs uClibc.

> /opt/toolchain/usr/local/lib/libcrypto.a(bn_div.o): In function
> `BN_div':

This stuff is more of the fallout from using 'ld' to perform the
link, rather than 'gcc' -- it isn't including libgcc in the link
as it should.

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list