openssh static build - mission impossible?

Mr Dash Four mr.dash.four at googlemail.com
Tue Mar 6 16:43:10 EST 2012


>> ./configure \
>> --host=armv6l-redhat-linux-gnueabi \
>> --build=armv7l-unknown-linux-gnueabi \
> 
> Why? For which tuple are you building, and with which tuple are you
> building?
The "build" tuple is set "automatically" by Fedora (wrongly as it turns out, but that is another issue I am not going to bother you with). The host is set up manually by myself in the .spec file I am using. Regardless of the 2nd part of that tuple the end result is the same, so I don't think this is a major issue or the one which causes openssh build to fail.

> You should not have cut away the command doing the linking. I.e.
> *never* remove output when you are asking for help, because chances
> are quite significant that you are removing the single key piece of
> information required in order to determine the actual error.
It is quite a large output, but I am enclosing it as an attachment so that I don't clutter this post unnecessarily.

>> gcc -o sshd sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o sshpty.o sshlogin.o servconf.o serverloop.o auth.o auth1.o auth2.o auth-options.o session.o auth-chall.o auth2-chall.o groupaccess.o auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o auth-krb5.o auth2-gss.o gss-serv.o gss-serv-krb5.o loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o roaming_common.o roaming_serv.o -L. -Lopenbsd-compat/  -pie -z relro -z now -lnsl -lpcre -lcdb -fstack-protector-all -static -static-libgcc -lssh -lopenbsd-compat -lcrypto -lcrypt -ldl -lutil -lz  -lresolv
> 
> Who is running this command? Are you running it manually?
No, why do you say that?

> You create
> significant unneccessary confusion by not including complete output
> from make without making any changes.
What do you seem to be confused by?

>> /usr/lib/gcc/armv5tel-redhat-linux-gnueabi/4.6.1/../../../libcrypt.a(md5-crypt.o): In function `__md5_crypt_r': (.text+0xb4): undefined reference to `NSSLOW_Init'
> 
> If you resolve that path you get /usr/lib/libcrypt.a and unless you
> are building both on and for armv6l-redhat-linux-gnueabi then that is
> certainly not the file you want to link against. Are you
> cross-compiling or not?
I am cross-compiling from armv7l to armv6l as evident from the initial configure. The actual library - /usr/lib/libcrypt.a - is compiled and build for armv5tel (Fedora's own latest "stable").

> If you show complete output then it is possible to say if you have
> done anything wrong.
OK, I get it!

> If libcrypt.a for your target indeed requires
> NSS then I suggest writing a replacement crypt() which you can link
> OpenSSH against.
Easier said than done!

> Possibly there is one included in OpenSSH already,
> and you just need to configure correctly to have it used.
How, exactly?

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: openssh_error.txt
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20120306/852b309f/attachment.txt>


More information about the openssh-unix-dev mailing list