openssh static build - mission impossible?
Peter Stuge
peter at stuge.se
Tue Mar 6 17:00:04 EST 2012
Mr Dash Four wrote:
> >> ./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.
I suggest to build the package manually completely without any spec
file or further build tools, in order to find how to build correctly.
> >> gcc -o sshd sshd.o ...
> >
> > Who is running this command? Are you running it manually?
>
> No, why do you say that?
I would expect armv6l-redhat-linux-gnueabi-gcc to be run here, not
gcc.
> > You create
> > significant unneccessary confusion by not including complete output
> > from make without making any changes.
>
> What do you seem to be confused by?
The incomplete output. Always include complete logs, including the
command you typed and the shell prompt you get after the command has
finished.
> >> /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").
Except if you are using the armv5tel gcc and libcrypt.a you are not
actually targeting armv6l anymore.
> > 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!
I think that would be easy enough. There must be plenty of
implementations to choose from.
> > Possibly there is one included in OpenSSH already,
> > and you just need to configure correctly to have it used.
>
> How, exactly?
That you get to study on your own. I will not learn about it in order
to teach you. You can find out easily by studying the OpenSSH code.
//Peter
More information about the openssh-unix-dev
mailing list