Cant build ClearScript

Feb 5, 2013 at 8:54 PM
Edited Feb 5, 2013 at 8:54 PM
Hi.

Im having trouble building ClearScript with V8. Im using VS 2012 and Windows 7 x64.
Its the V8 projects that crashes the build and I get two errors:

Error 1 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 5 ClearScriptV8-32
Error 2 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 5 ClearScriptV8-64

I used the V8Update.cmd and both times I got "Succeeded!" as response.
Coordinator
Feb 5, 2013 at 9:16 PM
Hi Klator,

Did you let V8Update.cmd run to completion before building the solution?

If so, please provide a directory listing of [ClearScriptRoot]\ClearScript\V8\V8\lib\

Thanks!
Coordinator
Feb 5, 2013 at 9:32 PM
Or, alternately, can you tell us whether you see V8 DLLs in that directory? There should be v8-ia32.dll and v8-x64.dll, along with the corresponding PDBs.
Feb 5, 2013 at 9:47 PM
Hi, thanks for getting back to me so quickly.

Yes, I did let it run to completion before even opening the project in VS2012.

Yeah, they are there. The directory ClearScript\V8\V8\lib\ contains:

v8-ia32.dll
v8-ia32.pdb
v8-ia32.lib
v8-x64.dll
v8-x64.pdb
v8-x64.lib

One other thing (that might not be important), when I go to the source of the error (in Microsoft.CppCommon.targets) i get ALOT of warnings (100+) in that file.
Coordinator
Feb 5, 2013 at 10:08 PM
Hmm. The MSB6006 errors in your original message are exactly what you get if you try to build ClearScript without first running V8Update. Those errors usually indicate that the V8 binaries cannot be found in that directory.

Is it possible that the directory in which you ran V8Update.cmd and the directory from which you loaded ClearScript.sln are not the same?
Feb 5, 2013 at 10:16 PM
No, they are the same directory.
Is there anyway I can get more debug info like a verbose logging mode? (Sorry, im gonna google that myself.)

One other thing, I just realised that the file: SVN indicates that ClearScript\V8\V8\build\v8\tools\gyp\v8.gyp differs from the last version.

If I have dll:s mentioned above and the clearscript dll (Since I can build clearscript, but cant run it), cant I manually use them?
Im eager to test clearscript in a project.
Coordinator
Feb 5, 2013 at 10:36 PM
Hi Klator,

The build step that's failing for you simply copies the V8 binaries (DLLs and PDBs, not LIBs) to the target directory - bin\Debug or bin\Release relative to the ClearScript root directory. You should be able to do this manually, but we'd love to understand why it's failing for you.

Could you please do the following: Retry the build in Visual Studio, and when it fails, find the error messages in the Output window rather than the Error List window. Sometimes you'll see more information there, such as "The system cannot find the path specified.".

To answer your other question, V8Update.cmd applies a small patch to ClearScript\V8\V8\build\v8\tools\gyp\v8.gyp. This causes the generated DLLs to include the platform in their names; e.g., v8-x64.dll. This way the 32-bit and 64-bit V8 DLLs can be in the same directory. ClearScript itself is platform-neutral (AnyCPU), and selects the appropriate V8 DLL at runtime.

Good luck!
Feb 5, 2013 at 10:41 PM
Sure, here goes:
2>------ Rebuild All started: Project: ClearScriptV8-32, Configuration: Debug Win32 ------
3>------ Rebuild All started: Project: ClearScriptV8-64, Configuration: Debug x64 ------
2>  Copying v8-ia32.dll to C:\Users\*****\Documents\Visual Studio 2012\Projects\ClearScript\bin\Debug\
2>  The system cannot find the file specified.
2>  Copying v8-ia32.pdb to C:\Users\*****\Documents\Visual Studio 2012\Projects\ClearScript\bin\Debug\
2>  The system cannot find the file specified.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 1.
3>  Copying v8-x64.dll to C:\Users\*****\Documents\Visual Studio 2012\Projects\ClearScript\bin\Debug\
3>  The system cannot find the file specified.
3>  Copying v8-x64.pdb to C:\Users\*****\Documents\Visual Studio 2012\Projects\ClearScript\bin\Debug\
3>  The system cannot find the file specified.
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 1.
4>------ Rebuild All started: Project: ClearScriptTest, Configuration: Debug Any CPU ------
5>------ Rebuild All started: Project: ClearScriptConsole, Configuration: Debug Any CPU ------
6>------ Rebuild All started: Project: ClearScriptBenchmarks, Configuration: Debug Any CPU ------
5>  ClearScriptConsole -> C:\Users\*****\Documents\Visual Studio 2012\Projects\ClearScript\bin\Debug\ClearScriptConsole.exe
6>  ClearScriptBenchmarks -> C:\Users\*****\Documents\Visual Studio 2012\Projects\ClearScript\bin\Debug\ClearScriptBenchmarks.exe
4>  ClearScriptTest -> C:\Users\*****\Documents\Visual Studio 2012\Projects\ClearScript\bin\Debug\ClearScriptTest.dll
========== Rebuild All: 4 succeeded, 2 failed, 0 skipped ==========
(I replaced username with *****)
Coordinator
Feb 5, 2013 at 11:09 PM
Thanks Klator. Your issue may be due to a somewhat embarrassing bug in the ClearScript project files.

Could you please try the following: Close Visual Studio, move your entire ClearScript directory to a path that doesn't have any spaces in it, and retry. We believe that the spaces in the subdirectory name "Visual Studio 2012" may be causing the problem.

Please let us know if this fixes the problem for you, and we'll fix the project files ASAP! Thanks for your help!
Feb 6, 2013 at 8:21 AM
Awesome - good catch, people.
It works now.
Thanks for the quick and excellent support.
Coordinator
Feb 6, 2013 at 1:09 PM
Edited Feb 6, 2013 at 1:09 PM
Thanks for reporting and helping us debug this issue!
Feb 6, 2013 at 3:42 PM
Sure, no problem.
Keep up the good work.