Error cross-compiling openconnect-8.08 for android

笑着哭i 提交于 2020-04-30 09:22:35

问题


When i follow instructions here, i get this error when running latest instruction that is "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

The TARGET that i use is: armv7a-linux-androideabi

My TOOLCHAIN is: /home/fasegiar/Documents/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64

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


回答1:


From the snippet you posted I can already tell you this is not going to work. When cross-compiling you need to cross-compile all dependencies first for your target platform (ie Android) and then tell the configure script where to find the installed dependencies. For openconnect the dependencies are:

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)


来源:https://stackoverflow.com/questions/61275196/error-cross-compiling-openconnect-8-08-for-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!