Windows build prerequisites

  • Revision slug: Developer_Guide/Build_Instructions/Windows_Prerequisites
  • Revision title: Windows build prerequisites
  • Revision id: 32510
  • Created:
  • Creator: glandium
  • Is current revision? No
  • Comment 11 words removed

Revision Content

Note: Do not make substantive changes to this document without consulting Benjamin Smedberg <benjamin@smedbergs.us> or one of the build-config peers.

{{ :en/Build_Documentation/TOC() }}

Introduction

The Mozilla build process requires many tools that are not installed on most Windows systems. In addition to Visual Studio, you must install MozillaBuild, which is a bundle of software including just the right versions of bash, GNU make, autoconf, Mercurial, and much more.

This document is a guide to the MozillaBuild environment, which works with the following versions of the Mozilla codebase available as Mercurial code repositories:

  • mozilla-central/mozilla-aurora/mozilla-beta/mozilla-release (Firefox 4 and later)
  • mozilla-1.9.2 (1.9.2/Firefox 3.6)
  • tracemonkey
  • comm-central/comm-aurora/comm-beta/comm-release (Thunderbird 5/SeaMonkey 2.1 and later)
  • comm-1.9.2 (Thunderbird 3.1)

It works with the following compilers ("Official" means this is what we use for the builds we release as the Firefox product):

  VC8 (Visual Studio 2005) VC9 (Visual Studio 2008) VC10 (Visual Studio 2010)
mozilla-1.9.2/comm-1.9.2
Gecko 1.9.2
Firefox 3.6
Yes (Official) Yes No
mozilla-central/tracemonkey/comm-central
Gecko 2 & later
Firefox 4 & later
Yes1 (Official) Yes Yes

For building older versions of the codebase, see the Windows build prerequisites (1.9.0/1.9.1 branches) and the Windows build prerequisites using cygwin. If you are building very old versions of the Mozilla source code, from the 1.0 branch and earlier, follow the nmake build instructions.
1VC8 SP1 (service pack 1) is now required.

Hardware requirements

Mozilla takes time to build. You need a development-class system:

  • A fast processor, ideally with several cores.
  • At least 2 GB of RAM, 4 GB or higher recommended.
  • 1.5 GB NTFS or 3 GB FAT disk space, or more
  • Windows Vista or later recommended (the build should work on Windows XP though).

Software requirements

The following software needs to be installed for a standard Windows build:

  • Microsoft Visual C++ tools
  • Microsoft Windows SDK(s)
  • MozillaBuild
  • Microsoft DirectX SDK (optional)

Mozilla may not build if some tools are installed at a path that contains spaces or other breaking characters such as pluses, quotation marks, or meta characters. The Visual C++ tools may be installed in a directory which contains spaces (the default install location is preferred).

Microsoft Visual C++ (MSVC)

Depending on what you're building, you will need to use one of several available versions of Microsoft Visual C++ (MSVC) and/or Microsoft Visual Studio. See the chart at the top of this page to ensure that the version you've selected is compatible with the branch you want to build.

If you want to enable jemalloc, you must be using Visual Studio 2005 SP1, Visual Studio 2008 SP1, Visual Studio 2010 or Visual Studio 2010 SP1.  Other versions of Visual Studio will not work.
  • Visual C++ 10 is available from Microsoft as part of the free Visual C++ 2010 Express Edition.
  • Visual C++ 9 is available from Microsoft as part of the free Visual C++ 2008 Express Edition with SP1 (make sure you get this and not the one without SP1!). You do not need to install the Silverlight runtime or the SQL Server 2008 Express Edition when offered. Alternatively you can install the command-line compiler as part of the Windows 7 SDK, but you are then expected to use the included WinDbg debugger.
  • The Visual C++ 8 command-line compiler is included with the Vista SDK, but you are then expected to use the included WinDbg debugger.

Microsoft Windows SDK

See Windows SDK versions.

Microsoft DirectX SDK

