1

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.

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 ?

Community
  • 1
  • 1
Zedday
  • 19
  • 2
  • This was posted also on the upstream mailing list, but without any response. I was trying to figure out what is going on there, but without any success. You can try to catch up the previous writer: http://lists.mindrot.org/pipermail/openssh-unix-dev/2015-June/034078.html – Jakuje Aug 20 '15 at 15:19

0 Answers0