I can't get gyp to work.

72 views
Skip to first unread message

Flying Jester

unread,
Aug 3, 2012, 11:39:50 PM8/3/12
to v8-u...@googlegroups.com
I've been trying to switch from using scons to gyp to build V8, but I still have yet to build V8 using gyp. Every time I try, MSVC (same in 2008 and 2010) says that 'certain properties of the solution could not be read', or something a lot like that. V8.base and V8.preparser seem to build with no errors, and I think a couple other projects, but most fail due to errors. It is not resulting in a successful build. 

I would like to add that scons is still working for me at this time, so I'm pretty sure it's not my compiler setup.

I've attached the build output, if that helps.

Output-Build.txt

Jakob Kummerow

unread,
Aug 4, 2012, 7:26:03 AM8/4/12
to v8-u...@googlegroups.com
According to the build output, the js2c step failed ("1>The system cannot find the path specified."). Have you checked out python_26 and cygwin as https://code.google.com/p/v8/wiki/BuildingWithGYP#Prerequisites instructs you to?

Flying Jester

unread,
Aug 4, 2012, 8:06:27 PM8/4/12
to v8-u...@googlegroups.com


 Yes, I have both Cygwin and Python 2.6. Both are the google supplied versions. I'm not really sure how I could have made scons work without at least Python 2.6. 
I am also not really sure how having those can change what Visual C++ does.
 

Jakob Kummerow

unread,
Aug 5, 2012, 7:20:37 AM8/5/12
to v8-u...@googlegroups.com
On Sun, Aug 5, 2012 at 2:06 AM, Flying Jester <foolki...@gmail.com> wrote:


 Yes, I have both Cygwin and Python 2.6. Both are the google supplied versions.

And is cygwin checked out to precisely the path given in the instructions?
 
I'm not really sure how I could have made scons work without at least Python 2.6. 
I am also not really sure how having those can change what Visual C++ does.

GYP is kind of a meta-build system, it generates project files for a number of other build systems (e.g. VS project files, Makefiles, Xcode project files, Ninja files, it even has a SCons generator). GYP allows definition of pretty arbitrary build steps, not just compilation. One such example that we're using in V8 in the js2c step is "run this Python script here over this set of .js files, that'll generate one or more .cc files which we'll need for the subsequent C++ compile step". GYP translates this to MSVS project definitions in such a way that to execute the step, Python and Cygwin must be found (in the default locations; for Python having it in %PATH% should work too). Every time I've seen your error message before, it was due to one of the two not being where it should be.

Maybe someone else on this list has a suggestion what else might be going on. When I start on a clean system and follow the instructions in the wiki, everything works. (And not just for me: it also works on our buildbots at http://build.chromium.org/p/client.v8/console.)

Michael Schwartz

unread,
Aug 5, 2012, 8:20:43 AM8/5/12
to v8-u...@googlegroups.com
Regarding js2c.py…

I looked at using NASM to include JS files within the SilkJS binary.  It's way more optimal than generating cpp or cc files with arrays of the character data from the JS files.  Those cc files have to be run through the compiler, which isn't particularly fast.

The downside is NASM on OSX Mountain Lion (apple's latest and greatest) is still v0.98, which doesn't support -f macho64, so it's useless.

global _foo_js
_foo_js dw _ foo_js_end-$
incbin 'foo.js'
_foo_js_end


struct JS_FILE {
unsigned short size;
char data[1];
};

extern "c" { extern JS_FILE *foo_js; }


Flying Jester

unread,
Aug 5, 2012, 5:51:05 PM8/5/12
to v8-u...@googlegroups.com
Probably Cygwin, I have it installed to C:\Cygwin, which I know is the normal place for it on its own, but I don't know if that's right for V8. I'll go through the building instructions again, being sure Cygwin goes into the right place.

Flying Jester

unread,
Aug 6, 2012, 9:27:58 PM8/6/12
to v8-u...@googlegroups.com
Hurrah, I have successfully built V8 using Gyp, and successfully built my program against the generated files!

It was indeed cygwin not being in the third party folder. That shows me for thinking I know better than the developers.

Thank you.
Reply all
Reply to author
Forward
0 new messages