Bug #2389
Building of Android Vpn Client Failed
Description
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:
_/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
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
History
#1 Updated by Tobias Brunner about 8 years ago
- Tracker changed from Issue to Bug
- Description updated (diff)
- Category set to android
- Status changed from New to Feedback
- Assignee set to Tobias Brunner
- Target version set to 5.6.0
- Resolution set to Fixed
This error is not related to the NDK version. Some new files were simply missing in the Android.mk of libimcv. Fixed with commit:bf565b650c (and commit:6b69a66379). As a workaround you could disable the BYOD stuff (see comment in the jni/Android.mk
file) then libimcv
won't be built.
#2 Updated by Royi Cohen about 8 years ago
Thanks, I took the fix and it worked :-), you are correct the NDK was added because of another issue I had.
#3 Updated by Tobias Brunner about 8 years ago
- Status changed from Feedback to Closed