Compile V8 for Android

127 views
Skip to first unread message

Yann Bonnetain

unread,
May 16, 2016, 3:41:54 PM5/16/16
to v8-users
Hi 

I am been starting from here to fetch and build V8

Both on Mac and Ubuntu I have the following error when I try to make the target android_arm.release

gyp: Error importing pymod_do_mainmodule (has_valgrind): No module named has_valgrind

However, has_valgrind exists in tools/

Is there a missing configuration I am not aware of ?

Some help would be great :)

 

Jakob Kummerow

unread,
May 17, 2016, 4:36:05 AM5/17/16
to v8-users
Works for me. Which version of V8 do yo have checked out? What does "which gyp" say? If you have /usr/bin/gyp or something installed by your distro, that could interfere; make sure depot_tools is the first thing in your $PATH.

(Also, has_valgrind.py should exist in gypfiles/, I assume "tools/" was just a typo: https://chromium.googlesource.com/v8/v8/+/master/gypfiles/has_valgrind.py)

--
--
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.

Yann Bonnetain

unread,
May 17, 2016, 1:37:07 PM5/17/16
to v8-users

Hi Jakob and thanks for your help



I have branched of V8 master


which gyp

Does not print anything 


sudo find / -name 'gyp'

~/depot_tools/v8/build/android/gyp

~/depot_tools/v8/tools/gyp

~/depot_tools/v8/tools/gyp/gyp

~/depot_tools/v8/tools/gyp/pylib/gyp


which seems to show that no other gyp is present



depot_tools is in first position in $PATH and points to the actual depot_tools folder



v8/gypfiles/has_valgrind.py is there (sorry for the confusion)



Is there a specific branch for Android?


I cannot figure out what I have missing (the error is the same on a VM running latest Ubuntu and Mac OS)


Jakob Kummerow

unread,
May 18, 2016, 4:45:49 AM5/18/16
to v8-users
I'm not sure what else to try, sorry. I haven't seen this error before and can't reproduce it.

On Tue, May 17, 2016 at 7:37 PM, Yann Bonnetain <yann.bo...@gmail.com> wrote:

I have branched of V8 master

That doesn't mean anything; everything is branched off master. Maybe try updating? The gyp files moved recently (from build/ to gypfiles/), maybe there were a few commits where not everything was working correctly.

Is there a specific branch for Android?

No, every version should build for Android.

Jakob Kummerow

unread,
May 20, 2016, 5:51:18 AM5/20/16
to v8-users
On Wed, May 18, 2016 at 10:45 AM, Jakob Kummerow <jkum...@chromium.org> wrote:
The gyp files moved recently (from build/ to gypfiles/), maybe there were a few commits where not everything was working correctly.

Turns out there was a small update to Makefile.android missing. The build still worked on machines that had an old build/has_valgrind.pyc file lying around from before the files moved...

After https://codereview.chromium.org/2003513002/ it should work again on fresh checkouts.

Yann b

unread,
May 20, 2016, 6:00:49 AM5/20/16
to v8-users
Oh well spotted !

Again thank you so much for your help.
Reply all
Reply to author
Forward
0 new messages