Project

General

Profile

Bug #2389

Updated by Tobias Brunner about 3 years ago

Hi,

I am trying to build the APK from sources: downloaded the sources from git, should I use a specific version ?

Followed the instruction from :https://wiki.strongswan.org/projects/strongswan/wiki/AndroidVPNClientBuild

I am using Android Studio 2.3.3 on Ubuntu 14.04 with gcc 4.8.4

When running the build I get the following errors:
<pre> ---------------------------
_/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/jni/../../../../../../..//src/libimcv/ietf/ietf_attr.c:109: error: undefined reference to 'ietf_swima_attr_sw_ev_create_from_data'
/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/jni/../../../../../../..//src/libimcv/ietf/ietf_attr.c:101: error: undefined reference to 'ietf_swima_attr_req_create_from_data'
/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/jni/../../../../../../..//src/libimcv/ietf/ietf_attr.c:105: error: undefined reference to 'ietf_swima_attr_sw_inv_create_from_data'
collect2: error: ld returned 1 exit status
make: *** [/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/obj/local/x86/libimcv.so] Error 1
make: *** Waiting for unfinished jobs....
/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/obj/local/arm64-v8a/objs/imcv/ietf/ietf_attr.o: In function `ietf_attr_create_from_data':
/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/jni/../../../../../../..//src/libimcv/ietf/ietf_attr.c:101: undefined reference to `ietf_swima_attr_req_create_from_data'
/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/jni/../../../../../../..//src/libimcv/ietf/ietf_attr.c:103: undefined reference to `ietf_swima_attr_sw_inv_create_from_data'
/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/jni/../../../../../../..//src/libimcv/ietf/ietf_attr.c:107: undefined reference to `ietf_swima_attr_sw_ev_create_from_data'
/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/jni/../../../../../../..//src/libimcv/ietf/ietf_attr.c:105: undefined reference to `ietf_swima_attr_sw_inv_create_from_data'
/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/jni/../../../../../../..//src/libimcv/ietf/ietf_attr.c:109: undefined reference to `ietf_swima_attr_sw_ev_create_from_data'
collect2: error: ld returned 1 exit status
make: *** [/home/rcohen/git-repository/strongswan/src/frontends/android/app/src/main/obj/local/arm64-v8a/libimcv.so] Error 1

:app:buildNative FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:buildNative'.
> Process 'command '/home/rcohen/Android/Sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2
</pre>

_

---------------------------
I saw a reference that suggest addind the following line to the Application.mk in order to use an older version of the NDK, but I still getting the errors:
NDK_TOOLCHAIN_VERSION := 4.9

will appropriate any help, thanks,

Royi

Back