Mozilla's getting a new look. What do you think?

If you wish to enable jemalloc you must be using Visual Studio 2005 SP1 (service pack 1), no other version of Visual Studio will work.

So for jemalloc only Visual Studio 2005 would work? - andrit 12:50, 2008-08-07 (EEST)

Should the packages list also mention the "patch" and "cvs" packages? I remember being annoyed that it wasn't installed, but I'm not 100% sure that it was required to get patch. - DBaron 19:34:14, 2005-10-05 (PDT)

There is an older version of the MS PSDK from 2003 here. One user in the Mozillazine forums said he had better luck building with this than the newer one, which was released in 2005. - Napolj2 09:08:48, 2005-11-11 (PST)

I wanted to mention that I was compiling xulrunner on win2k with no OS service pack, and the compile was dying during the final link of the toolkit. I tried numerous things to get the compile to work, but they all failed. I then installed the win2k SP4, and after this the build worked. This led me to wonder if the Hardware Requirements section was incomplete. Perhaps a service pack is needed? - Briprowe 15:43, 12 December 2005 (PST)

Can somebody explain why choosing DOS line endings is recommended? The cygwin manual strongly recommends against them "unless you have a very good reason to switch". Momoko 07:16, 19 December 2005 (PST)

As for the MS PSDK, Microsoft explicitly warns that the one linked to in the main page (Windows 2003 Server SP1 PSDK) does [b]not[/b] work with Visual C++ 6.0. I made a mistake of not reading the 'not-so-fine' print in the page and installing it only to get a link error while compiling xpcom. Fortunately, I installed it in a different directory from the directory where Feb. 2003 edition of SDK was installed so that I could just revert to the old PSDK changing environment variables, PATH, LIB and INCLUDE without doing the chore of reinstalling it. Jshin 2006-02-03 10:42 (UTC)

Trying to download "Windows Vista SDK" by link got file 6.0.6001.18000.367-KRMSDK_EN.iso. readme from it says it is "Windows Software Development Kit (SDK) for Windows Server 2008 and .NET Framework 3.5". mozilla-build not work with it. What's exactly sdk must be used now with MS Visial Studio 2005? --Iav 20:01, 2 July 2008 (PDT) Maybe, this is right link to Microsoft® Windows® Software Development Kit Update for Windows Vista™ There is 6.1.6000.16384.10.WindowsSDK_Vista_Feb2007Update_rtm.DVD.Rel.iso file.

Shouldn't binutils be listed under necessary cygwin patches or at least recommended for non-debug builds? Autoconfig will detect that strip isn't available and happily continue but installing binutils and making strip.exe available greatly reduces the resultant binaries... -Jay Lee

I think you need to add the Make package to the list of things needed after default. Doing the default didn't have Make for me at least. comrade693

I notice that if you're using VC2008++Express and the Vista SDK then you only need the Core 2003 SDK but if you're using VC2005++Express then you need the three components as described. Neil My bad - I hadn't installed the whole Vista SDK, so now the corrected version is that VC2008++Express only needs the Core Vista and 2003 SDK but VC2005++Express needs the whole Vista SDK. Neil

Problem: "target `c' doesn't match the target pattern" error

In the FAQs, it stated that the error can be fixed by changing the version of Make from 3.81 to 3.80 during the Cygwin installation. However, when I installed Cygwin yesterday, it didn't allow me to choose Make 3.80. In previous versions of Cygwin, you could easily "rollback" the version of Make from 3.81 to 3.80.

Should the documentation outline this problem and the solution so other users who try to build will not have to spend the whole night trying solutions that don't work??

Here is my documentation to the Problem and Solution. 13:22, 16 September 2006 (EST) elichak

Per the Cygwin mailing list they've deleted make 3.80 from the packages normally available to the installer. I edited the documentation to suggest googling for the package, and also provided a link to a mirror that is preserving it(several are). There is also a patched version of 3.81 that is being tested, per that message, and we can recommend it instead if someone tests it. Also, I /really/ need to pay attention to which account I have logged in when I post something. Thanks for bringing attention to this! Sancus 17:03, 16 September 2006 (EST)

I am currently testing the Make 3.81 patch. Last night, I tested it by using it to build Firefox 3.0 but it failed. I have yet to look into this problem, but I thought it might be a good idea that someone knows that I'm looking into this issue. Thanks :) - 10:07, 19 September 2006 (EST) elichak

