OpenSSH Cross-Compilation for android

Durand Antoine antoine.durand at bodet-software.com
Fri Aug 21 01:45:04 AEST 2015


Hello,
I'm trying to cross-compile OpenSSH for an Android Plateform (Armv7) using the Android-NDK. To do this, I followed instructions based on this post : Cross Compile OpenSSH for ARM<http://stackoverflow.com/questions/11841919/cross-compile-openssh-for-arm>.
I replace the "arm-linux-gnueabi-gcc" by the android equivalent : "arm-linux-androideabi-gcc". I managed to compile zlib and openssl, but when it comes to openssh, things become more complicated ...
Here is what I've done :
export HOST=arm-linux-androideabi
./configure --host=$HOST --target=$HOST --prefix=$HOME/OpenSSH/opensshArm
After that I had the following output :
configure: error: *** OpenSSL headers missing - please install first or check config.log ***
So I modified my ./configure by this one :
./configure --host=$HOST --target=$HOST --prefix=$HOME/OpenSSH/opensshArm --with-ssl-dir=$HOME/OpenSSH/out/usr
Where $HOME/out/ is the output directory used to compile zlib and openssl.
Here is where I'm stuck : I launch the "make" and here is thi output :
make[1]: Entering directory `/home/test/OpenSSH/openssh-6.4p1/openbsd-compat'
arm-linux-androideabi-gcc -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wno-pointer-sign -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -fno-builtin-memset  -I. -I.. -I. -I./.. -I/home/test/OpenSSH/out/usr/include  -DHAVE_CONFIG_H -c bsd-arc4random.c
In file included from /home/test/OpenSSH/out/usr/include/openssl/crypto.h:120,
                 from /home/test/OpenSSH/out/usr/include/openssl/bn.h:133,
                 from ../buffer.h:49,
                 from ../entropy.h:30,
                 from ../includes.h:177,
                 from bsd-arc4random.c:17:
/home/test/toolchain/bin/../sysroot/usr/include/stdlib.h:168: error: expected identifier or '(' before numeric constant
make[1]: *** [bsd-arc4random.o] Error 1
make[1]: Leaving directory `/home/test/OpenSSH/openssh-6.4p1/openbsd-compat'
make: *** [openbsd-compat/libopenbsd-compat.a] Error 2
Any helps ?



Antoine Durand
Embedded System Engineer
Bodet Software



Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires.
Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur par e-mail.
Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. Les communications sur Internet n'etant pas securisees, l'expediteur informe qu'il ne peut accepter aucune responsabilite quant au contenu de ce message.
This mail message and attachments (the "message") are solely intended for the addresses. It is confidential in nature.
If you receive this message in error, please delete it and immediately notify the sender by e-mail.
Any use other than its intended purpose, dissemination or disclosure, either whole or partial, is prohibited except if formal approval is granted. As communication on the Internet is not secure, the sender does not accept responsibility for the content of this message.


More information about the openssh-unix-dev mailing list