Build v8

149 views
Skip to first unread message

litoki...@gmail.com

unread,
Aug 14, 2018, 8:59:34 AM8/14/18
to v8-dev
Hi for a long time now i've been trying to build v8 without any success the documentation is vague and i really need to build it along all of it's parts...
Thank you 

Leszek Swirski

unread,
Aug 14, 2018, 9:39:13 AM8/14/18
to v8-dev
Can you be more specific about the errors you're getting? https://github.com/v8/v8/wiki/Building-from-Source is the source of truth here, if there are any issues with this documentation please let us know because we do want it to be as easy as possible.

On Tue, Aug 14, 2018 at 1:59 PM <litoki...@gmail.com> wrote:
Hi for a long time now i've been trying to build v8 without any success the documentation is vague and i really need to build it along all of it's parts...
Thank you 

--
--
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.
For more options, visit https://groups.google.com/d/optout.

dan Med

unread,
Aug 14, 2018, 10:54:13 AM8/14/18
to v8-...@googlegroups.com
I’m going to try and build it.... and will contact you thank you 

dan Med

unread,
Aug 14, 2018, 11:16:34 AM8/14/18
to v8-...@googlegroups.com
but i'm trying to build it on windows not linux nor OSx


2018-08-14 16:54 GMT+02:00 dan Med <litoki...@gmail.com>:
I’m going to try and build it.... and will contact you thank you 
On Tue, 14 Aug 2018 at 15:39, 'Leszek Swirski' via v8-dev <v8-...@googlegroups.com> wrote:
Can you be more specific about the errors you're getting? https://github.com/v8/v8/wiki/Building-from-Source is the source of truth here, if there are any issues with this documentation please let us know because we do want it to be as easy as possible.
On Tue, Aug 14, 2018 at 1:59 PM <litoki...@gmail.com> wrote:
Hi for a long time now i've been trying to build v8 without any success the documentation is vague and i really need to build it along all of it's parts...
Thank you 

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

dan Med

unread,
Aug 14, 2018, 12:15:02 PM8/14/18
to v8-...@googlegroups.com
I'm on a windows based machine, would this be good ? https://github.com/v8/v8/wiki/Building-with-GN
if yes
        i already tried it but with no success
else
        i don't know what to  do 

Leszek Swirski

unread,
Aug 14, 2018, 12:16:46 PM8/14/18
to v8-dev
Did you follow https://github.com/v8/v8/wiki/Building-from-Source and use depot-tools + "fetch v8"?
If yes, then please post what your actual error message is
else, do that first.

On Tue, Aug 14, 2018 at 5:15 PM dan Med <litoki...@gmail.com> wrote:
I'm on a windows based machine, would this be good ? https://github.com/v8/v8/wiki/Building-with-GN
if yes
        i already tried it but with no success
else
        i don't know what to  do 

2018-08-14 17:16 GMT+02:00 dan Med <litoki...@gmail.com>:
but i'm trying to build it on windows not linux nor OSx

2018-08-14 16:54 GMT+02:00 dan Med <litoki...@gmail.com>:
I’m going to try and build it.... and will contact you thank you 
On Tue, 14 Aug 2018 at 15:39, 'Leszek Swirski' via v8-dev <v8-...@googlegroups.com> wrote:
Can you be more specific about the errors you're getting? https://github.com/v8/v8/wiki/Building-from-Source is the source of truth here, if there are any issues with this documentation please let us know because we do want it to be as easy as possible.
On Tue, Aug 14, 2018 at 1:59 PM <litoki...@gmail.com> wrote:
Hi for a long time now i've been trying to build v8 without any success the documentation is vague and i really need to build it along all of it's parts...
Thank you 

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

dan Med

unread,
Aug 14, 2018, 12:19:06 PM8/14/18
to v8-...@googlegroups.com
but isn't the link u just gave to me wrong ???  cause at the top i read 

In order to be able to build V8 from scratch on Linux/Mac for x64 please heed the following steps:

but i'm on a windows 



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

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

Leszek Swirski

unread,
Aug 14, 2018, 12:21:42 PM8/14/18
to v8-dev
The parts about depot tools and "Don’t simply git clone the V8 repository!" are still relevant.

Windows builds are admittedly less well documented than Linux/Mac builds, we should clarify the docs there.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

dan Med

