Search code examples
windowsgoogle-nativeclientppapi

PNaCl local server build error on Windows [ppapi_ALL_TARGET] Error 2


I'm learning to develop a web-application with the google-nativeclient on a windows platform (win7). according to the instructions i must run make serve from the src directory of the pepper_(VERSION) I installed with the SDK, which in my case is pepper_31. The build runs until it gets to a point where it fails and show the following message:

**

C:/bin/nacl_sdk/nacl_sdk/pepper_31/tools/host_vc.mk:25: *** Unable to find cl.exe in PATH while building Windows host build.  Stop.
make[1]: Leaving directory 'C:/bin/nacl_sdk/nacl_sdk/pepper_31/src/ppapi'
make[1]: Leaving directory 'C:/bin/nacl_sdk/nacl_sdk/pepper_31/src/ppapi'
Makefile:56: recipe for target 'ppapi_ALL_TARGET' failed
make: *** [ppapi_ALL_TARGET] Error 2

**

I figured its missing the cl.exe program but i don't even know what that is and how to get it. Can anyone help with this? Thank you.


Solution

  • There should have been a message before error:

    To skip the host build use:
    "make NO_HOST_BUILDS=1"
    

    So the quick answer is: no, you don't need cl.exe (it is the Visual Studio C compiler) as long as you run make NO_HOST_BUILDS=1 <target>.

    You can also install Visual C++ Express, and run make from a Visual Studio Command Prompt; this will put cl.exe in your path, so this error will go away.

    Either way, this is not a great experience -- I've filed this bug to track this issue.