Re: [v8-users] building V8 for Android on Mac or ubuntu w static libs?

528 views
Skip to first unread message

Jochen Eisinger

unread,
Dec 23, 2016, 2:46:38 AM12/23/16
to v8-users
hey,

to build for android, you should add target_os = "android" and target_cpu = "arm".

you'll also have to add target_os = ['android', 'mac'] to your .gclient file (which should be one level up from your v8 checkout), so gclient sync will download the android specific deps

hth
-jochen

On Thu, Dec 22, 2016 at 5:41 PM 'Mindy DelliCarpini' via v8-users <v8-u...@googlegroups.com> wrote:
Need a V8 build for our prototyping tool (boom.googleplex.com). The tool runs with a Mac simulator, so the build has to be completed on a Mac.

The TOT v8 builds are broken for Mac, and also for building static full libraries (no the thin .a files, which wouldn't be shareable)

I'm interested in getting any of the following working (preference for Mac build, but I know its not a common thing)

1) Build v8 on my mac
Tried old instructions, but failed with missing libraries (standard c++?)
Tried new instructions:
tools/dev/v8gen.py arm.release
Added: target_os=arm
Getting this failure:

/Users/mindyp/local/src/v8/buildtools/mac/gn --root=/Users/mindyp/local/src/v8 -q --check gen .

ERROR Unresolved dependencies.

//:run_mkpeephole(//build/toolchain/android:android_arm)

  needs //:mkpeephole(//build/toolchain/mac:clang_x86_v8_arm)

//:run_mksnapshot(//build/toolchain/android:android_arm)

  needs //:mksnapshot(//build/toolchain/mac:clang_x86_v8_arm)


2) Full static library build on Linux that is not just the .a, so I can transfer it to my mac
Followed: 
But this breaks during the LD phase
Still broken

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mindy DelliCarpini

unread,
Dec 24, 2016, 3:04:00 PM12/24/16
to v8-users
Ok so did this to the .gclient file 1 directory up:
solutions = [
  {
    "managed": False,
    "name": "v8",
    "deps_file": "DEPS",
    "custom_deps": {},
"target_os" : ['android', 'mac']
  },
]

Then: gclient sync
Then  tools/dev/v8gen.py arm.release

Then this in args.gn
is_debug = false
target_cpu = "arm"
v8_target_cpu = "arm"
target_os="android"

Then:

ninja -C out.gn/arm.release/


This error persists:

mindyp-macbookpro:v8 mindyp$ ninja -C out.gn/arm.release/

ninja: Entering directory `out.gn/arm.release/'

[1/1] Regenerating ninja files

FAILED: build.ninja 

/Users/mindyp/local/src/v8/buildtools/mac/gn --root=/Users/mindyp/local/src/v8 -q --check gen .

ERROR Unresolved dependencies.

//:run_mkpeephole(//build/toolchain/android:android_arm)

  needs //:mkpeephole(//build/toolchain/mac:clang_x86_v8_arm)

//:run_mksnapshot(//build/toolchain/android:android_arm)

  needs //:mksnapshot(//build/toolchain/mac:clang_x86_v8_arm)


ninja: error: rebuilding 'build.ninja': subcommand failed

[1]+  Done                    mate ../.gclient





Mindy DelliCarpini

unread,
Dec 24, 2016, 3:10:24 PM12/24/16
to v8-users
In case the issue is this, I'm running El Capitan 10.11.6

Jochen Eisinger

unread,
Jan 2, 2017, 5:58:43 AM1/2/17
to v8-u...@googlegroups.com
On Sat, Dec 24, 2016 at 9:10 PM Mindy DelliCarpini <mindy...@gmail.com> wrote:
In case the issue is this, I'm running El Capitan 10.11.6

On Saturday, December 24, 2016 at 12:04:00 PM UTC-8, Mindy DelliCarpini wrote:
Ok so did this to the .gclient file 1 directory up:
solutions = [
  {
    "managed": False,
    "name": "v8",
    "deps_file": "DEPS",
    "custom_deps": {},
"target_os" : ['android', 'mac']
  },
]

target_os is not a sub-key of solutions, your file should look something like this:

solutions = [...]
target_os = [ 'android', 'mac' ]
 
Then: gclient sync
Then  tools/dev/v8gen.py arm.release

Then this in args.gn
is_debug = false
target_cpu = "arm"
v8_target_cpu = "arm"
target_os="android"

Then:

ninja -C out.gn/arm.release/


This error persists:

mindyp-macbookpro:v8 mindyp$ ninja -C out.gn/arm.release/

ninja: Entering directory `out.gn/arm.release/'