unread,
Aug 14, 2018, 12:24:05 PM8/14/18
to v8-...@googlegroups.com
Yeah ! ok so what i have so far is the depot tools already set up and i already have git on my computer.
Before going with your path, i should say that yesterday i gave it a shot and after the fetch v8 command run for a while it asked mefor a username input for a google.something email i've already cleared everything up because i thought i should start from zero and here u are so.
I will do fetch v8 now ? 

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

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

Leszek Swirski

unread,
Aug 14, 2018, 12:27:01 PM8/14/18
to v8-dev
Try it again, make sure you go through all the gclient steps (calling gclient before fetch, calling gclient sync after fetch), follow the remaining steps on that page and see what happens.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

dan Med

unread,
Aug 14, 2018, 12:49:41 PM8/14/18
to v8-...@googlegroups.com
yeah but stil 1 that isn't the page for windows
second after fetch i will get one error for sure now i will try again

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

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

dan Med

unread,
Aug 14, 2018, 4:06:38 PM8/14/18
to v8-...@googlegroups.com
OK so after the fetch v8 command this happened 
subprocess.CalledProcessError: Command '('C:\\depot_tools\\win_tools-2_7_6_bin\\python\\bin\\python.exe', 'C:\\depot_tools\\gclient.py', 'sync', '--with_branch_heads')' returned non-zero exit status 2

dan Med

unread,
Aug 14, 2018, 4:06:48 PM8/14/18
to v8-...@googlegroups.com
it is really frustrating

thapari...@gmail.com

unread,
Aug 14, 2018, 5:32:36 PM8/14/18
to v8-dev
Run into same error. Steps followed to correct:
1. Delete depot_tools
2. Environment variables:
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set DEPOT_TOOLS_UPDATE=0
3. Install depot_tools again and follow to 'fetch v8'
it is really frustrating


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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

Jakob Kummerow

unread,
Aug 15, 2018, 12:02:35 PM8/15/18
to v8-...@googlegroups.com
set DEPOT_TOOLS_WIN_TOOLCHAIN=0 sounds like it might be missing from our documentation.

set DEPOT_TOOLS_UPDATE=0 sounds like you're setting yourself up for future trouble.

danny...@gmail.com

unread,
Aug 15, 2018, 2:38:31 PM8/15/18
to v8-dev
For what it's worth, I spent several days a month or two ago trying to get V8 to build on Windows and eventually gave up (I was hoping to step through the source to work something out).

Your Windows documentation definitely could do with someone actually trying it from scratch on a clean machine, and documenting exactly what they did without any jargon/acronyms. The existing documentation gives the impression that it is a Linux-script with a few comments added for Windows by people "guessing" what they think they might have "tweaked" on their PC to make it work.

Things like this step:

   5. tools/dev/v8gen.py x64.release

tells me that you are assuming that I am a python developer and have set up the file associations accordingly. I am not, so Windows merely prompts me to ask how I want to open the file "tools\dev\v8gen.py".

I do have several instances of python.exe on my machine (one of them is yours). Do you want me to run the python.bat file, here? The contents of that file look a bit weird to me. It looks like it's trying to find a file called "%~dp0python_bin_reldir.txt" (yes, there's only one '%' in there). This, with my admittedly limited understanding of Windows batch command syntax, seems to be gibberish. Who is ~dp0? That's a Unix home folder, not a Windows one, surely?

I'll stop there; hopefully you get the point that you need to write some Windows documentation. Please don't try to "improve" what you have, just get someone who understands Windows and has a clean machine to write one from scratch!

Thanks :)

Dan

Mike Moening

unread,
Aug 15, 2018, 3:55:46 PM8/15/18
to v8-...@googlegroups.com

Well said Dan!

It’s a mess.

 

Mike M

--

dan Med

unread,
Aug 15, 2018, 6:09:16 PM8/15/18
to v8-...@googlegroups.com
Yeah that’s what i was trying to say 

Jakob Kummerow

unread,
Aug 15, 2018, 6:43:48 PM8/15/18
to v8-...@googlegroups.com
We are aware that our Windows instructions are not as well-maintained as those for Linux/Mac. As far as I know, nobody on the team uses Windows for development regularly. An additional difficulty is that we share a lot of our infrastructure with the rest of the Chromium project, so sometimes when they change shared things our documentation lags behind until someone notices (e.g. the DEPOT_TOOLS_WIN_TOOLCHAIN thing is such a case, it is documented here: https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#install but not yet on the V8 wiki).

If any one of you from the community who wants to develop V8 on Windows would volunteer to contribute and maintain well-tested instructions, that would certainly be appreciated by the rest of the community :-)