Visual Studio Codename "Orcas"

Just letting you know that I'm testing compilation on the latest CTP of Orcas (VC9 January 2007 CTP). The details will be published on the page as they are available. If anyone has experience with compiling Mozilla with VS9, post it here. --NetRolller 3D 12:13, 24 January 2007 (PST)

Update on "Orcas" compatibility

I've started compatibility testing of "Orcas", and so far, I'm running well. The first problem I noticed was that the Configure script didn't pick up the compiler, due to the version change. ("Orcas" is version 9, and it sports a new compiler, namely version 15.) So, I had to fix so that it picked up the new versions. You can get the patch I made for this problem from Attachment #252916 of Bug #368316. After applying this patch, the build started without a problem. It went well until the step where updater.exe and crashreporter.exe are copied to the objdir/dist/bin directory. But a little after that, my computer crashed, due to a RAM failure. (I've recently bought some more RAM for my computer, that apparently didn't really like being in dual-channel mode.) After correcting the issue, I restarted the build, but it failed linking xpinstall.dll. From what I've found out, this seems to have been caused by the weird mozconfig settings I created. I've reverted to a more basic mozconfig, and will restart building tomorrow, when I have some more time. Until then, here is my error log (if anyone has any advice, post it here!):

Building deps for /cygdrive/n/development/mozilla/xpinstall/src/nsWinShortcut.cpp
/cygdrive/n/development/mozilla/build/cygwin-wrapper cl -FonsWinShortcut.obj -c  -DM
2620 -DZLIB_DLL -I/cygdrive/n/development/mozilla/xpinstall/src/../public -I../../di
st/include/xpcom -I../../dist/include/string -I../../dist/include/jar -I../../dist/i
nclude/caps -I../../dist/include/content -I../../dist/include/necko -I../../dist/inc
lude/intl -I../../dist/include/locale -I../../dist/include/libreg -I../../dist/inclu
de/js -I../../dist/include/pref -I../../dist/include/widget -I../../dist/include/uri
loader -I../../dist/include/xpconnect -I../../dist/include/dom -I../../dist/include/
windowwatcher -I../../dist/include/plugin -I../../dist/include/unicharutil -I../../d
ist/include/appshell -I../../dist/include/docshell -I../../dist/include/layout -I../
../dist/include/chrome -I../../dist/include/extensions -I../../dist/include/embed_ba
se -I../../dist/include/zlib -I../../dist/include   -I../../dist/include/xpinstall -
I../../dist/include/nspr  -DMOZ_PNG_READ -DPNG_NO_MMX_CODE -DMOZ_PNG_WRITE  -I../../
dist/sdk/include -I/usr/X11R6/include     -I/usr/X11R6/include -GR- -TP -nologo -Zc:
wchar_t- -W3 -Gy -FdnsWinShortcut.pdb  -DNDEBUG -DTRIMMED -Ob2itxy -GLFATs -arch:SSE
2 -MD           -I/usr/X11R6/include -D_CRT_SECURE_NO_DEPRECATE=1 -D_CRT_NONSTDC_NO_
=\"1.9a2pre\" -DMOZILLA_VERSION_U=1.9a2pre -DHAVE_SNPRINTF=1 -D_WINDOWS=1 -D_WIN32=1
browser -DMOZ_XUL_APP=1 -DMOZ_DEFAULT_TOOLKIT=\"cairo-windows\" -DMOZ_THEBES=1 -DMOZ
A_CONFIG_H_ -DMOZILLA_CLIENT /cygdrive/n/development/mozilla/xpinstall/src/nsWinShor
/usr/bin/perl /cygdrive/n/development/mozilla/config/ -QUIET 1 -DEPTH
../.. -TOPSRCDIR /cygdrive/n/development/mozilla -BITS 32 -OBJDIR . -SRCDIR /cygdriv
e/n/development/mozilla/xpinstall/src -DISPNAME Firefox -OFFICIAL 1 -MODNAME xpinsta
Creating Resource file: module.res
/cygdrive/n/development/mozilla/build/cygwin-wrapper rc.exe  -r -DMOZILLA_INTERNAL_A
I/cygdrive/n/development/mozilla/xpinstall/src/../public -I../../dist/include/xpcom
-I../../dist/include/string -I../../dist/include/jar -I../../dist/include/caps -I../
../dist/include/content -I../../dist/include/necko -I../../dist/include/intl -I../..
/dist/include/locale -I../../dist/include/libreg -I../../dist/include/js -I../../dis
t/include/pref -I../../dist/include/widget -I../../dist/include/uriloader -I../../di
st/include/xpconnect -I../../dist/include/dom -I../../dist/include/windowwatcher -I.
./../dist/include/plugin -I../../dist/include/unicharutil -I../../dist/include/appsh
ell -I../../dist/include/docshell -I../../dist/include/layout -I../../dist/include/c
hrome -I../../dist/include/extensions -I../../dist/include/embed_base -I../../dist/i
nclude/zlib -I../../dist/include   -I../../dist/include/xpinstall -I../../dist/inclu
de/nspr  -DMOZ_PNG_READ -DPNG_NO_MMX_CODE -DMOZ_PNG_WRITE  -I../../dist/sdk/include
-Fomodule.res /cygdrive/n/development/mozilla/VC9Test/xpinstall/src/module.rc
/cygdrive/n/development/mozilla/build/cygwin-wrapper link -NOLOGO -DLL -OUT:xpinstal
.dll -PDB:xpinstal.pdb -SUBSYSTEM:WINDOWS  CertReader.obj nsInstall.obj nsInstallTri
gger.obj nsInstallVersion.obj nsInstallFolder.obj nsJSInstall.obj nsJSFile.obj nsJSI
nstallTriggerGlobal.obj nsJSInstallVersion.obj nsSoftwareUpdate.obj nsSoftwareUpdate
Run.obj nsInstallFile.obj nsInstallExecute.obj nsInstallPatch.obj nsInstallUninstall
.obj nsInstallResources.obj nsRegisterItem.obj nsTopProgressNotifier.obj nsLoggingPr
ogressNotifier.obj ScheduledTasks.obj nsXPIProxy.obj nsXPITriggerInfo.obj nsXPInstal
lManager.obj nsInstallFileOpItem.obj nsJSFileSpecObj.obj nsInstallLogComment.obj nsI
nstallBitwise.obj nsWinReg.obj nsJSWinReg.obj nsWinRegItem.obj nsWinProfile.obj nsJS
WinProfile.obj nsWinProfileItem.obj nsWinShortcut.obj   ./module.res    -IMPLIB:fake
.lib ../../modules/libreg/src/mozreg_s.lib ../../dist/lib/js3250.lib ../../dist/lib/
unicharutil_s.lib ../../dist/lib/xpcom.lib ../../dist/lib/xpcom_core.lib ../../dist/
lib/nspr4.lib ../../dist/lib/plc4.lib ../../dist/lib/plds4.lib  ../../dist/lib/mozz.
lib   kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib ole32.lib
 version.lib uuid.lib
