Closed Bug 1123821 Opened 11 years ago Closed 2 years ago

Teach mach bootstrap to install Visual C++

Categories

(Firefox Build System :: Bootstrap Configuration, enhancement)

x86
Windows
enhancement

Tracking

(firefox114 fixed)

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Basically all you need to do is to run <https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/master/win_toolchain/toolchain2013.py>. I'm cleaning up that script to make it work for Visual C++ 2013 Update 4. The final result will end up in <https://github.com/ehsan/msvc2013onwine> once I'm done.
This seems incredibly complex compared to what https://chocolatey.org/packages/VisualStudioCommunity2013 does, which boils down to running the vs installer executable with a few options and an adminfile.
Well they do very different things. The Chromium way installs a compiler that can be used for building, and doesn't attempt to do anything else. Which means it won't mess with anything else installed on the system. That package I expect installs a full blown VS.
I've been playing with the VS2017 installer in bug 1123821, and I think I've got a handle on it, so I may try to fix this next. For VS2017 there are two options: VS Community, and the VS Build Tools, which is just the compilers + SDKs. We can give people a choice of whether they want to install a full Visual Studio to get the IDE etc, or just the compilers if they just want to build Firefox.
Product: Core → Firefox Build System
bug 1270667 comment 9 has the info I meant to link in comment 3.
Severity: normal → S3
Assignee: nobody → mh+mozilla
Component: Mach Core → Bootstrap Configuration
OS: macOS → Windows

More specifically, to pick the changes from
https://github.com/mstorsjo/msvc-wine/pull/59, which add support for Windows.

This makes them switch to private_local_toolchain.sh, which wraps a call
to mach python --virtualenv build taskcluster/scripts/misc/$script

Depends on: 1827794
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/92d87124fc40 Use the build virtualenv for private local toolchain commands. r=firefox-build-system-reviewers,andi https://hg.mozilla.org/integration/autoland/rev/5d49b7113fd8 Update vsdownload to the latest master. r=firefox-build-system-reviewers,andi https://hg.mozilla.org/integration/autoland/rev/31cca1b60b6b Adjust the Visual Studio toolchain to be bootstrappable. r=firefox-build-system-reviewers,andi https://hg.mozilla.org/integration/autoland/rev/e7052dcc570f Use the boostrappable Visual Studio definitions for the build. r=firefox-build-system-reviewers,andi https://hg.mozilla.org/integration/autoland/rev/117c9c570380 apply code formatting via Lando

Hi glandium, while testing this, I'm first getting SSL: CERTIFICATE_VERIFY_FAILED errors... if I bypass ssl checks, then it fails at:

Extracting WinRT Intellisense UAP - Other Languages-x86_en-us.msi
Traceback (most recent call last):
  File "D:\src\taskcluster\scripts\misc\get_vs.py", line 32, in <module>
    extractPackages(selected, dl_cache, unpacked)
  File "d:\src\third_party\python\vsdownload\vsdownload.py", line 536, in extractPackages
    unpackWin10SDK(dir, p["payloads"], dest)
  File "d:\src\third_party\python\vsdownload\vsdownload.py", line 521, in unpackWin10SDK
    subprocess.check_call(cmd, stdout=log)
  File "D:\mozilla-build\python3\lib\subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['msiexec', '/a', 'get_vsg72s4n0_\\cache\\Win10SDK_10.0.19041-10.0.19041.1\\WinRT Intellisense UAP - Other Languages-x86_en-us.msi', '/qn', 'TARGETDIR=C:\\Users\\marco\\.mozbuild\\get_vsg72s4n0_\\unpack']' returned non-zero exit status 1603.
Depends on: 1828771

(In reply to Marco Bonardo [:mak] from comment #10)

Hi glandium, while testing this, I'm first getting SSL: CERTIFICATE_VERIFY_FAILED errors...

I'm not getting these, but

if I bypass ssl checks, then it fails at:
...

subprocess.CalledProcessError: Command '['msiexec', '/a', 'get_vsg72s4n0_\\cache\\Win10SDK_10.0.19041-10.0.19041.1\\WinRT Intellisense UAP - Other Languages-x86_en-us.msi', '/qn', 'TARGETDIR=C:\\Users\\marco\\.mozbuild\\get_vsg72s4n0_\\unpack']' returned non-zero exit status 1603.

I'm repeatedly seeing this failure too.

Depends on: 1828840
Depends on: 1828842

I filed Bug 1828840 on the SSL error and Bug 1828842 on the Extracting error.

Regressions: 1828850
Blocks: 1829011
Blocks: 1830639
Regressions: 1832693
Depends on: 1836308
Duplicate of this bug: 1644225
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: