Opened 6 months ago

Last modified 7 weeks ago

#6764 new defect

Building of libadblockplus target does not respect ABP_TARGET_ARCH arg

Reported by: asmirnov Assignee:
Priority: P2 Milestone:
Module: Libadblockplus Keywords:
Cc: sergz, hub Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

Adblockplus is built while building of AblockChromium. In order to build faster we try to avoid building of unneeded components.

args = [
  "/usr/bin/make", "-j8",

  # cwd
  "--cwd${_abs_libadblockplus_dir}",

  # environment variables
  "--envSKIP_DEPENDENCY_UPDATES=true",
  "--envANDROID_NDK_ROOT=${_abs_libadblockplus_dir}/third_party/android-ndk-r16b",
  "--envTARGET_OS=android",
  "--envSUB_ACTION=libadblockplus",
  "--envABP_TARGET_ARCH=${v8_abi_dir}",
  "--envConfiguration=release",
  "--envBUILD_DIR=${_abs_libadblockplus_prebuild_dir}",

  # v8
  "--envLIBV8_INCLUDE_DIR=${_abs_v8_include_dir}",
  "--envSTATIC_V8_LIB_DIR=${_abs_v8_libraries_dir}"
]
print(args)
exec_script("//third_party/libadblockplus_common/subproc.py", args)

How to reproduce

$ rm -rf /home/anton/adblockchromium/src/out/Debug/obj/third_party/libadblockplus_android/prebuild_libadblockplus
anton@dell-XPS-13-9370:~/adblockchromium/src$ gn gen --args='target_os="android" is_debug=true proprietary_codecs=true ffmpeg_branding="Chrome"' out/Debug
["/usr/bin/make", "-j8", "--cwd/home/anton/adblockchromium/src/third_party/libadblockplus/src", "--envSKIP_DEPENDENCY_UPDATES=true", "--envANDROID_NDK_ROOT=/home/anton/adblockchromium/src/third_party/libadblockplus/src/third_party/android-ndk-r16b", "--envTARGET_OS=android", "--envSUB_ACTION=libadblockplus", "--envABP_TARGET_ARCH=arm", "--envConfiguration=release", "--envBUILD_DIR=/home/anton/adblockchromium/src/out/Debug/obj/third_party/libadblockplus_android/prebuild_libadblockplus", "--envLIBV8_INCLUDE_DIR=/home/anton/adblockchromium/src/v8/include", "--envSTATIC_V8_LIB_DIR=/home/anton/adblockchromium/src/third_party/libadblockplus/src/third_party/prebuilt-v8/android-arm-release"]

anton@dell-XPS-13-9370:~/adblockchromium/src$ ls /home/anton/adblockchromium/src/out/Debug/obj/third_party/libadblockplus_android/prebuild_libadblockplus/out/Release/
libadblockplus.a  obj.target

$ find /home/anton/adblockchromium/src/out/Debug/obj/third_party/libadblockplus_android/prebuild_libadblockplus/out/Release -name *.o
..
/home/anton/adblockchromium/src/out/Debug/obj/third_party/libadblockplus_android/prebuild_libadblockplus/out/Release/obj.target/libadblockplus/src/DefaultFileSystem.o
/home/anton/adblockchromium/src/out/Debug/obj/third_party/libadblockplus_android/prebuild_libadblockplus/out/Release/obj.target/libadblockplus/src/WebRequestJsObject.o

c$ file /home/anton/adblockchromium/src/out/Debug/obj/third_party/libadblockplus_android/prebuild_libadblockplus/out/Release/obj.target/libadblockplus/src/WebRequestJsObject.o
/home/anton/adblockchromium/src/out/Debug/obj/third_party/libadblockplus_android/prebuild_libadblockplus/out/Release/obj.target/libadblockplus/src/WebRequestJsObject.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

Observed behaviour

x86 archive is built

Expected behaviour

arm archive is built

Change History (4)

comment:1 Changed 6 months ago by asmirnov

  • Cc hub added

comment:2 Changed 6 months ago by asmirnov

reproduced it from scratch on ubuntu 16.04:

antoine@antoine-vm:/tmp$ ls
antoine@antoine-vm:/tmp$ git clone git@github.com:adblockplus/libadblockplus.gitCloning into 'libadblockplus'...
remote: Counting objects: 4903, done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 4903 (delta 31), reused 48 (delta 19), pack-reused 4834
Receiving objects: 100% (4903/4903), 1.84 MiB | 2.41 MiB/s, done.
Resolving deltas: 100% (2130/2130), done.
antoine@antoine-vm:/tmp$ cd ./libadblockplus/
antoine@antoine-vm:/tmp/libadblockplus$ git checkout 40f5d4d2d00abe3f94ce69210267bcce908cd748
Note: checking out '40f5d4d2d00abe3f94ce69210267bcce908cd748'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 40f5d4d Issue 6756 - fix build for android-ia32
antoine@antoine-vm:/tmp/libadblockplus$ make TARGET_OS=android SUB_ACTION=libadblockplus ABP_TARGET_ARCH=arm Configuration=release get-prebuilt-v8
URL_PREFIX="https://v8.eyeofiles.com/v8-4fc9a2fe7f8a7ef1e7966185b39b3b541792669a/" \
	TARGET_OS=android ABP_TARGET_ARCH=arm \
	TRAVIS_OS_NAME=linux Configuration=release \
	bash .travis/prepare-prebuilt-v8.sh
+ set -e
+ [[ ! -d third_party/prebuilt-v8/include ]]
+ wget https://v8.eyeofiles.com/v8-4fc9a2fe7f8a7ef1e7966185b39b3b541792669a/include.7z -O third_party/v8-include.7z
--2018-06-26 16:21:59--  https://v8.eyeofiles.com/v8-4fc9a2fe7f8a7ef1e7966185b39b3b541792669a/include.7z
Resolving v8.eyeofiles.com (v8.eyeofiles.com)... 88.99.186.147, 2a01:4f8:c0c:e38::2
Connecting to v8.eyeofiles.com (v8.eyeofiles.com)|88.99.186.147|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 88232 (86K) [application/x-7z-compressed]
Saving to: ‘third_party/v8-include.7z’

100%[======================================>] 88 232      --.-K/s   in 0,01s   

2018-06-26 16:21:59 (6,89 MB/s) - ‘third_party/v8-include.7z’ saved [88232/88232]

+ 7z x third_party/v8-include.7z -othird_party/prebuilt-v8

7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)

Processing archive: third_party/v8-include.7z

Extracting  include
Extracting  include/libplatform
Extracting  include/APIDesign.md
Extracting  include/DEPS
Extracting  include/libplatform/DEPS
Extracting  include/libplatform/libplatform-export.h
Extracting  include/libplatform/libplatform.h
Extracting  include/libplatform/v8-tracing.h
Extracting  include/OWNERS
Extracting  include/PRESUBMIT.py
Extracting  include/v8-inspector-protocol.h
Extracting  include/v8-inspector.h
Extracting  include/v8-platform.h
Extracting  include/v8-profiler.h
Extracting  include/v8-testing.h
Extracting  include/v8-util.h
Extracting  include/v8-value-serializer-version.h
Extracting  include/v8-version-string.h
Extracting  include/v8-version.h
Extracting  include/v8.h
Extracting  include/v8config.h

Everything is Ok

Folders: 2
Files: 19
Size:       457177
Compressed: 88232
+ PREBUILT_V8_ARCHIVE=android-arm-release.tar.xz
+ [[ android != \a\n\d\r\o\i\d ]]
+ wget https://v8.eyeofiles.com/v8-4fc9a2fe7f8a7ef1e7966185b39b3b541792669a//android-arm-release.tar.xz -O third_party/v8-prebuilt.tar.xz
--2018-06-26 16:22:00--  https://v8.eyeofiles.com/v8-4fc9a2fe7f8a7ef1e7966185b39b3b541792669a//android-arm-release.tar.xz
Resolving v8.eyeofiles.com (v8.eyeofiles.com)... 88.99.186.147, 2a01:4f8:c0c:e38::2
Connecting to v8.eyeofiles.com (v8.eyeofiles.com)|88.99.186.147|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13701296 (13M) [application/octet-stream]
Saving to: ‘third_party/v8-prebuilt.tar.xz’

100%[======================================>] 13 701 296  11,2MB/s   in 1,2s   

2018-06-26 16:22:01 (11,2 MB/s) - ‘third_party/v8-prebuilt.tar.xz’ saved [13701296/13701296]

+ mkdir -p third_party/prebuilt-v8/android-arm-release
+ tar -xJf third_party/v8-prebuilt.tar.xz -C third_party/prebuilt-v8/android-arm-release
antoine@antoine-vm:/tmp/libadblockplus$ ANDROID_NDK_ROOT=/home/antoine/chromium/src/third_party/libadblockplus/src/third_party/android-ndk-r16b make TARGET_OS=android SUB_ACTION=libadblockplus ABP_TARGET_ARCH=arm Configuration=release BUILD_DIR=/tmp/libabp_build LIBV8_INCLUDE_DIR=/tmp/libadblockplus/third_party/prebuilt-v8/include/
python ensure_dependencies.py
INFO: Cloning repository https://github.com/adblockplus/adblockpluscore into adblockpluscore
INFO: Updating repository adblockpluscore to revision 059151706b3d88c78f85ad3ebf2dddbc598a47fa
INFO: Cloning repository https://github.com/adblockplus/buildtools into adblockpluscore/buildtools
INFO: Updating repository adblockpluscore/buildtools to revision 93e54d41ef7b2d1441f81b01822cbabac11fb84c
INFO: Cloning repository https://github.com/adblockplus/jshydra into adblockpluscore/buildtools/jshydra
INFO: Updating repository adblockpluscore/buildtools/jshydra to revision 104e6202a38ab8e9ecec6a5faa91e2124212d8d1
INFO: Cloning repository https://github.com/adblockplus/buildtools into buildtools
INFO: Updating repository buildtools to revision 2f2bf1f217314022327d4bd9c39002e9248dcf7f
INFO: Cloning repository https://github.com/adblockplus/googletest-github into third_party/googletest
INFO: Updating repository third_party/googletest to revision d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0
INFO: Cloning repository https://github.com/adblockplus/gyp into third_party/gyp
GYP_DEFINES="host_arch=x64 OS=android target_arch=arm libv8_lib_dir=/tmp/libadblockplus/third_party/prebuilt-v8/android-arm-release libv8_include_dir=/tmp/libadblockplus/third_party/prebuilt-v8/include/" \
	python ./make_gyp_wrapper.py --depth=. -f make-android -Ilibadblockplus.gypi --generator-output=/tmp/libabp_build -Gandroid_ndk_version=r16b libadblockplus.gyp
/home/antoine/chromium/src/third_party/libadblockplus/src/third_party/android-ndk-r16b/ndk-build -C /tmp/libabp_build libadblockplus \
	BUILDTYPE=Release \
	APP_ABI=armeabi-v7a \
	APP_PLATFORM=android-16 \
	APP_PIE=true \
	APP_STL=c++_shared \
	APP_BUILD_SCRIPT=Makefile \
	NDK_PROJECT_PATH=. \
	NDK_OUT=. \
	"LOCAL_LDFLAGS=\"-Wl,--allow-multiple-definition\"" \
	NDK_APP_DST_DIR=android-arm.release