dan Med

unread,
Aug 15, 2018, 7:18:52 PM8/15/18
to v8-...@googlegroups.com
I’m looking not to develop for v8 but just to build it... have some things to test on it

Dan Pike

unread,
Aug 16, 2018, 1:48:49 AM8/16/18
to v8-...@googlegroups.com

I think that would be rather difficult, since such a person would need some level of control over the project, including access to those people who know how to do it in the first place. Which is a self-referencing problem, is it not? :)

 

May I ask why you choose to depend on obfuscating custom tools such as depot_tools and those python scripts? If you were to use more standard stuff, like CMake and plain-old-git commands (or even MSBuild), then it might be feasible for us to work out what is going wrong and give you some advice.

 

What is so special about a Windows build of V8 that it cannot be built with a “normal” project/solution file? Although the GUI side of Visual Studio drives me crazy with some of its weird behaviour, it is a very powerful build environment and the Microsoft compiler continues to be pretty stable and well-documented.

 

Dan

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

Jakob Kummerow

unread,
Aug 16, 2018, 5:15:30 AM8/16/18
to v8-...@googlegroups.com
On Thu, Aug 16, 2018 at 7:48 AM Dan Pike <danny...@gmail.com> wrote:

I think that would be rather difficult, since such a person would need some level of control over the project, including access to those people who know how to do it in the first place. Which is a self-referencing problem, is it not? :)


My suggestion was to become those people (as opposed to assuming that they already exist).
 

May I ask why you choose to depend on obfuscating custom tools such as depot_tools and those python scripts? If you were to use more standard stuff, like CMake and plain-old-git commands (or even MSBuild), then it might be feasible for us to work out what is going wrong and give you some advice.


Because we want to support our project's needs in a way that's as convenient and as fast as possible. We have requirements (e.g.: pulling in third-party dependencies at specified versions, multiple supported platforms, cross-compilation, a massive codebase with many build-time configuration options) that are somewhat cumbersome to handle with "plain old" commands. Convenience wrappers and sane defaults are the solution. And our build is very convenient; it just so happens to be not as well tested on Windows because so few people use Windows for development. But that's where you can help, if you're interested!

What is so special about a Windows build of V8 that it cannot be built with a “normal” project/solution file? Although the GUI side of Visual Studio drives me crazy with some of its weird behaviour, it is a very powerful build environment and the Microsoft compiler continues to be pretty stable and well-documented.


To the extent possible, we want the build system to be the same on all platforms. The more divergence there is, the more effort has to be spent on the build system, and the more platform-specific issues will creep in.

If V8 were Windows-only, we would probably just use Visual Studio project files as build configuration; and in fact, as far as I know that was the case in Chrome's very early days in 2008. But these days we also officially support Linux, MacOS, ChromeOS, and Android, and various folks have a strong interest in building for various other operating systems as well (which is not officially supported but can be made to work).

Dan Pike

unread,
Aug 16, 2018, 6:01:07 AM8/16/18
to v8-...@googlegroups.com

I am very interested in helping you sort out the Windows builds, and I do appreciate that you have to support many operating systems. However, I am worried that I don’t understand what is going on inside those black boxes (“gclient”, “ninja” etc).

 

Many other cross-platform projects seem to be happy to work with using cmake-based build environments along with detailed descriptions of the dependencies. In my (admittedly somewhat limited) experience, trying to maintain custom tools that people don’t understand often leads to more problems than it solves, unless you are able to put in a lot of effort to make them cope with all the ways that people work. For everything else, I prefer to KISS and spend all of that effort on good documentation, instead.

 

So, back to the underlying issue…

 

With your detailed understanding of the internals of the depot tools, can you explain what they are doing that you can’t do with “git –recursive” and “cmake”?

 

Do you also understand why, on my machine, ninja appears to build everything, all the tests pass and d8 works but it:

 

  1. produces two libraries (v8_libplatform.lib and v8_libbase.lib) that Microsoft Visual Studio tells me are corrupt, and
  2. doesn’t produce a v8.dll at all, as far as I can tell

?

 

I’d also love to be able to experiment with different compiler settings, e.g. whether to use static or dynamic runtime. How do I do that with v8gen?

 

