v8-android-buildscripts icon indicating copy to clipboard operation
v8-android-buildscripts copied to clipboard

Build x64 version with AddressSanitizer fails

Open Sunbreak opened this issue 3 years ago • 1 comments

Built on https://github.com/Sunbreak/v8-android-buildscripts/tree/7.8.1-asan

$ NO_INTL=1 ./scripts/build.sh
ninja: Entering directory `out.v8.arm'
ninja: no work to do.
ninja: Entering directory `out.v8.x86'
ninja: no work to do.
ninja: Entering directory `out.v8.arm64'
ninja: no work to do.
ninja: Entering directory `out.v8.x64'
[1/1] SOLINK_MODULE ./libv8android.so
FAILED: libv8android.so lib.unstripped/libv8android.so
../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -fuse-ld=lld -Wl,--color-diagnostics -Wl,--no-rosegment -Wl,--exclude-libs=libgcc.a -Wl,--exclude-libs=libvpx_assembly_arm.a --target=x86_64-linux-android21 -m64 -Werror --sysroot=../android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot -B../android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64 -Wl,--warn-shared-textrel -fsanitize=address -fsanitize-address-use-after-scope -Wl,--warn-shared-textrel -Wl,-O2 -Wl,--gc-sections -Wl,-u_sanitizer_options_link_helper -fsanitize=address -fsanitize-address-use-after-scope -o "./lib.unstripped/libv8android.so" -Wl,-soname="libv8android.so" @"./libv8android.so.rsp" && ../buildtools/third_party/eu-strip/bin/eu-strip -o "./libv8android.so" "./lib.unstripped/libv8android.so"
ld.lld: error: cannot open /home/ubuntu/v7.8.x/v8-android-buildscripts/v8/third_party/llvm-build/Release+Asserts/lib/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64-android.so: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

clang/10.0.0 x64 dependencies are missing while arm, x86 and arm64 are present

ls -al v8/third_party/llvm-build/Release+Asserts/lib/clang/10.0.0/lib/linux/libclang_rt.asan*android*
-rwxr-xr-x 1 ubuntu ubuntu 1268176 8月  28  2019 v8/third_party/llvm-build/Release+Asserts/lib/clang/10.0.0/lib/linux/libclang_rt.asan-aarch64-android.so
-rwxr-xr-x 1 ubuntu ubuntu 1183072 8月  28  2019 v8/third_party/llvm-build/Release+Asserts/lib/clang/10.0.0/lib/linux/libclang_rt.asan-arm-android.so
-rwxr-xr-x 1 ubuntu ubuntu 1301792 8月  28  2019 v8/third_party/llvm-build/Release+Asserts/lib/clang/10.0.0/lib/linux/libclang_rt.asan-i686-android.so

Built on https://github.com/Sunbreak/v8-android-buildscripts/tree/7.8.1-asan

$ NO_INTL=true ./scripts/build.sh android x64
ninja: Entering directory `v8/out.v8.x64'
[1/1] SOLINK_MODULE ./libv8android.so
FAILED: libv8android.so lib.unstripped/libv8android.so
../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -fuse-ld=lld -Wl,--fatal-warnings -Wl,--build-id -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--color-diagnostics -Wl,--no-rosegment -Wl,--no-call-graph-profile-sort -Wl,--exclude-libs=libgcc.a -Wl,--exclude-libs=libvpx_assembly_arm.a --rtlib=libgcc --target=x86_64-linux-android23 -m64 -no-canonical-prefixes --sysroot=../android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/sysroot --gcc-toolchain=../android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64 -Wl,--warn-shared-textrel -fsanitize=address -Wl,--warn-shared-textrel -Wl,-O2 -Wl,--gc-sections -Wl,-u_sanitizer_options_link_helper -fsanitize=address -o "./lib.unstripped/libv8android.so" -Wl,-soname="libv8android.so" @"./libv8android.so.rsp" && ../third_party/llvm-build/Release+Asserts/bin/llvm-strip -o "./libv8android.so" "./lib.unstripped/libv8android.so"
ld.lld: error: cannot open ../third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan-x86_64-android.so: No such file or directory
ld.lld: error: cannot open ../third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan_static-x86_64-android.a: No such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

clang 15.0.0 x64 dependencies are missing while arm, x86 and arm64 are present

$ ls -al v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan*android*
-rwxr-xr-x 1 ubuntu ubuntu 1390064 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan-aarch64-android.so
-rwxr-xr-x 1 ubuntu ubuntu 1316764 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan-arm-android.so
-rwxr-xr-x 1 ubuntu ubuntu 1385684 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan-i686-android.so
-rw-r--r-- 1 ubuntu ubuntu    5576 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan_static-aarch64-android.a
-rw-r--r-- 1 ubuntu ubuntu    4452 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan_static-arm-android.a
-rw-r--r-- 1 ubuntu ubuntu    4536 2月  13 16:34 v8/third_party/llvm-build/Release+Asserts/lib/clang/15.0.0/lib/linux/libclang_rt.asan_static-i686-android.a

Sunbreak avatar Jun 23 '22 03:06 Sunbreak

A temporary workaround #30

Sunbreak avatar Jun 23 '22 03:06 Sunbreak