The DirectX SDK is required for building the ANGLE GLES-on-D3D9 renderer, which is used on Windows for WebGL rendering.  This part of ANGLE is an optional component, and is built if the DirectX SDK is available.  Official Firefox builds include ANGLE.  As part of the DirectX SDK install, you must install the End-User Redistributable Packages; don't uncheck it in the installer.

Install at least the June 2010 DirectX SDK. The latest DirectX SDK can be found from the DirectX Developer Center.

MSDN claims that MSVC 2005 is not compatible with the June 2010 SDK, but as far as we're concerned it works for release builds. However you cannot use the compiler provided with the Vista SDK to compile debug builds at all, and you need a hotfix to be able to compile debug builds with the full MSVC 2005.

MozillaBuild / Pymake

The MozillaBuild package contains the other software prerequisites necessary for building Mozilla. This includes the MSYS build environment, Mercurial, autoconf-2.13, CVS, Python, YASM, NSIS, and UPX, as well as optional but useful tools such as wget and emacs. 

Download the current MozillaBuild package.

By default, the package installs to c:\mozilla-build. It is recommended to use the default path. Don't use a path that contains spaces. The installer does not modify the Windows registry. Note that some binaries may require Visual C++ Redistributable package to run.

Expectation setting: Note that the "UNIX-like" environment provided by MozillaBuild is only really useful for building and committing to the Mozilla source. Most command line tools you would expect in a modern Linux distribution are not present, and those tools that are provided can be as much as a decade or so old (especially those provided by MSYS). It's the old tools in particular that can cause problems, since they often don't behave as expected, are buggy, or don't support command line arguments that have been taken for granted for years. For example, copying a source tree using cp -rf src1 src2 does not work correctly because of an old version of cp (it gives "cp: will not create hard link" errors for some files). In short, MozillaBuild supports essential developer interactions with the Mozilla code, but beyond that don't be surprised if it trips you up in all sorts of exciting and unexpected ways.

The MozillaBuild package includes the "make" program that originated on the UNIX and Linux platforms. This version of make does not make use of Windows' multi-core architecture. pymake is a Python implementation of Make that uses Window's multi-core architecture and thus significantly speeds up build time. See Mike Conley's blog post for more information about installing and using pymake.

Opening a Build Command Prompt

After the prerequisites are installed, launch one of the following batch files from the c:\mozilla-build directory:

  • start-msvc8.bat  (VS 2005)
  • start-msvc9.bat  (VS 2008)
  • start-msvc10.bat (VS 2010)
  • start-msvc11.bat (VS 2011)
Even if you are on 64-bit Windows, do not use the start-msvcX-x64.bat files (unless you know what you're doing). Those files are experimental and unsupported. See the Build:MozillaBuild For x64 wiki page

This will launch a MSYS command prompt properly configured to build one of the aforementioned code bases.

All further commands should be executed in this command prompt window. Read on for some tips and caveats, or continue now with the build steps outlined at Build Documentation (probably with getting the source code).

Command Prompt Tips and Caveats

  • To paste into this window, you must right-click on the window's title bar, move your cursor to the Edit menu and click Paste.
  • If you have cygwin installed, make sure that the MozillaBuild directories come before any cygwin directories in the search path (use echo $PATH to see your search path).
  • In the MSYS shell, the c: drive looks like a directory called c under the root directory (/). So if you want to change to the directory c:\mydir, in the MSYS shell you would use cd /c/mydir  Note the UNIX-style forward slashes (/) in the prompt instead of the Windows-style backward slashes (\)
  • The MSYS root directory is located in c:\mozilla-build\msys if you used the default installation directory. It's a good idea not to build anything under this directory. Instead use something like /c/mydir.

Common problems, hints and restrictions

  • Debugging Mozilla on Windows FAQ: Tips on how to debug Mozilla on Windows.
  • The build may fail if your PATH environment variable contains quotes ("). Quotes are not properly translated when passed down to MozillaBuild sub-shells. Quotes are usually not needed so they can be removed.
  • Prior to Gecko 5.0 {{ geckoRelease("5.0") }}, your OBJDIR (build directory) cannot be within the MSYS root directory. If you try this, you will see linker failures (for example, if you are building into /mydir/some/path, it will complain about being unable to find mydir:\some\path).
  • The build may fail if you have cygwin installed. Make sure that the MozillaBuild directories (c:\mozilla-build and subdirectories) come before any cygwin directories in your PATH environment variable. If this does not help, remove the cygwin directories from PATH, or try building on a clean PC with no cygwin.
  • Building with versions of NSIS other than the version that comes with the latest supported version of MozillaBuild is not supported and will likely fail.
  • If you're building on VS2005 and the build fails with the error message "C2118: negative subscript" on win_util.cc, you need to install the VS2005 Service Pack 1. Furthermore, if you get "LNK1103: debugging information corrupt", try installing this hotfix: http://support.microsoft.com/kb/949009
  • If you intend to distribute your build to others, you will need to set WIN32_REDIST_DIR=$VCINSTALLDIR\redist\x86\Microsoft.VC80.CRT in your mozconfig to get the Microsoft CRT DLLs packaged along with the application.
  • The Microsoft Antimalware service can interfere with compilation, often manifesting as an error related to conftest.exe during build.  To remedy this, add at least your object directory to the exclusion settings.
  • If you encounter an error that atlbase.h cannot be found and you have installed Visual Studio 10 Express together with the platform SDK, you may have to delete a registry entry so that guess-msvc.bat doesn't detect VC10 installed. The key is HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VC.
  • If you encounter an error like "second C linkage of overloaded function '_interlockedbittestandset' not allowed", it happens when intrin.h and windows.h are included together. Use a #define to redefine one instance of the function's name. See more on using intrin.h.

{{ Warning("If you follow the below advice, your computer will not be protected against attacks that exploit this vulnerability. Make sure you take adequate precautions. }}")

  • If you still get random crashes when running MAKE, you may be encountering interference from Windows Security Updates that prevent proper operation of the Bash shell on some Windows systems.  In this case, if you're on Windows XP, you will need to uninstall Windows XP Security Updates KB933729 and KB970238 using Add or Remove Programs from the Control Panel.  The first of these Security Updates is also incorporated into Windows XP Service Pack 3 (KB936929), so if you have already installed SP3 you'll need to uninstall it and then make sure that Service Pack 2, including all Windows updates (EXCEPT KB933729, KB936929 and KB970238) get installed.  To prevent these updates from being installed automatically, select "Notify me but don't automatically download or install them" in the Control Panel's "Automatic Updates" dialog.  Then de-select them when any of these items appear in the list of recommended updates, and when asked, indicate that you don't want to be asked about these de-selected updates in the future.
  • Parallel builds (-jN) do not work with GNU make on Windows. You need to use pymake instead.

Return to the Build Documentation

{{ languages( { "de": "de/Entwicklerhandbuch/Build_Anweisungen/Windows_Build_Voraussetzungen", "es": "es/Requerimientos_para_la_compilaci\u00f3n_en_Windows", "fr": "fr/Pr\u00e9alables_\u00e0_la_compilation_sous_Windows", "ja": "ja/Windows_Build_Prerequisites", "zh-cn": "cn/Windows_Build_Prerequisites" } ) }}

Revision Source

<div> <div class="note"><span class="comment"><strong>Note:</strong> Do not make substantive changes to this document without consulting Benjamin Smedberg &lt;<a class=" link-mailto" href="mailto:benjamin@smedbergs.us" rel="freelink">benjamin@smedbergs.us</a>&gt; or one of the build-config peers.</span></div>
</div>
<p>{{ :en/Build_Documentation/TOC() }}</p>
<h2>Introduction</h2>
<p>The Mozilla build process requires many tools that are not installed on most Windows systems. In addition to Visual Studio, you must install MozillaBuild, which is a bundle of software including just the right versions of bash, GNU make, autoconf, Mercurial, and much more.</p>
<p>This document is a guide to the MozillaBuild environment, which works with the following versions of the Mozilla codebase available as Mercurial code repositories:</p>
<ul> <li><a class="internal" href="/en/mozilla-central" title="en/mozilla-central">mozilla-central</a>/mozilla-aurora/mozilla-beta/mozilla-release (Firefox 4 and later)</li> <li>mozilla-1.9.2 (1.9.2/Firefox 3.6)</li> <li>tracemonkey</li> <li><a class="internal" href="/en/comm-central" title="en/comm-central">comm-central</a>/comm-aurora/comm-beta/comm-release (Thunderbird 5/SeaMonkey 2.1 and later)</li> <li>comm-1.9.2 (Thunderbird 3.1)</li>
</ul>
<p>It works with the following compilers ("Official" means this is what we use for the builds we release as the Firefox product):</p>
<table class="standard-table"> <thead> <tr> <th scope="col"> </th> <th scope="col">VC8 <span style="font-size: smaller;">(Visual Studio 2005)</span></th> <th scope="col">VC9 <span style="font-size: smaller;">(Visual Studio 2008)</span></th> <th scope="col">VC10 <span style="font-size: smaller;">(Visual Studio 2010)</span></th> </tr> </thead> <tbody> <tr> <th scope="row">mozilla-1.9.2/comm-1.9.2<br> Gecko 1.9.2<br> Firefox 3.6</th> <td style="background-color: rgb(102, 255, 102);">Yes <span style="font-size: smaller;">(Official)</span></td> <td style="background-color: rgb(102, 255, 102);">Yes</td> <td style="background-color: rgb(255, 153, 153);">No</td> </tr> <tr> <th scope="row">mozilla-central/tracemonkey/comm-central<br> Gecko 2 &amp; later<br> Firefox 4 &amp; later</th> <td style="background-color: rgb(102, 255, 102);">Yes<sup>1</sup> <span style="font-size: smaller;">(Official)</span></td> <td style="background-color: rgb(102, 255, 102);">Yes</td> <td style="background-color: rgb(102, 255, 102);">Yes</td> </tr> </tbody>
</table>
<p>For building older versions of the codebase, see the <a href="/en/Windows_Build_Prerequisites_(1.9.0_and_1.9.1_branches)" title="en/Windows Build Prerequisites (1.9.0 and 1.9.1 branches)">Windows build prerequisites (1.9.0/1.9.1 branches)</a> and the <a href="/en/Windows_build_prerequisites_using_cygwin" title="en/Windows_build_prerequisites_using_cygwin">Windows build prerequisites using cygwin</a>. If you are building very old versions of the Mozilla source code, from the 1.0 branch and earlier, follow the <a class="external" href="http://www.mozilla.org/build/win32-nmake.html">nmake build instructions</a>.<br> <sup>1</sup>VC8 SP1 (service pack 1) is now required.</p>
<h2>Hardware requirements</h2>
<p>Mozilla takes time to build. You need a development-class system:</p>
<ul> <li>A fast processor, ideally with several cores.</li> <li>At least 2 GB of RAM, 4 GB or higher recommended.</li> <li>1.5 GB NTFS or 3 GB FAT disk space, or more</li> <li>Windows Vista or later recommended (the build should work on Windows XP though).</li>
</ul>
<h2>Software requirements</h2>
<p>The following software needs to be installed for a standard Windows build:</p>
<ul> <li>Microsoft Visual C++ tools</li> <li>Microsoft Windows SDK(s)</li> <li>MozillaBuild</li> <li>Microsoft DirectX SDK (optional)</li>
</ul>
<p>Mozilla may not build if some tools are installed at a path that contains spaces or other breaking characters such as pluses, quotation marks, or meta characters. The Visual C++ tools may be installed in a directory which contains spaces (the default install location is preferred).</p>
<h3>Microsoft Visual C++ (MSVC)</h3>
<p>Depending on what you're building, you will need to use one of several available versions of Microsoft Visual C++ (MSVC) and/or Microsoft Visual Studio. See the chart at the top of this page to ensure that the version you've selected is compatible with the branch you want to build.</p>
<div class="warning">If you want to enable jemalloc, you must be using <a class="external" href="http://www.microsoft.com/downloads/details.aspx?familyid=bb4a75ab-e2d4-4c96-b39d-37baf6b5b1dc&amp;displaylang=en">Visual Studio 2005 SP1,</a> Visual Studio 2008 SP1, Visual Studio 2010 or Visual Studio 2010 SP1.  Other versions of Visual Studio will not work.</div>
<dl>
</dl>
<ul> <li>Visual C++ 10 is available from Microsoft as part of the free <a class="external" href="http://go.microsoft.com/?linkid=9709949" title="http://go.microsoft.com/?linkid=9709949">Visual C++ 2010 Express Edition</a>.</li> <li>Visual C++ 9 is available from Microsoft as part of the free <a class="external" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=F3FBB04E-92C2-4701-B4BA-92E26E408569&amp;displaylang=en" title="http://www.microsoft.com/downloads/details.aspx?FamilyId=F3FBB04E-92C2-4701-B4BA-92E26E408569&amp;displaylang=en">Visual C++ 2008 Express Edition with SP1</a> (make sure you get this and not the one without SP1!). You do not need to install the Silverlight runtime or the SQL Server 2008 Express Edition when offered. Alternatively you can install the command-line compiler as part of the Windows 7 SDK, but you are then expected to use the included WinDbg debugger.</li> <li>The Visual C++ 8 command-line compiler is included with the Vista SDK, but you are then expected to use the included WinDbg debugger.</li>
</ul>
<h3>Microsoft Windows SDK</h3>
<p>See <a class="internal" href="/En/Windows_SDK_versions" title="En/Windows SDK versions">Windows SDK versions</a>.</p>
<h3>Microsoft DirectX SDK</h3>
<p>The DirectX SDK is required for building the <a class="external" href="http://code.google.com/p/angleproject/" title="http://code.google.com/p/angleproject/">ANGLE</a> GLES-on-D3D9 renderer, which is used on Windows for WebGL rendering.  This part of ANGLE is an optional component, and is built if the DirectX SDK is available.  Official Firefox builds include ANGLE.  As part of the DirectX SDK install, you must install the End-User Redistributable Packages; don't uncheck it in the installer.</p>
<p>Install at least the <a class="external" href="http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&amp;FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba" title="http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&amp;FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba">June 2010 DirectX SDK</a>. The latest DirectX SDK can be found from the <a class="external" href="http://msdn.microsoft.com/en-us/directx" title="http://msdn.microsoft.com/en-us/directx">DirectX Developer Center</a>.</p>
<p>MSDN claims that MSVC 2005 is not compatible with the June 2010 SDK, but as far as we're concerned it works for release builds. However you cannot use the compiler provided with the Vista SDK to compile debug builds at all, and you need a <a class="external" href="http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=18623" title="http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=18623">hotfix</a> to be able to compile debug builds with the full MSVC 2005.</p>
<h3 id="mozillabuild">MozillaBuild / Pymake</h3>
<p>The MozillaBuild package contains the other software prerequisites necessary for building Mozilla. This includes the MSYS build environment, <a href="/en/Mercurial" title="en/Mercurial">Mercurial</a>, autoconf-2.13, CVS, Python, YASM, NSIS, and UPX, as well as optional but useful tools such as wget and emacs. </p>
<p><a class="external" href="http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe" title="http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe">Download the current MozillaBuild package.</a></p>
<p>By default, the package installs to <code>c:\mozilla-build</code>. It is recommended to use the default path. Don't use a path that contains spaces. The installer does not modify the Windows registry. Note that some binaries may require <a class="external" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2&amp;displaylang=en" title="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2&amp;displaylang=en">Visual C++ Redistributable package</a> to run.</p>
<p><strong>Expectation setting:</strong> Note that the "UNIX-like" environment provided by MozillaBuild is only really useful for building and committing to the Mozilla source. Most command line tools you would expect in a modern Linux distribution are not present, and those tools that are provided can be as much as a decade or so old (especially those provided by MSYS). It's the old tools in particular that can cause problems, since they often don't behave as expected, are buggy, or don't support command line arguments that have been taken for granted for years. For example, copying a source tree using <code>cp -rf src1 src2</code> does not work correctly because of an old version of cp (it gives "cp: will not create hard link" errors for some files). In short, MozillaBuild supports essential developer interactions with the Mozilla code, but beyond that don't be surprised if it trips you up in all sorts of exciting and unexpected ways.</p>
<p>The MozillaBuild package includes the "make" program that originated on the UNIX and Linux platforms. This version of make does not make use of Windows' multi-core architecture. <a class="external" href="http://benjamin.smedbergs.us/pymake/" rel="external" target="_blank" title="http://benjamin.smedbergs.us/pymake/">pymake</a> is a Python implementation of Make that uses Window's multi-core architecture and thus significantly speeds up build time. See <a class="external" href="http://mikeconley.ca/blog/2011/11/30/build-thunderbird-faster-on-windows/" rel="external" target="_blank" title="http://mikeconley.ca/blog/2011/11/30/build-thunderbird-faster-on-windows/">Mike Conley's blog post</a> for more information about installing and using pymake.</p>
<h2>Opening a Build Command Prompt</h2>
<p>After the prerequisites are installed, launch one of the following batch files from the <code>c:\mozilla-build</code> directory:<br> <code> </code></p>
<ul> <li><code>start-msvc8.bat  (VS 2005)<br> </code></li> <li><code>start-msvc9.bat  (VS 2008)<br> </code></li> <li><code>start-msvc10.bat (VS 2010)</code></li> <li><code>start-msvc11.bat (VS 2011)</code></li>
</ul>
<div class="warning"><strong>Even if you are on 64-bit Windows, do not use the <code>start-msvcX-x64.bat</code> files </strong>(unless you know what you're doing). Those files are <strong>experimental</strong> and <strong>unsupported</strong>. See the <a class="external" href="http://wiki.mozilla-x86-64.com/How_To_Build_Windows_x64_Build" title="http://wiki.mozilla-x86-64.com/How_To_Build_Windows_x64_Build">Build:MozillaBuild For x64 wiki page</a>. </div>
<p>This will launch a MSYS command prompt properly configured to build one of the aforementioned code bases.</p>
<p>All further commands should be executed in this command prompt window. Read on for some tips and caveats, or continue now with the build steps outlined at <a href="/En/Developer_Guide/Build_Instructions" title="https://developer.mozilla.org/en/Build_Documentation">Build Documentation</a> (probably with getting the source code).</p>
<h4>Command Prompt Tips and Caveats</h4>
<ul> <li>To paste into this window, you must right-click on the window's title bar, move your cursor to the <strong>Edit </strong>menu and click <strong>Paste</strong>.</li> <li>If you have cygwin installed, make sure that the MozillaBuild directories come before any cygwin directories in the search path (use <code>echo $PATH</code> to see your search path).</li> <li>In the MSYS shell, the c: drive looks like a directory called <code>c</code> under the root directory (/). So if you want to change to the directory <code>c:\mydir</code>, in the MSYS shell you would use <code>cd /c/mydir</code>  Note the UNIX-style forward slashes (/) in the prompt instead of the Windows-style backward slashes (\)</li> <li>The MSYS root directory is located in <code>c:\mozilla-build\msys</code> if you used the default installation directory. It's a good idea not to build anything under this directory. Instead use something like <code>/c/mydir</code>.</li>
</ul>
<h2>Common problems, hints and restrictions</h2>
<ul> <li><a href="/en/Debugging_Mozilla_on_Windows_FAQ" title="en/Debugging_Mozilla_on_Windows_FAQ">Debugging Mozilla on Windows FAQ</a>: Tips on how to debug Mozilla on Windows.</li> <li>The build may fail if your PATH environment variable contains quotes ("). Quotes are not properly translated when passed down to MozillaBuild sub-shells. Quotes are usually not needed so they can be removed.</li> <li>Prior to Gecko 5.0 {{ geckoRelease("5.0") }}, your OBJDIR (build directory) cannot be within the MSYS root directory. If you try this, you will see linker failures (for example, if you are building into <code>/mydir/some/path</code>, it will complain about being unable to find <code>mydir:\some\path</code>).</li> <li>The build may fail if you have cygwin installed. Make sure that the MozillaBuild directories (<code>c:\mozilla-build</code> and subdirectories) come before any cygwin directories in your PATH environment variable. If this does not help, remove the cygwin directories from PATH, or try building on a clean PC with no cygwin.</li> <li>Building with versions of NSIS other than the version that comes with the latest supported version of MozillaBuild is not supported and will likely fail.</li> <li>If you're building on VS2005 and the build fails with the error message "C2118: negative subscript" on win_util.cc, you need to install the VS2005 Service Pack 1. Furthermore, if you get "LNK1103: debugging information corrupt", try installing this hotfix: <a class=" external" href="http://support.microsoft.com/kb/949009" rel="freelink">http://support.microsoft.com/kb/949009</a></li> <li>If you intend to distribute your build to others, you will need to set <code>WIN32_REDIST_DIR=$VCINSTALLDIR\redist\x86\Microsoft.VC80.CRT</code> in your mozconfig to get the Microsoft CRT DLLs packaged along with the application.</li> <li>The <a class="external" href="http://www.microsoft.com/security/malwareremove/default.aspx" title="http://www.microsoft.com/security/malwareremove/default.aspx">Microsoft Antimalware service</a> can interfere with compilation, often manifesting as an error related to <code>conftest.exe</code> during build.  To remedy this, add at least your object directory to the <a class="external" href="http://social.answers.microsoft.com/Forums/en-US/msescan/thread/0867c974-cf19-460d-a75d-e35f283d4ad3" title="http://social.answers.microsoft.com/Forums/en-US/msescan/thread/0867c974-cf19-460d-a75d-e35f283d4ad3">exclusion settings</a>.</li> <li>If you encounter an error that atlbase.h cannot be found and you have installed Visual Studio 10 Express together with the platform SDK, you may have to delete a registry entry so that guess-msvc.bat doesn't detect VC10 installed. The key is HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VC.</li> <li>If you encounter an error like "second C linkage of overloaded function '_interlockedbittestandset' not allowed", it happens when intrin.h and windows.h are included together. Use a #define to redefine one instance of the function's name. See more on <a href="/En/Developer_Guide/Build_Instructions/Intrin.h" title="https://developer.mozilla.org/En/Developer_Guide/Build_Instructions/Intrin.h">using intrin.h</a>.</li>
</ul>
<p>{{ Warning("If you follow the below advice, your computer will <strong>not </strong>be protected against attacks that exploit this vulnerability. <span style="font-size: small;"><strong>Make sure you take adequate precautions.</strong> }}</span>")</span></p>
<ul> <li>If you still get random crashes when running MAKE, you may be encountering interference from Windows Security Updates that prevent proper operation of the Bash shell on some Windows systems.  In this case, if you're on Windows XP, you will need to uninstall Windows XP Security Updates KB933729 and KB970238 using Add or Remove Programs from the Control Panel.  The first of these Security Updates is also incorporated into Windows XP Service Pack 3 (KB936929), so if you have already installed SP3 you'll need to uninstall it and then make sure that Service Pack 2, including all Windows updates (EXCEPT KB933729, KB936929 and KB970238) get installed.  To prevent these updates from being installed automatically, select "Notify me but don't automatically download or install them" in the Control Panel's "Automatic Updates" dialog.  Then de-select them when any of these items appear in the list of recommended updates, and when asked, indicate that you don't want to be asked about these de-selected updates in the future.</li> <li>Parallel builds (-jN) do not work with GNU make on Windows. You need to use <a href="/en/pymake" title="pymake">pymake</a> instead.</li>
</ul>
<p><em><a href="/En/Developer_Guide/Build_Instructions" title="en/Build_Documentation">Return to the Build Documentation </a></em></p>
<p>{{ languages( { "de": "de/Entwicklerhandbuch/Build_Anweisungen/Windows_Build_Voraussetzungen", "es": "es/Requerimientos_para_la_compilaci\u00f3n_en_Windows", "fr": "fr/Pr\u00e9alables_\u00e0_la_compilation_sous_Windows", "ja": "ja/Windows_Build_Prerequisites", "zh-cn": "cn/Windows_Build_Prerequisites" } ) }}</p>
Revert to this revision