Dan

 

Jakob Gruber

unread,
Aug 16, 2018, 6:43:21 AM8/16/18
to v8-...@googlegroups.com
On Thu, Aug 16, 2018 at 12:01 PM, Dan Pike <danny...@gmail.com> wrote:

I am very interested in helping you sort out the Windows builds, and I do appreciate that you have to support many operating systems. However, I am worried that I don’t understand what is going on inside those black boxes (“gclient”, “ninja” etc).

 

Many other cross-platform projects seem to be happy to work with using cmake-based build environments along with detailed descriptions of the dependencies. In my (admittedly somewhat limited) experience, trying to maintain custom tools that people don’t understand often leads to more problems than it solves, unless you are able to put in a lot of effort to make them cope with all the ways that people work. For everything else, I prefer to KISS and spend all of that effort on good documentation, instead.

 

So, back to the underlying issue…

 

With your detailed understanding of the internals of the depot tools, can you explain what they are doing that you can’t do with “git –recursive” and “cmake”?

 

Do you also understand why, on my machine, ninja appears to build everything, all the tests pass and d8 works but it:

 

  1. produces two libraries (v8_libplatform.lib and v8_libbase.lib) that Microsoft Visual Studio tells me are corrupt, and
  2. doesn’t produce a v8.dll at all, as far as I can tell

See https://crbug.com/v8/8017. It sounds like you may be missing 'is_clang = false' for VS-compatible libraries.
 

?

 

I’d also love to be able to experiment with different compiler settings, e.g. whether to use static or dynamic runtime. How do I do that with v8gen?


GN flags are documented, run `gn args out/debug --list`. You'll find the options for static builds there.

 

 

Dan

 

Jakob Kummerow

unread,
Aug 16, 2018, 8:18:00 AM8/16/18
to v8-...@googlegroups.com
On Thu, Aug 16, 2018 at 12:01 PM Dan Pike <danny...@gmail.com> wrote:

I am very interested in helping you sort out the Windows builds


Cool!
 

, and I do appreciate that you have to support many operating systems. However, I am worried that I don’t understand what is going on inside those black boxes (“gclient”, “ninja” etc).


I hope that you won't need to understand their internals. They generally do work on Windows, and how to get them to work should mostly be documented somewhere (e.g. in the Chromium docs I've linked to before), so it mostly comes down to ensuring that the V8-specific documentation is up to date.
There's also "gclient help", and https://ninja-build.org/manual.html
 

Many other cross-platform projects seem to be happy to work with using cmake-based build environments along with detailed descriptions of the dependencies. In my (admittedly somewhat limited) experience, trying to maintain custom tools that people don’t understand often leads to more problems than it solves, unless you are able to put in a lot of effort to make them cope with all the ways that people work. For everything else, I prefer to KISS and spend all of that effort on good documentation, instead.

 

So, back to the underlying issue…

 

With your detailed understanding of the internals of the depot tools, can you explain what they are doing that you can’t do with “git –recursive” and “cmake”?


I don't have a detailed understanding of the internals of depot_tools, I just use them.
I trust the people who chose our tools to have carefully evaluated all options, and to have had good reasons for their decisions. Most technical decisions are tradeoffs where every option has pros and cons.

