Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为android编译OpenSSH时出错_Android_Linux_Android Ndk_Cross Compiling_Openssh - Fatal编程技术网

为android编译OpenSSH时出错

为android编译OpenSSH时出错,android,linux,android-ndk,cross-compiling,openssh,Android,Linux,Android Ndk,Cross Compiling,Openssh,我正在尝试使用Android NDK为Android平台(Armv7)交叉编译OpenSSH。为了做到这一点,我遵循了基于此帖子的说明: 我将“arm-linux-gnueabi-gcc”替换为安卓版本的“arm-linux-androideabi-gcc”。我设法编译了zlib和openssl,但当涉及到openssh时,事情变得更加复杂 以下是我所做的: export HOST=arm-linux-androideabi ./configure --host=$HOST --target=$

我正在尝试使用Android NDK为Android平台(Armv7)交叉编译OpenSSH。为了做到这一点,我遵循了基于此帖子的说明:

我将“arm-linux-gnueabi-gcc”替换为安卓版本的“arm-linux-androideabi-gcc”。我设法编译了zlib和openssl,但当涉及到openssh时,事情变得更加复杂

以下是我所做的:

export HOST=arm-linux-androideabi
./configure --host=$HOST --target=$HOST --prefix=$HOME/OpenSSH/opensshArm
之后,我得到了以下输出:

configure: error: *** OpenSSL headers missing - please install first or check config.log ***
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
所以我修改了我的./configure:

./configure --host=$HOST --target=$HOST --prefix=$HOME/OpenSSH/opensshArm --with-ssl-dir=$HOME/OpenSSH/out/usr
其中$HOME/out/是用于编译zlib和openssl的输出目录

这里是我被卡住的地方:我启动“make”,这里是输出:

configure: error: *** OpenSSL headers missing - please install first or check config.log ***
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

有什么帮助吗?

这也被张贴在上游邮件列表上,但没有任何回应。我试图弄清楚那里发生了什么,但没有成功。你可以试着赶上前一位作者:这也是在上游邮件列表上发布的,但没有任何回应。我试图弄清楚那里发生了什么,但没有成功。您可以尝试赶上上一位作者: