Error in building v8 on macOS: llvm-ar: No such file or directory

655 views
Skip to first unread message

Joel Ivory Johnson

unread,
Jun 2, 2021, 10:56:18 AM6/2/21
to v8-dev
I'm trying to build v8 for Android on MacOS. I'm encountering an error during the build.

The build command that I am using is

ninja -C out.gn/arm.release d8

The arguments (as viewed from gn args out.gn/arm.release ) are as follows.

android_sdk_root= "/Users/joel/Library/Android/sdk/"
android_ndk_version = "r22"
v8_static_library = true
target_os = "android"
target_cpu = "arm64"
v8_target_cpu = "arm64"
is_component_build = false


The build is running into an error. I've got not clue how to get around this. When the error is encountered, this is the error that is produced. I noticed that the lines appear to all say

./../third_party/llvm-build/Release+Asserts/bin/llvm-ar: No such file or directory

Any idea how to get around this? The full output is as follows.



[1/2020] AR clang_x64_v8_arm64/obj/libv8_bigint.a **FAILED: clang_x64_v8_arm64/obj/libv8_bigint.a rm -f clang_x64_v8_arm64/obj/libv8_bigint.a && "../../third_party/llvm-build/Release+Asserts/bin/llvm-ar" -r -c -s -D clang_x64_v8_arm64/obj/libv8_bigint.a "@clang_x64_v8_arm64/obj/libv8_bigint.a.rsp" /bin/sh: ../../third_party/llvm-build/Release+Asserts/bin/llvm-ar: No such file or directory 
[2/2020] AR clang_x64_v8_arm64/obj/libv8_libbase.a FAILED: clang_x64_v8_arm64/obj/libv8_libbase.a rm -f clang_x64_v8_arm64/obj/libv8_libbase.a && "../../third_party/llvm-build/Release+Asserts/bin/llvm-ar" -r -c -s -D clang_x64_v8_arm64/obj/libv8_libbase.a "@clang_x64_v8_arm64/obj/libv8_libbase.a.rsp"** /bin/sh: ../../third_party/llvm-build/Release+Asserts/bin/llvm-ar: No such file or directory
[3/2020] AR clang_x64_v8_arm64/obj/third_party/icu/libicuuc.a FAILED: clang_x64_v8_arm64/obj/third_party/icu/libicuuc.a rm -f clang_x64_v8_arm64/obj/third_party/icu/libicuuc.a && "../../third_party/llvm-build/Release+Asserts/bin/llvm-ar" -r -c -s -D clang_x64_v8_arm64/obj/third_party/icu/libicuuc.a "@clang_x64_v8_arm64/obj/third_party/icu/libicuuc.a.rsp" /bin/sh: ../../third_party/llvm-build/Release+Asserts/bin/llvm-ar: No such file or directory
[4/2020] AR clang_x64_v8_arm64/obj/third_party/zlib/libchrome_zlib.a FAILED: clang_x64_v8_arm64/obj/third_party/zlib/libchrome_zlib.a rm -f clang_x64_v8_arm64/obj/third_party/zlib/libchrome_zlib.a && "../../third_party/llvm-build/Release+Asserts/bin/llvm-ar" -r -c -s -D clang_x64_v8_arm64/obj/third_party/zlib/libchrome_zlib.a "@clang_x64_v8_arm64/obj/third_party/zlib/libchrome_zlib.a.rsp" /bin/sh: ../../third_party/llvm-build/Release+Asserts/bin/llvm-ar: No such file or directory
[5/2020] AR obj/libv8_libbase.a FAILED: obj/libv8_libbase.a rm -f obj/libv8_libbase.a && "../../third_party/llvm-build/Release+Asserts/bin/llvm-ar" -T -r -c -s -D obj/libv8_libbase.a @"obj/libv8_libbase.a.rsp" /bin/sh: ../../third_party/llvm-build/Release+Asserts/bin/llvm-ar: No such file or directory
[6/2020] AR obj/libv8_bigint.a FAILED: obj/libv8_bigint.a rm -f obj/libv8_bigint.a && "../../third_party/llvm-build/Release+Asserts/bin/llvm-ar" -T -r -c -s -D obj/libv8_bigint.a @"obj/libv8_bigint.a.rsp" /bin/sh: ../../third_party/llvm-build/Release+Asserts/bin/llvm-ar: No such file or directory
[7/2020] AR obj/third_party/icu/libicuuc.a FAILED: obj/third_party/icu/libicuuc.a rm -f obj/third_party/icu/libicuuc.a && "../../third_party/llvm-build/Release+Asserts/bin/llvm-ar" -T -r -c -s -D obj/third_party/icu/libicuuc.a @"obj/third_party/icu/libicuuc.a.rsp" /bin/sh: ../../third_party/llvm-build/Release+Asserts/bin/llvm-ar: No such file or directory
[8/2020] AR obj/third_party/zlib/libchrome_zlib.a FAILED: obj/third_party/zlib/libchrome_zlib.a rm -f obj/third_party/zlib/libchrome_zlib.a && "../../third_party/llvm-build/Release+Asserts/bin/llvm-ar" -T -r -c -s -D obj/third_party/zlib/libchrome_zlib.a @"obj/third_party/zlib/libchrome_zlib.a.rsp" /bin/sh: ../../third_party/llvm-build/Release+Asserts/bin/llvm-ar: No such file or directory ninja: build stopped: subcommand failed.

Joel Ivory Johnson

unread,
Jun 2, 2021, 11:08:41 AM6/2/21
to v8-dev
BTW: I forgot to include a directory listing of the file location in question. 

$ ls -lisat third_party/llvm-build/Release+Asserts/bin/

total 146648

9129588      0 drwxr-xr-x  6 joel  J2\Domain Users       192 May 31 20:50 ..
9129595      0 lrwxr-xr-x  1 joel  J2\Domain Users         5 May 31 20:50 clang++ -> clang
9129593      0 lrwxr-xr-x  1 joel  J2\Domain Users         5 May 31 20:50 clang-cl -> clang
9129589      0 drwxr-xr-x  8 joel  J2\Domain Users       256 May 19 22:55 .
9129590 130224 -rwxr-xr-x  1 joel  J2\Domain Users  66671096 May 19 22:55 clang
9129594   8392 -rwxr-xr-x  1 joel  J2\Domain Users   4296640 May 19 22:55 llvm-pdbutil
9129591   7384 -rwxr-xr-x  1 joel  J2\Domain Users   3777440 May 19 22:55 llvm-symbolizer
9129592    648 -rwxr-xr-x  1 joel  J2\Domain Users    329616 May 19 22:55 llvm-undname


Ross McIlroy

unread,
Jun 3, 2021, 9:35:02 AM6/3/21
to v8-dev
Hi Joel,

I'm not sure if building V8 for Android on Mac is a supported configuration I'm afraid, we typically build the Android binaries on Linux.  

Saying that, when I look in third_party/llvm-build/Release+Asserts/bin/ on my Linux checkout I do see llvm-ar present.  I'm wondering if you need to run "gclient sync" again to make the third_party directories up to date?

Cheers,
Ross


--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/675acd8b-91d6-4522-a6f4-a15d4341e2ebn%40googlegroups.com.

Joel Ivory Johnson

unread,
Jun 3, 2021, 6:06:40 PM6/3/21
to v8-dev

I ran `gclient sync` when I first got the above error. But hearing that Mac is not (or might not be) supported is useful information. It's good to know one is on a dead-end road before reaching the end. 😊

I just dug up an unused computer and have Ubunto installed on it. Hoping this works🤞🏽

Thanks for the reply!
Reply all
Reply to author
Forward
0 new messages