Opened on 09/21/2016 at 12:37:58 PM
Closed on 07/04/2017 at 02:44:43 PM
Last modified on 08/09/2017 at 07:14:00 AM
#4453 closed defect (worksforme)
Failed to link libadblockplus-android with Android NDK 11c
Reported by: | asmirnov | Assignee: | |
---|---|---|---|
Priority: | P3 | Milestone: | |
Module: | Libadblockplus-Android | Keywords: | |
Cc: | sergz, rjeschke | Blocked By: | #4062 |
Blocking: | Platform: | Android | |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Environment
libadblockplus can be linked with android ndk 10 (tested with 10e), but can NOT be linked with ndk 11 (tested with 11c), both logs attached.
How to reproduce
- run "./gradlew clean assemble"
...
Attachments (2)
Change History (9)
Changed on 09/21/2016 at 12:38:14 PM by asmirnov
Changed on 09/21/2016 at 12:38:30 PM by asmirnov
comment:1 Changed on 09/21/2016 at 12:39:47 PM by asmirnov
- Cc sergz rjeschke added
comment:2 Changed on 09/21/2016 at 12:47:28 PM by asmirnov
- Summary changed from Failed to link libadblockplus with Android NDK 11c to Failed to link libadblockplus-android with Android NDK 11c
comment:3 Changed on 09/28/2016 at 09:01:02 AM by asmirnov
- Blocked By 4062 added
comment:4 Changed on 09/28/2016 at 09:08:10 AM by asmirnov
comment:5 Changed on 01/12/2017 at 10:41:55 AM by asmirnov
i've just tried android ndk r13b and it obviously does not compile it becuase of missing 4.6 toolchain.
a symlinking toolchain 4.9 to 4.6 as a trivial workaround fails after few minutes of compilation:
... ../third_party/v8/src/checks.h:256:5: note: in expansion of macro 'SEMI_STATIC_JOIN' SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) ^ ../third_party/v8/src/checks.h:289:30: note: in expansion of macro 'STATIC_CHECK' #define STATIC_ASSERT(test) STATIC_CHECK(test) ^ ../third_party/v8/src/api.h:130:3: note: in expansion of macro 'STATIC_ASSERT' STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address)); ^ AR(target) /Users/asmirnov/Documents/dev/src/libadblockplus.ssh2/third_party/v8/../../build/android_arm.release/obj.target/tools/gyp/libv8_base.arm.a arm-linux-androideabi-ar: invalid option -- / Usage: /softdev/android-ndk-r13b/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file... /softdev/android-ndk-r13b/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar -M [<mri-script] commands: d - delete file(s) from the archive m[ab] - move file(s) in the archive p - print file(s) found in the archive q[f] - quick append file(s) to the archive r[ab][f][u] - replace existing or insert new file(s) into the archive s - act as ranlib t - display contents of archive x[o] - extract file(s) from the archive command specific modifiers: [a] - put file(s) after [member-name] [b] - put file(s) before [member-name] (same as [i]) [D] - use zero for timestamps and uids/gids [U] - use actual timestamps and uids/gids (default) [N] - use instance [count] of name [f] - truncate inserted file names [P] - use full path names when matching [o] - preserve original dates [u] - only replace files that are newer than current archive contents generic modifiers: [c] - do not warn if the library had to be created [s] - create an archive index (cf. ranlib) [S] - do not build a symbol table [T] - make a thin archive [v] - be verbose [V] - display the version number @<file> - read options from <file> --target=BFDNAME - specify the target object format as BFDNAME optional: --plugin <p> - load the specified plugin emulation options: No emulation specific options /softdev/android-ndk-r13b/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex make[4]: *** [/Users/asmirnov/Documents/dev/src/libadblockplus.ssh2/third_party/v8/../../build/android_arm.release/obj.target/tools/gyp/libv8_base.arm.a] Error 1 make[3]: *** [android_arm.release] Error 2 make[2]: *** [android_arm.release] Error 2 make[1]: *** [v8_android_multi] Error 2 make: *** [android_arm] Error 2
comment:6 Changed on 07/04/2017 at 02:44:43 PM by sergz
- Resolution set to worksforme
- Status changed from new to closed
As #4907 is landed and now ndk 12b is required, the version (11c) in this issue is not relevant anymore. For problems with other versions please create corresponding issues.
comment:7 Changed on 08/09/2017 at 07:13:45 AM by asmirnov
Deprecated after https://hg.adblockplus.org/libadblockplus-android/rev/61b8dbc292ad landed
According to release notes (https://developer.android.com/ndk/downloads/revision_history.html) ndk 11:
It forces us to compile both libadblockplus-android and libadblockplus with the same version of ndk (let's say ndk11).
Currently libadblockplus is compiled with ndk10 or older and using std::__1 namespace for linking and libadblockplus-android is compiled (trying) with ndk11 and using std::__ndk1 namespace.
ok. Now trying to skip using prebuilt libadblockplus files and recompile it with ndk11 too.
The latest libadblockplus is using v8 of revision:
It's pretty ancient and it can be compiled with gcc toolchain 4.6 only, since in "Makefile.android" "4.6" it's hardcoded.
I've tried to replace it with "4.9" which is present in ndk11 and ndk12 but got build error:
We can't just update v8 to the more recent version because of blocking issue.
Will be continues after blocking task resolved.