android 交叉编译 openconnect-8.08 时出错

Error cross-compiling openconnect-8.08 for android

当我按照说明 here 进行操作时,我在 运行 最新说明 "make" 时收到此错误:

make[1]: Entering directory '/home/fasegiar/Downloads/openconnect-8.08'
  CC       libopenconnect_la-ssl.lo
In file included from ssl.c:41:
In file included from ./openconnect-internal.h:102:
In file included from /usr/include/libxml2/libxml/tree.h:1307:
In file included from /usr/include/libxml2/libxml/xmlmemory.h:218:
In file included from /usr/include/libxml2/libxml/threads.h:35:
In file included from /usr/include/libxml2/libxml/globals.h:18:
In file included from /usr/include/libxml2/libxml/parser.h:810:
/usr/include/libxml2/libxml/encoding.h:31:10: fatal error: 'unicode/ucnv.h' file not found
#include <unicode/ucnv.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
Makefile:1037: recipe for target 'libopenconnect_la-ssl.lo' failed
make[1]: *** [libopenconnect_la-ssl.lo] Error 1
make[1]: Leaving directory '/home/fasegiar/Downloads/openconnect-8.08'
Makefile:749: recipe for target 'all' failed
make: *** [all] Error 2

我使用的目标是:armv7a-linux-androideabi

我的工具链是:/home/fasegiar/Documents/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64

Here is the output of the config.log after ./configure call

根据您发布的代码片段,我已经可以告诉您这是行不通的。 交叉编译时,您需要首先针对您的目标平台(即Android)交叉编译所有依赖项,然后告诉配置脚本在哪里可以找到已安装的依赖项。对于 openconnect,依赖项是:

Required:

  • libxml2 (this in turn requires libicu, as your error points out)
  • zlib (this is bundled)
  • Either OpenSSL or GnuTLS (v3.2.10+) (see NDKPorts)

Optional:

  • p11-kit (for PKCS#11 support)
  • libp11 (also needed for PKCS#11 support if using OpenSSL)
  • libproxy
  • trousers (for TPMv1 support if using GnuTLS)
  • libtasn1 and either tss2-esys or IBM's TPM 2.0 TSS. (for TPMv2 support if using GnuTLS)
  • libstoken (for SecurID software token support)
  • libpskc (for RFC6030 PSKC file storage of HOTP/TOTP keys)
  • libpcsclite (for Yubikey hardware HOTP/HOTP support)