Android NDK: WARNING:/home/antoine/chromium/src/third_party/libadblockplus/src/third_party/android-ndk-r16b/sources/android/support/Android.mk:adblockplus: LOCAL_LDFLAGS is always ignored for static libraries    
Android NDK: WARNING:/home/antoine/chromium/src/third_party/libadblockplus/src/third_party/android-ndk-r16b/sources/android/support/Android.mk:adblockplus: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:/home/antoine/chromium/src/third_party/libadblockplus/src/third_party/android-ndk-r16b/sources/android/support/Android.mk:googletest: LOCAL_LDFLAGS is always ignored for static libraries    
Android NDK: WARNING:/home/antoine/chromium/src/third_party/libadblockplus/src/third_party/android-ndk-r16b/sources/android/support/Android.mk:googletest: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:/home/antoine/chromium/src/third_party/libadblockplus/src/third_party/android-ndk-r16b/sources/android/support/Android.mk:googletest_main: LOCAL_LDFLAGS is always ignored for static libraries    
Android NDK: WARNING:/home/antoine/chromium/src/third_party/libadblockplus/src/third_party/android-ndk-r16b/sources/android/support/Android.mk:googletest_main: LOCAL_LDLIBS is always ignored for static libraries    
make[1]: Entering directory `/tmp/libabp_build'
  ACTION libadblockplus_gyp_libadblockplus_target_convert_js out/Release/obj.target/libadblockplus/geni/adblockplus.js.cpp
  CXX(target) out/Release/obj.target/libadblockplus/src/ActiveObject.o
  CXX(target) out/Release/obj.target/libadblockplus/src/AsyncExecutor.o
  CXX(target) out/Release/obj.target/libadblockplus/src/AppInfoJsObject.o
  CXX(target) out/Release/obj.target/libadblockplus/src/ConsoleJsObject.o
  CXX(target) out/Release/obj.target/libadblockplus/src/DefaultLogSystem.o
  CXX(target) out/Release/obj.target/libadblockplus/src/DefaultFileSystem.o
  CXX(target) out/Release/obj.target/libadblockplus/src/DefaultTimer.o
  CXX(target) out/Release/obj.target/libadblockplus/src/DefaultWebRequest.o
  CXX(target) out/Release/obj.target/libadblockplus/src/FileSystemJsObject.o
  CXX(target) out/Release/obj.target/libadblockplus/src/FilterEngine.o
  CXX(target) out/Release/obj.target/libadblockplus/src/GlobalJsObject.o
  CXX(target) out/Release/obj.target/libadblockplus/src/JsContext.o
  CXX(target) out/Release/obj.target/libadblockplus/src/JsEngine.o
  CXX(target) out/Release/obj.target/libadblockplus/src/JsError.o
  CXX(target) out/Release/obj.target/libadblockplus/src/JsValue.o
  CXX(target) out/Release/obj.target/libadblockplus/src/Notification.o
  CXX(target) out/Release/obj.target/libadblockplus/src/Platform.o
  CXX(target) out/Release/obj.target/libadblockplus/src/ReferrerMapping.o
  CXX(target) out/Release/obj.target/libadblockplus/src/Thread.o
  CXX(target) out/Release/obj.target/libadblockplus/src/Utils.o
  CXX(target) out/Release/obj.target/libadblockplus/src/WebRequestJsObject.o
  CXX(target) out/Release/obj.target/libadblockplus/geni/adblockplus.js.o
  CXX(target) out/Release/obj.target/libadblockplus/src/DefaultWebRequestDummy.o
  AR(target) out/Release/obj.target/libadblockplus.a
  COPY out/Release/libadblockplus.a
make[1]: Leaving directory `/tmp/libabp_build'
antoine@antoine-vm:/tmp/libadblockplus$ find /tmp/libabp_build/ -name *.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/geni/adblockplus.js.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/ConsoleJsObject.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/Utils.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/DefaultWebRequestDummy.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/WebRequestJsObject.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/JsValue.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/ActiveObject.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/JsContext.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/JsEngine.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/DefaultTimer.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/Thread.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/Platform.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/JsError.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/AsyncExecutor.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/FileSystemJsObject.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/ReferrerMapping.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/AppInfoJsObject.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/GlobalJsObject.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/DefaultWebRequest.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/FilterEngine.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/DefaultFileSystem.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/DefaultLogSystem.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/Notification.o
antoine@antoine-vm:/tmp/libadblockplus$ file /tmp/libabp_build/out/Release/obj.target/libadblockplus/src/Notification.o
/tmp/libabp_build/out/Release/obj.target/libadblockplus/src/Notification.o: ELF 64-bit LSB  relocatable, x86-64, version 1 (SYSV), not stripped
antoine@antoine-vm:/tmp/libadblockplus$ 

comment:3 Changed 7 weeks ago by sergz

Is it still the issue, it seems resolved.

comment:4 Changed 7 weeks ago by asmirnov

I did not check it on regular basis. You have the commands to reproduce it, did you try?

Last edited 7 weeks ago by asmirnov (previous) (diff)
Note: See TracTickets for help on using tickets.