Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Servo does not build with Visual C++ Build Tools #13325

Closed
jasonwilliams opened this issue Sep 19, 2016 · 5 comments
Closed

Servo does not build with Visual C++ Build Tools #13325

jasonwilliams opened this issue Sep 19, 2016 · 5 comments

Comments

@jasonwilliams
Copy link
Contributor

@jasonwilliams jasonwilliams commented Sep 19, 2016

Description
Microsoft have released Visual C++ as stand alone, so you don't need to install the whole of Visual Studio if you need just the C Compiler.
It would be good if we can have servo build on this for the MVSC builds, however they seem to fail.
It does build fine after installing Visual Studio (with the Visual C++ option), but not when you swap it out for visual-cpp-build-tools

What is the failure?
On my host machine i get this
https://pastebin.mozilla.org/8909561

inside a VM I get this:
#13272

Steps to reproduce
Install Servo following the instructions from:
#13206 (comment)

But instead of installing Visual Studio, install http://landinghub.visualstudio.com/visual-cpp-build-tools

Expected Result
Servo should build normal

Actual Result
Servo fails in one of the 2 ways mentioned above

@larsbergstrom @vvuk @AndrewPardoe

@vvuk
Copy link
Contributor

@vvuk vvuk commented Sep 19, 2016

The host machine failure is weird -- it's basically because the directory path is being printed with backslashes, which are then not quoted. But that shouldn't be happening.. that's coming from a "pwd -W", which should print as c:/foo/bar. In this case though it's showing up as c:\foo\bar.

@jasonwilliams
Copy link
Contributor Author

@jasonwilliams jasonwilliams commented Sep 19, 2016

@vvuk do you know how http://landinghub.visualstudio.com/visual-cpp-build-tools would have any affect on that? I've narrowed it down to that but not sure what's in it that would affect the backslashes problem

@vvuk
Copy link
Contributor

@vvuk vvuk commented Sep 19, 2016

I take that back -- the issue isn't from pwd. In the mozjs makefile.cargo, there's a few places where it attempts to move OUT_DIR into a /-delimited path. One of these either isn't being hit, or isn't running properly.

Note that you can just clone mozjs-sys and try a cargo build in there from a VS command prompt, after making sure the mozilla-build tools are in the PATH. You can poke at the OUT_DIR bits and see what's being generated incorrectly.

@AndrewPardoe
Copy link

@AndrewPardoe AndrewPardoe commented Sep 20, 2016

Let me find someone to investigate. This week is kind of busy at CppCon so my search may have noticeable latency.

@jasonwilliams
Copy link
Contributor Author

@jasonwilliams jasonwilliams commented Oct 25, 2016

So it turns out that you can’t until Preview 5 of VS “15” gets released. So step one is wait a couple weeks J Step two is to just install the build tools in the VS “15” installer.

One thing you can do from your side is to check which dependent dll is missing.
You can use dependency walker tool to figure it out.

http://www.dependencywalker.com/

bors-servo added a commit to servo/mozjs that referenced this issue Jan 17, 2017
Change makefile.cargo to work with Build Tools

The Visual C++ Build Tools package (which is freely provided by Microsoft) does not set `VSINSTALLDIR`. On the other hand, `VCINSTALLDIR` should as long as you have Visual C++ in any form.

https://social.msdn.microsoft.com/Forums/vstudio/en-US/198f6382-c5d2-4651-9135-0fde236793e7/environment-variables-in-visual-studio?forum=vcgeneral

Everything else is building, so close servo/servo#13325

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/111)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.