Command fails with error code 255 on Visual Studio 2015 RC image

Joel Brown's Avatar

Joel Brown

12 May, 2015 05:18 PM

I recently started using the Visual Studio 2015 RC image for one of my projects and calls to protoc.exe are now failing with error code 255. No other error information is provided:

https://ci.appveyor.com/project/jbrwn/net-mapnik/build/2.1.0.74/job/nng0da0nkngutu7e#L13

The same command on a Visual Studio 2015 Preview image executes successfully:

https://ci.appveyor.com/project/jbrwn/net-mapnik/build/2.1.0.76/job/goyjjgbq9ahnfngw#L13

I usually run this command as a pre-build action in a vcxproj and i have no trouble running it locally. Here is the last time the build ran successfully on appveyor:

https://ci.appveyor.com/project/jbrwn/net-mapnik/build/2.0.0.60/job/7b5qif3vm6c8inbd

I recently upgraded the project to build against Visual Studio 2015 RC and that is when i started having issues on appveyor. Here is the build where is starting having issues:

https://ci.appveyor.com/project/jbrwn/net-mapnik/build/2.1.0.63/job/j1j42s8eq51df2y9

Any help would be much appreciated.

  1. Support Staff 1 Posted by Feodor Fitsner on 12 May, 2015 06:49 PM

    Feodor Fitsner's Avatar

    Well, this time it was unattended VS 2015 RC installation. Preview was installed manually. Maybe IDE should be opened after installation to allow it to "init" and "warm up". I'm going to install Azure SDK 2.6 on that image today - will start IDE after that. Let's see if that helps.

  2. 2 Posted by Joel Brown on 12 May, 2015 07:33 PM

    Joel Brown's Avatar

    Thanks Feodor. It doesn't appear to me that this is an IDE issue but at this point i will try anything. The command that is failing is a powershell call in the install phase:

    & ".\lib\$env:Platform\mapnik-sdk\bin\protoc.exe" -I .\lib\mapnik-vector-tile\proto --cpp_out=.\lib\mapnik-vector-tile\src .\lib\mapnik-vector-tile\proto\vector_tile.proto

    This call fails on the VS2015 RC image but not on the preview image.

    Thanks.

  3. 3 Posted by Joel Brown on 12 May, 2015 07:45 PM

    Joel Brown's Avatar

    The command that is failing is a powershell call in the install phase

    The command was originally called as a pre-build action but i pulled it out and ran it from the command line in the install phase for testing. just fyi...

  4. Support Staff 4 Posted by Feodor Fitsner on 12 May, 2015 07:55 PM

    Feodor Fitsner's Avatar

    So, what does that protoc.exe tool do? There is Visual Studio Community 2015 RC installed. Though it's declared to have complete development platform support maybe that tool depends on something missing there.

    I'm not an expert in C++ - really hard to figure our what might be wrong.

  5. 5 Posted by Joel Brown on 12 May, 2015 08:11 PM

    Joel Brown's Avatar

    So, what does that protoc.exe tool do?

    It is a protocol buffers compiler from google. It is not part of the Visual Studio platform. In the install phase i download the tool and then execute it against some source code. The command looks like it executes successfully (no errors reported) yet a exit code 255 is reported and the appveyor build stops.

  6. Support Staff 6 Posted by Feodor Fitsner on 12 May, 2015 08:16 PM

    Feodor Fitsner's Avatar

    Try running it as cmd:

    - lib\%platform%\mapnik-sdk\bin\protoc.exe -I .\lib\mapnik-vector-tile\proto --cpp_out=.\lib\mapnik-vector-tile\src  .\lib\mapnik-vector-tile\proto\vector_tile.proto
    
  7. 7 Posted by Joel Brown on 12 May, 2015 08:28 PM

    Joel Brown's Avatar

    Tried that here with the same result:
    https://ci.appveyor.com/project/jbrwn/net-mapnik/build/2.1.0.70/job...

    I added this line to the install portion of my appveyor.yml file:

    - cmd: .\lib\%Platform%\mapnik-sdk\bin\protoc.exe -I .\lib\mapnik-vector-tile\proto --cpp_out=.\lib\mapnik-vector-tile\src  .\lib\mapnik-vector-tile\proto\vector_tile.proto
    
  8. Support Staff 8 Posted by Feodor Fitsner on 12 May, 2015 08:50 PM

    Feodor Fitsner's Avatar

    You mentioned it was working on "VS 2015 Preview" image which essentially was the first VS 2015 release. Have you tried running it on CTP 5 and CTP 6?

  9. 9 Posted by Joel Brown on 12 May, 2015 08:57 PM

    Joel Brown's Avatar

    I have not. I will give it a shot right now and report back. Thanks.

  10. 10 Posted by Joel Brown on 13 May, 2015 12:30 AM

    Joel Brown's Avatar

    I pulled everything out of my config except for the protoc.exe call and ran the build against several images:

    Visual Studio 2015 CTP succeeds:
    https://ci.appveyor.com/project/jbrwn/net-mapnik/build/2.1.0.79/job/9bhayepmu8510rkn

    Visual Studio 2015 CTP 6 fails:
    https://ci.appveyor.com/project/jbrwn/net-mapnik/build/2.1.0.80/job/guv6wfjj87rs758e

    Visual Studio 2015 RC fails:
    https://ci.appveyor.com/project/jbrwn/net-mapnik/build/2.1.0.81/job/mkg9swhd53pw1s0x

  11. Support Staff 11 Posted by Feodor Fitsner on 13 May, 2015 12:44 AM

    Feodor Fitsner's Avatar

    So, it started failing earlier with CTP 6, not RC. What dependencies does that tool have? What 255 exit code means?

  12. Support Staff 12 Posted by Feodor Fitsner on 13 May, 2015 01:23 AM

    Feodor Fitsner's Avatar

    Maybe looking into that via RDP would help: https://github.com/appveyor/ci/blob/master/scripts/enable-rdp.ps1

    RDP is possible on Azure instances too though that script is for Hyper-V VMs and IP determining maybe inaccurate. Instead of querying NIC settings you can replace it with a call to http://canhazip.com/

    $wc = (New-Object Net.WebClient)
    $wc.Headers.Add("User-Agent", "AppVeyor")
    $vmip = $wc.DownloadString('http://canhazip.com/')
    
  13. 13 Posted by Joel Brown on 13 May, 2015 07:06 AM

    Joel Brown's Avatar

    When i ran protoc.exe inside the VM i got the attached error message. Looks like the executable cannot find APPCRT140.dll. I think this is part of the 2015 c++ runtime which appears to be installed. I'm not sure what is going on at this point.

  14. 14 Posted by Joel Brown on 13 May, 2015 03:15 PM

    Joel Brown's Avatar

    FYI... opened up a issue with the mapnik team to get more details on the protoc.exe executable they are bundling with their SDK.

    https://github.com/mapbox/windows-builds/issues/39

  15. Support Staff 15 Posted by Feodor Fitsner on 13 May, 2015 03:43 PM

    Feodor Fitsner's Avatar

    Yeah, that makes sense. Thanks for the update.

    - Feodor

  16. 16 Posted by Wilhelm Berg on 14 May, 2015 07:09 AM

    Wilhelm Berg's Avatar

    Hi Joel! Hi Feodor!

    I've verified, that it works on AppVeyor RC Image.
    Seems that the wrong download (built with VS2014 CTP4) was used.

    Cheers,
    Willy

  17. Support Staff 17 Posted by Feodor Fitsner on 14 May, 2015 04:21 PM

    Feodor Fitsner's Avatar

    Great, thank you for looking into that!

  18. 18 Posted by Vinipsmaker on 13 Jun, 2015 08:48 AM

    Vinipsmaker's Avatar

    Can you guys show the appveyor.yml that generated the screenshot that allowed you guys to find the error?

    I'm also getting an error code 255[1] and any help would be much appreciated (already lost more days than I should trying to set up AppVeyor).

    [1] http://stackoverflow.com/questions/30815834/boost-system-based-program-closes-up-with-code-255-before-executing-any-of-my-co

  19. 19 Posted by Wilhelm Berg on 13 Jun, 2015 09:16 AM

    Wilhelm Berg's Avatar
  20. 20 Posted by Vinipsmaker on 13 Jun, 2015 09:27 AM

    Vinipsmaker's Avatar
  21. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:56 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac