Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upServo does not compile with Visual Studio 2017 #16305
Comments
|
¡Hola Lars! Ended up here from https://twitter.com/alex_mayorga/status/850154408109277185 Glad to see I was not just missing something obvious along the way =) Perhaps link this issue to https://hacks.mozilla.org/2017/04/hacking-contributing-to-servo-on-windows/ to save others some head scratching? ¡Gracias! |
|
cc @Coder206 |
|
@alex-mayorga Thanks for the comment and tweet! And I'm sorry the experience was totally lame. I'm trying to figure out if we should: Maybe we should do both? cc @Jayflux |
|
@larsbergstrom This afternoon, I have been trying to get VS 2015 and I can't seem to download a new binary from MS. If we can't download VS2015 any more, I don't see a valid long term reason to keep on working with it. https://www.microsoft.com/en-us/download/details.aspx?id=48146 |
|
Yeah, it seems like older versions are only offered for download if you have a (free) Microsoft Dev Essentials subscription: https://www.visualstudio.com/vs/older-downloads/ |
|
ahh thats annoying! Anything i can do to help? |
|
MSVC 2017 doesn't have a single install location anymore that can be used to determine where the compiler binaries are. So, one option is to require the user launch On the plus side, I already submitted issues and/or PRs which fixed the C++ compile error and I can verify that it works if you call |
|
According to Microsoft, here are some other ways this could be addressed. |
|
Was this fixed with #16307? |
|
Indeed! Great catch, @atouchet :-) |
From a comment by Ahmed Charles on the recent Hacks article:
It doesn’t seem like the instructions here can work because servo doesn’t currently support MSVC 2017. I assume that if this set of instructions was tested, it worked because MSVC 2015 was installed already. The mach.bat looks for %VS140COMNTOOLS%, which is MSVC 2015.
Note, this can be worked around by executing the appropriate vcvarsall.bat. (I wasn’t able to get it to work under powershell and it just seems to complicate things compared to using cmd consistently.)
However, there’s a second error, which is that the MSVC 2017 vcvarsall.bat sets %PLATFORM% to be ‘x64’ rather than ‘X64’, which is what is expected in util.host_triple() and therefore, the appropriate rust download can’t be found.
The third problem is that if a recent version of cmake isn’t in the path, it will download 3.6.1, which doesn’t support MSVC 2017.
The fourth problem, which I haven’t figured out how to fix is that “\servo\target\debug\build\mozjs_sys-b75999929c5a0ce6\out\dist\include\js\TraceKind.h” fails to build with MSVC 2017 due to a syntax error: (176): error C2760: syntax error: expected ‘)’ not ‘…’
It looks like valid C++ to me, but I can’t figure out what’s going on.