Opened 3 years ago

Closed 2 years ago

#5393 closed defect (fixed)

compile issue with latest libadblockplus code for android platform (linux os)

Reported by: hehefox Assignee: sergz
Priority: P3 Milestone:
Module: Libadblockplus Keywords:
Cc: sergz, fhd, hfiguiere Blocked By:
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29510583/

Description

According to prerequisites, i finished all steps. like set correct ndk , python and so on.
when i run "make android_arm"
at beginning, error is "can't find CXX(host) for clang".I think it is not correct, it should use ndk toolchain's complie tools, not my local machine.
Make sure compiling can run continue, i installed clang tools in my computer. Then compile again. Compiling error as blow

/home/hus/work/husong/libadblockplugs_hs/libadblockplus/third_party/v8/../../build/android_arm.release/obj.host/src/libv8_libplatform.a(default-platform.o): In function `v8::platform::DefaultPlatform::SetThreadPoolSize(int)':
../third_party/v8/src/libplatform/default-platform.cc:(.text._ZN2v88platform15DefaultPlatform17SetThreadPoolSizeEi+0x1e): undefined reference to `v8::base::SysInfo::NumberOfProcessors()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/mksnapshot.host.android_arm.release.mk:230: recipe for target '/home/hus/work/husong/libadblockplugs_hs/libadblockplus/third_party/v8/../../build/android_arm.release/mksnapshot' failed
make[2]: * home/hus/work/husong/libadblockplugs_hs/libadblockplus/third_party/v8/../../build/android_arm.release/mksnapshot Error 1
make[2]: Leaving directory '/home/hus/work/husong/libadblockplugs_hs/libadblockplus/build'
Makefile:73: recipe for target 'v8_android_multi' failed
make[1]:
* [v8_android_multi] Error 2
make[1]: Leaving directory '/home/hus/work/husong/libadblockplugs_hs/libadblockplus'
Makefile:69: recipe for target 'android_arm' failed
make: * [android_arm] Error 2

Change History (8)

comment:1 Changed 3 years ago by hfiguiere

  • Component changed from Unknown to Libadblockplus-Android
  • Summary changed from complie issue with latest libadblockplus code on android platform(linux os) to compile issue with latest libadblockplus code on android platform (linux os)

comment:2 follow-up: Changed 2 years ago by sergz

  • Cc sergz added
  • Component changed from Libadblockplus-Android to Libadblockplus
  • Summary changed from compile issue with latest libadblockplus code on android platform (linux os) to compile issue with latest libadblockplus code for android platform (linux os)

I think it is not correct, it should use ndk toolchain's complie tools, not my local machine.

While V8 is being compiled it builds not only for the target architecture but also some tools for the host system, therefore it requires the building tools for the host system.

What concerns the error in the issue, it cannot link. Could you please post the commit ID of libadblockplus repository where the error has being observed?

comment:3 in reply to: ↑ 2 Changed 2 years ago by volk

Replying to sergz:

What concerns the error in the issue, it cannot link. Could you please post the commit ID of libadblockplus repository where the error has being observed?

I'm getting the same error as reported here with the latest libadblockplus - commit 0aca67f42c4b3b823104e358e462b17444ac482e. I'm getting this error both on Ubuntu 16.04.2 64-bit and on Debian 4.3.5-1 64-bit.

Last edited 2 years ago by volk (previous) (diff)

comment:4 follow-up: Changed 2 years ago by sergz

  • Cc fhd hfiguiere added
  • Priority changed from Unknown to P3

Yeah, I have seen it. The issue is in the order of dependencies of mksnapshot target in v8. Meanwhile you can open third_party/v8/src/v8.gyp at the line number 2437 (there are dependencies for mksnapshot target) and put v8_libplatform at the beginning of the list (don't forget the comma after 'v8_libplatform'):

        'v8_libplatform',
        'v8_base',
        'v8_libbase',
        'v8_nosnapshot',

It's a bit strange that it works on mac.

comment:5 in reply to: ↑ 4 Changed 2 years ago by volk

Replying to sergz:

Meanwhile you can open third_party/v8/src/v8.gyp at the line number 2437 (there are dependencies for mksnapshot target) and put v8_libplatform at the beginning of the list

This worked for me. Thanks!

comment:6 Changed 2 years ago by sergz

  • Owner set to sergz
  • Review URL(s) modified (diff)

comment:8 Changed 2 years ago by sergz

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.