I do have some high-level idea about what problems our tools are solving. One big concern is speed, because it impacts developer productivity and morale. Chromium (and V8) used to use GYP to generate project files, which was replaced by GN mostly for speed reasons. Back then, someone actually measured cmake's speed for generating .ninja files for Chromium:
GN: 2 seconds (nowadays; back then it wasn't far enough along yet)
GYP: 51 seconds (in late 2013, would probably take longer today since the project has grown)
CMake: 2:24 minutes

Why ninja? Speed. See here and here. For some other benefits, see also here.

Why gclient? Well, we already used it before we switched to git. I believe that migrating to git submodules has been investigated at some point, but I don't know what the status of that is.

 Do you also understand why, on my machine, ninja appears to build everything, all the tests pass and d8 works but it:

 

  1. produces two libraries (v8_libplatform.lib and v8_libbase.lib) that Microsoft Visual Studio tells me are corrupt, and
  2. doesn’t produce a v8.dll at all, as far as I can tell
Do you have "is_component_build = true" in your args.gn? Run "gn args out/<your_directory>" to check/edit. For release builds, static linking is the default, so no .dll will be created.
 

?

 

I’d also love to be able to experiment with different compiler settings, e.g. whether to use static or dynamic runtime. How do I do that with v8gen?

 

Dan

 

--

danny...@gmail.com

unread,
Aug 16, 2018, 8:26:47 AM8/16/18
to v8-dev
Thank you to both Jakobs!

I shall take another look at it this weekend (when the pay-meter stops ticking).

Dan

thapari...@gmail.com

unread,
Aug 16, 2018, 12:18:49 PM8/16/18
to v8-dev

Used following configuration (few of these are repeating, kept it that way, just to not miss anything):

use_custom_libcxx_for_host = false
treat_warnings_as_errors = false
v8_enable_i18n_support = false
v8_enable_slow_dchecks = false
is_component_build = false
use_custom_libcxx = false
v8_static_library = true
v8_target_cpu = "x64"
target_cpu = "x64"
is_debug = false
is_clang = false

and targeted build for V8 and the resultant libraries are healthy and likable by VS2017.

command to target build for V8: ninja -C out.gn\x64.release V8

danny...@gmail.com

unread,
Aug 16, 2018, 12:41:08 PM8/16/18
to v8-dev
That looks good. Just as a quick test, I ran with the following:

gn gen out.gn/ia32.debug --enable_iterator_debugging=false --is_clang=false --is_debug=true --v8_static_library=true --is_win_fastlink=true --msvc_use_absolute_paths --symbol_level=2 --target_cpu=x86 --v8_enable_debugging_features=true --v8_enable_fast_mksnapshot=true --v8_enable_future=true --v8_enable_v8_checks=true

and it appears to have built a bunch of libraries that are, at least, of a size that I would expect. No time to try it out, yet, though :)

Dan

dan Med

unread,
Aug 17, 2018, 9:43:56 AM8/17/18
to v8-...@googlegroups.com
So what do you guys suggest me to do now ? How do I build it from the beginning 

dan Med

unread,
Aug 17, 2018, 12:42:43 PM8/17/18
to v8-...@googlegroups.com
Btw i was looking at the v8 github repository but i couldn't find anything interesting such as low c++ implementation, mem allocators, compilers, javascript rappresentation in c++ .... where's all the good stuff ?

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

dan Med

unread,
Aug 17, 2018, 2:31:07 PM8/17/18
to v8-...@googlegroups.com
is anyone online, seems like i've wasted an entire month

dan Med

unread,
Aug 17, 2018, 5:11:37 PM8/17/18
to v8-...@googlegroups.com
can someone help me build this v8  as i already said "
Btw i was looking at the v8 github repository but i couldn't find anything interesting such as low c++ implementation, mem allocators, compilers, javascript rappresentation in c++ .... where's all the good stuff ? "

dan Med

unread,
Aug 17, 2018, 6:40:52 PM8/17/18
to v8-...@googlegroups.com
Is anyone online atm ?

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

dan Med

unread,
Aug 19, 2018, 4:21:56 AM8/19/18
to v8-...@googlegroups.com
So no one is going to help me ?

Dan Pike

unread,
Aug 19, 2018, 5:53:21 AM8/19/18
to v8-...@googlegroups.com

Spamming the group at the weekend probably isn’t going to help you very much. If you can wait for a short while, I am writing a wizard that will wrap all of the commands that you need to type including sorting out paths and stuff. I hope this will either solve your problem, or help us work out what is wrong with what you are doing.

 

But, it’s Sunday morning and I need to cook lunch.

 

Dan

 

dan Med

unread,
Aug 19, 2018, 5:54:47 AM8/19/18
to v8-...@googlegroups.com
Hahaha yeah I forgot sorry, really thankful ! 
I’d you could include perhaps how to navigate through the v8 repo cause I still didn’t find quite a lot of things O.o


--

Dan Pike

unread,
Aug 19, 2018, 5:55:58 AM8/19/18
to v8-...@googlegroups.com

I’m sorry but I’m new to this, too. Which is another reason why I’m writing my own wrapper I want to mess about with the options and see what they all do.

Dan

dan Med

unread,
Aug 19, 2018, 6:56:41 AM8/19/18
to v8-...@googlegroups.com
Ah ok ! 

On Sun, 19 Aug 2018 at 11:55, Dan Pike <danny...@gmail.com> wrote:

I’m sorry but I’m new to this, too. Which is another reason why I’m writing my own wrapper I want to mess about with the options and see what they all do.

Dan

--

danny...@gmail.com

unread,
Aug 20, 2018, 9:57:32 AM8/20/18
to v8-dev
I have uploaded a .Net 4.5 application that I wrote over the weekend to configure and build V8. It's available here: V8Builder.

In the README are TL;DR-style instructions if you don't want to use the GUI (or can't build it and don't have a friend with a C# compiler).

I gave up trying to write simple instructions, it was much easier to write an application instead.

Hope it helps,

Dan

dan Med

unread,
Aug 20, 2018, 1:03:56 PM8/20/18
to v8-...@googlegroups.com
macro TO_UINT32(arg) = (arg >>> 0); found in the */*/src/macros.py

can't figure out what it does

--
--
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+unsubscribe@googlegroups.com.

dan Med

unread,
Aug 20, 2018, 1:04:39 PM8/20/18
to v8-...@googlegroups.com
Yes i will use it 


2018-08-20 15:57 GMT+02:00 <danny...@gmail.com>:

--
--
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+unsubscribe@googlegroups.com.

dan Med

unread,
Aug 20, 2018, 1:14:15 PM8/20/18
to v8-...@googlegroups.com
How do these function get called 
%GetArrayKeys
cause i can't seem to find them in the /src/array.js
as well as  %_IsSmi in the same file

Leszek Swirski

unread,
Aug 21, 2018, 4:55:43 AM8/21/18
to v8-dev
Hi dan,

Glad to hear things are working for you. The functions you're looking at are intrinsic/runtime functions, and that syntax is the "natives" syntax, enabled for user code with the "--allow-natives-syntax" flag. Some people have used this in the past to e.g. track optimisation behaviour, like this (no longer in-date) documentation from bluebird.

Those functions are found in C++, not in Javascript, as they are runtime calls. They are declared in src/runtime/runtime.h, where you can also find the documentation of the %Foo and %_Foo syntax. The definitions are in the .cc files under src/runtime, prefixed with "Runtime_" -- e.g. %GetArrayKeys is defined in runtime-array.cc (btw, https://cs.chromium.org/ is a great way of browsing the code). Similarly you can find the C++ definition of %IsSmi by searching for Runtime_IsSmi.

%_IsSmi, with the underscore, is an inlined intrinsic (specifically, an intrinsic that *can* be inlined by the compiler). In the interpreter, for example, this is in the supported intrinsics list, so we output an InvokeIntrinsic bytecode rather than a runtime call bytecode, which has an generated assembly handler which, during execution, dispatches on the intrinsic's id and for IsSmi does the Smi check. The optimizing compiler has similar logic.

Hope that helps -- V8 is a complex codebase due to the interplay between C++, javascript, generated assembly, etc., so don't expect to be able to easily find where everything is defined or how everything works without serious digging.

- Leszek

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

For more options, visit https://groups.google.com/d/optout.

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

dan Med

unread,
Aug 21, 2018, 5:12:40 AM8/21/18
to v8-...@googlegroups.com
Yeah thank you ! i'm going to dig it all !

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

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

dan Med

unread,
Aug 21, 2018, 5:10:29 PM8/21/18
to v8-...@googlegroups.com
When chromium OS on a chromebook boots up, which directory is the first to be invoked and then executed

dan Med

unread,
Aug 22, 2018, 3:23:31 AM8/22/18
to v8-...@googlegroups.com
When chromium OS on a chromebook boots up, which directory is the first to be invoked and then executed

dan Med

unread,
Aug 22, 2018, 6:00:14 PM8/22/18
to v8-...@googlegroups.com
The documentation about chromium OS is vage 

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

For more options, visit https://groups.google.com/d/optout.

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

For more options, visit https://groups.google.com/d/optout.

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

te...@chromium.org

unread,
Aug 23, 2018, 10:27:54 AM8/23/18
to v8-dev
I updated the build steps on https://github.com/v8/v8/wiki/Building-from-Source to include instructions for Windows.
This worked for me on a fresh Windows 10 machine. Please let me know if the instructions don't work for you.

- Tobias

dan Med

unread,
Aug 23, 2018, 10:51:50 AM8/23/18
to v8-...@googlegroups.com
Ok 

--
Reply all
Reply to author
Forward
0 new messages