【问题标题】:Openssl 1.0.0o for Android适用于 Android 的 Openssl 1.0.0o
【发布时间】:2014-12-16 13:20:36
【问题描述】:

我需要将我的 OpenSSL 库升级到 openssl-1.0.0o,我想知道这个版本是否支持 android。 我正在遵循thread 中的步骤,同时尝试在 cygwin 中构建它,但在“make all”时出现错误:

/cygdrive/d/ndk+openssl/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/pr
ebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/cygdrive/d/ndk+openssl
/android-ndk-r10d/platforms/android-19/arch-arm/ -I. -I.. -I../include  -D_WINDL
L -DOPENSSL_PIC -DOPENSSL_THREADS  -DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIOS -DL_ENDI
AN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPEN
SSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_A
SM -DRMD160_ASM -DAES_ASM -DWHIRLPOOL_ASM   -c -o cryptlib.o cryptlib.c
/cygdrive/d/ndk+openssl/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/pr
ebuilt/linux-x86/bin/arm-linux-androideabi-gcc: /cygdrive/d/ndk+openssl/android-
ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86/bin/arm-linux-a
ndroideabi-gcc: cannot execute binary file
<builtin>: recipe for target 'cryptlib.o' failed
make[1]: *** [cryptlib.o] Error 126
make[1]: Leaving directory '/cygdrive/d/ndk+openssl/openssl-1.0.0o/crypto'
Makefile:247: recipe for target 'build_crypto' failed
make: *** [build_crypto] Error 1

任何帮助将不胜感激。谢谢。

【问题讨论】:

  • 在设备上构建是否适合您?如果是这样,有许多应用程序会有所帮助,甚至还有一个 openssl 端口。
  • 1.0.0 和 1.0.1 是二进制兼容的。您应该改用 1.0.1。你甚至可以从 Github 上为 Android 获取预构建的 OpenSSL,例如 this one
  • 如果您想按照项目说明为 Android 构建 OpenSSL,请参阅 OpenSSL and Android。它假定您使用的是 Android 的工具链。

标签: android openssl


【解决方案1】:

您的构建环境已损坏:交叉编译器在您的主机上根本无法运行。您无法在该主机上使用该编译器构建任何源代码。您应该在正确的构建环境中构建 android 和相关库。简而言之,您应该使用一些 linux (x64?) 主机,而不是 cygwin。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-24
    • 1970-01-01
    • 2018-11-29
    • 2023-03-31
    相关资源
    最近更新 更多