CertReader.obj : MSIL .netmodule or module compiled with /GL found; restarting link
with /LTCG; add /LTCG to the link command line to improve linker performance
   Creating library fake.lib and object fake.exp
nsInstall.obj : error LNK2001: unresolved external symbol "public: __thiscall nsWinP
rofile::nsWinProfile(class nsInstall *,class nsString const &,class nsString const &
)" (??0nsWinProfile@@QAE@PAVnsInstall@@ABVnsString@@1@Z)
nsJSWinProfile.obj : error LNK2001: unresolved external symbol "public: int __thisca
ll nsWinProfile::GetString(class nsString,class nsString,class nsString *)" (?GetStr
nsJSWinProfile.obj : error LNK2001: unresolved external symbol "public: int __thisca
ll nsWinProfile::WriteString(class nsString,class nsString,class nsString,int *)" (?
nsJSWinProfile.obj : error LNK2001: unresolved external symbol "public: __thiscall n
sWinProfile::~nsWinProfile(void)" (??1nsWinProfile@@QAE@XZ)
nsWinProfileItem.obj : error LNK2001: unresolved external symbol "public: int __this
call nsWinProfile::FinalWriteString(class nsString,class nsString,class nsString)" (
nsWinProfileItem.obj : error LNK2001: unresolved external symbol "public: class nsIn
stall * __thiscall nsWinProfile::InstallObject(void)" (?InstallObject@nsWinProfile@@
nsWinProfileItem.obj : error LNK2001: unresolved external symbol "public: class nsSt
ring & __thiscall nsWinProfile::GetFilename(void)" (?GetFilename@nsWinProfile@@QAEAA
xpinstal.dll : fatal error LNK1120: 7 unresolved externals
make[5]: *** [xpinstal.dll] Error 96
make[5]: Leaving directory `/cygdrive/n/development/mozilla/VC9Test/xpinstall/src'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/n/development/mozilla/VC9Test/xpinstall'
make[3]: *** [libs_tier_toolkit] Error 2
make[3]: Leaving directory `/cygdrive/n/development/mozilla/VC9Test'
make[2]: *** [tier_toolkit] Error 2
make[2]: Leaving directory `/cygdrive/n/development/mozilla/VC9Test'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/n/development/mozilla/VC9Test'
make: *** [build] Error 2

These "unresolved external symbol" messages look like I'm compiling with an old mozconfig that has settings that no longer produce valid builds. (The last time I build Mozilla on this machine was in 11/2006.) This doesn't seem to be due to a change in the compiler. NetRolller 3D 12:38, 26 January 2007 (PST)

"Orcas" Update: Success!

I've just completed my first successful build with "Orcas" January 2007 CTP! The problems I previously had were caused by a broken mozconfig. Using a more basic (but still quite optimized) mozconfig, I was able to do an optimized, static build of Firefox 3.0a2pre! Supposedly, 1.8.0 and 1.8.1 (1.5/2.0) won't build with this compiler, judging from that they don't build with VC8, either. This build is not --enable-official-branding, so it might be distributable. If requested, I'll upload my build to the web, with the new MSVC Runtime that they require. Once my patch is checked in, we can safely add "Orcas" to the list of supported compilers. So, I can say that Mozilla can be built using VC9/"Orcas! NetRolller 3D 12:07, 27 January 2007 (PST)

This page could be better positioned in search engines if we had also a Building Firefox term or title somewhere in it. Currently google for building firefox gives many other docs online.

A UNIX command slipped and I missed another

1- Look for: echo %path near the bottom and replace with the equivalent Windows command echo %path% or simply path (Sorry, it seems I can´t edit THE page).

2- Being an absolute newbie, never having built nothing C++, I faithfully followed the instructions in this page (which is a very clear page, BTW) up and until the start-msvc10.bat command. It worked like a charm and opened the environment command window. After, I didn´t know how to continue. How does somebody like me start the make run? With which flags? OK, one like me does not build ff. But still, the instructions have an implied step that noobies can´t take. 

[Suggestion] Please use mintty instead of cmd.exe for mozilla-build

May I use this page to suggest that start-msvc#.bat run bash through mintty rather than cmd.exe? The mintty interface is superior to the cmd interface.


Users wanting to use mintty can currently get mintty with


# run start-msvc10.bat
cd /
7z x mintty*zip -obin mintty.exe


To use mintty instead of cmd from start-msvc10.bat it can then be patched with


-"%MOZILLABUILD%\msys\bin\bash" --login -i
+"%MOZILLABUILD%"\msys\bin\mintty /bin/bash -l


Thanks!—JohnPeterson 23 May 2012
Myk: I recommend starting mintty using "start" instead, since that allows the cmd.exe window that launches mintty to close afterward, so you only have one open window:
-"%MOZILLABUILD%\msys\bin\bash" --login -i
+start /d "%USERPROFILE%" "" "%MOZILLABUILD%"\msys\bin\mintty /bin/bash --login



[Suggestion] Provide MozillaBuildSetup-Latest.exe as extractable archive

Please provide MozillaBuildSetup-Latest.exe as a zip file so that it can be extracted easier. The NSIS archive can be extracted with 7z but the folders are placed in ./$_OUTDIR rather than in ./.

Some users want to be able to update mozilla-build with

7z x -aoa -omozilla-build
cd repo; rm `find . -name 'config.cache'`; hg update -C    # clean generated files so they are regenerated with correct paths

It's not updated often it seems, its version is currently 2011-11-23, but it still makes sense to provide an extractable archive for it.

Thanks!—JohnPeterson 23 May 2012


Document Tags and Contributors

 Last updated by: MykMelez,