[1/1] Regenerating ninja files

FAILED: build.ninja 

/Users/mindyp/local/src/v8/buildtools/mac/gn --root=/Users/mindyp/local/src/v8 -q --check gen .

ERROR Unresolved dependencies.

//:run_mkpeephole(//build/toolchain/android:android_arm)

  needs //:mkpeephole(//build/toolchain/mac:clang_x86_v8_arm)

//:run_mksnapshot(//build/toolchain/android:android_arm)

  needs //:mksnapshot(//build/toolchain/mac:clang_x86_v8_arm)


ah, turns out nobody tried that on mac yet :) i'll submit a fix to the build config.

btw, to get static libraries, set the gn arg v8_static_library to true

Mindy DelliCarpini

unread,
Jan 2, 2017, 3:12:56 PM1/2/17
to v8-u...@googlegroups.com
Thanks again for the help Jochen...but still broken:

.gclient:
solutions = [
  {
    "managed": False,
    "name": "v8",
    "deps_file": "DEPS",
    "custom_deps": {},
  },
]
target_os = ['android', 'mac']

gclient sync

relevant logs?

****

________ running 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-clang-format -s v8/buildtools/mac/clang-format.sha1' in '/Users/mindyp/local/src'

0> File v8/buildtools/mac/clang-format exists and SHA1 matches. Skipping.

Success!

Downloading 1 files took 0.012256 second(s)

****

then:

tools/dev/v8gen.py arm.release

then changed out.gn/arm.release/args.gn to:

is_debug = false
target_cpu = "arm"
v8_target_cpu = "arm"
target_os="android"

then ran this from the root (~/local/src/v8):

ninja -C out.gn/arm.release/

Same error:

mindyp-macbookpro:v8 mindyp$ ninja -C out.gn/arm.release/

ninja: Entering directory `out.gn/arm.release/'

[1/1] Regenerating ninja files

FAILED: build.ninja 

/Users/mindyp/local/src/v8/buildtools/mac/gn --root=/Users/mindyp/local/src/v8 -q --check gen .

ERROR Unresolved dependencies.

//:run_mkpeephole(//build/toolchain/android:android_arm)

  needs //:mkpeephole(//build/toolchain/mac:clang_x86_v8_arm)

//:run_mksnapshot(//build/toolchain/android:android_arm)

  needs //:mksnapshot(//build/toolchain/mac:clang_x86_v8_arm)


ninja: error: rebuilding 'build.ninja': subcommand failed


This is what is in my third_party/ & third_party/android_tools directories:

#:v8 mindyp$ ls third_party/

android_tools/          catapult/               inspector_protocol/     jinja2/                 markupsafe/

binutils/               icu/                    instrumented_libraries/ llvm-build/             

#:v8 mindyp$ ls third_party/android_tools/

.git/                DEPS                 OWNERS               codereview.settings  sdk/                 

.gitignore           LICENSE              README.chromium      ndk/   


To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "v8-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-users/-uev1LjaAxA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-users+unsubscribe@googlegroups.com.

Jochen Eisinger

unread,
Jan 3, 2017, 3:35:42 AM1/3/17
to v8-u...@googlegroups.com
yeah, due to vacations, my CL to fix the gn error is still under review. Meanwhile, you can build on linux, that should work already now

You received this message because you are subscribed to a topic in the Google Groups "v8-users" group.
To unsubscribe from this group and all its topics, send an email to v8-users+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages