Closed Bug 1212753 Opened 9 years ago Closed 9 years ago

Visual Studio 2015 vcvars bat file location is different - "Unable to call a suitable vcvars script" errors

Categories

(Firefox Build System :: MozillaBuild, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: hsteen, Unassigned)

Details

I've upgraded to VS2015 to see if I could solve a build problem. Unfortunately this update just gave me a couple of *other* build problems..

The "LIB" variable the start-shell.bat file wants defined is now set in this script:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat

making start-shell.bat call this .bat file gets the moz build command line working. Building fails with a "C compiler cannot create executables" error, but maybe I just didn't install the right VS2015 components?
Maybe I haven't installed the right parts of VS2015.. I'll reopen if this is still an issue after modifying the installation.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
To anybody else who might have this problem: it's caused by choices made during installation, and the installer options were somewhat confusing. I don't remember the exact details, but I think the "Default" installation no longer gives you the required scripts - the "Default vs custom" section on https://msdn.microsoft.com/en-us/library/e2h7fzkw%28v=vs.140%29.aspx seems to confirm that you need to choose "Custom" during install and enable Visual C++ tools specifically.
You're right, Hallvord. I went back to my VS2015 installation .exe download, clicked "Modify [the existing installation]" and picked "Common Tools for Visual C++ 2015" under "Programming Languages" > "Visual C++".

I'll try to find time to modify the MDN page: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites
I apologize if this is the incorrect place to do this but it seems related. Could some tell me if it's necessary for visual studio to be installed in the C: drive to contribute. I'm a (hopefully soon-to-be) new contributor and I installed VS on a larger drive (D:). I ensured I have C++ tools installed so that shouldn't be the issue but I am getting this error when running the script.

On a separate note I did get VS 2017 as that's where the link in https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites took me rather than 2015.

Thanks.
It shouldn't matter where Visual Studio is installed. Just run start-shell.bat and the build system should detect the best available and supported Visual Studio install. Also, support for detecting VS2017 (bug 1318143) hasn't landed yet. You'll want to install VS2015 or configure will likely fail.
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.