Unified Windows Build Prerequisites
I have put together an initial draft of a unified Mozilla-build package. It is available (temporarily) on my website: mozilla-build.zip (55MB). It contains everything needed to build Mozilla on Windows except the Microsoft Visual C++ compiler and the JDK (only required for XULRunner).
Using MSYS with gmake 3.81 requires one code change, in bug 345482: I’m hoping to get this fix backported to all the active branches soon.
I would like to get some testing of this package, to see if it has missing pieces or causes builders any problems. Please report success or failure in blog comments.
Usage Instructions:
- Install MS Visual C++. Do not add paths to the environment when the installer gives you the option.
- If you already have MSVC installed, check your environment and remove any references to it from PATH, INCLUDE, and LIB.
- Unzip the package to a path with no spaces in it: I recommend C:\ (it will unpack to C:\mozilla-build).
- Run start-msvc6.bat, start-msvc71.bat, or start-msvc8.bat. It should detect the installed location of MSVC from the registry, set up paths correctly, and launch an MSYS shell.
December 7th, 2006 at 11:57 am
Sounds sweet. I always hated trying to find all of the right stuff to make mozilla compile when setting up a new machine.
Maybe I should have read this somewhere else, but will there by any legal problems redistributing some of these tools? 7-zip and NSIS come to mind.
December 7th, 2006 at 2:27 pm
Is it possible to make this work with Visual C++ 2005 Express Edition ?
December 7th, 2006 at 2:51 pm
Nice, now I can finally get rid of CygWin. Two issues so far:
* I didn’t have a path to my installation of Visual C++ 2005 Express Edition in the registry. Maybe that was only my installation options or maybe Express Edition generally doesn’t put there. Anyway, I had to add a key to my registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VC. Then I added a string value named ProductDir to it with the path to the Visual C++ installation. Searched the registry, I don’t have this path anywhere else.
* I can’t use the existing tree, for some reason the checkout fails with “no such repository”. Checking out a new tree seems to work, I’ll try that now.
December 7th, 2006 at 3:14 pm
1. Not reading this entry carefully leads to build failing with
make[5]: *** [s:/mozilla/obj-fx-debug/dist/lib/softokn3.chk] Error 127
due to absolute paths being messed up. This can be fixed by applying the patch from the bug (tested on trunk).
2. During the build I had ‘make’ crash on me (dunno if it’s just my bad luck or what):
0 [main] make 3588 open_stackdumpfile: Dumping stack trace to make.exe.stackdump
Restarting build ‘cured’ the problem.
December 7th, 2006 at 6:15 pm
I am done building, it worked. However, one more issue: the environment setup has to consider Platform SDK, you need it when using Visual C++ 2005 Express Edition. You probably want to call %MSSDK%\SetEnv.Cmd in the environment setup. Still, Gecko wants ATL to be in the include path, something that this script doesn’t provide (you can include but not ), not sure what can be done about it.
December 7th, 2006 at 7:04 pm
What if you like MSVC in your path because you use it for other things as well?
December 7th, 2006 at 8:56 pm
You also have one of those blogs that eat anythings that looks like tags… I meant to say “you can include <atl/atlbase.h> but not <atlbase.h>” in the previous post.
December 7th, 2006 at 9:16 pm
Actually, I just noticed that bin\vcvars32.bat in VC++ 2005 EE simply calls “%VS80COMNTOOLS%vsvars32.bat”. I am not sure whether other versions of VC++ set this variable as well but maybe you can use it instead of digging in the registry.
December 11th, 2006 at 8:44 am
I did not have reg.exe on my machine although it is a Win2k pro. Maybe you should add it from here http://www.petri.co.il/download_free_reskit_tools.htm
December 20th, 2006 at 12:33 am
So I just tried this to do a 1.8.0 branch build with MSVC 6, and it failed reasonably early in the build with the error:
/bin/perl -I/c/builds/1.8.0/mozilla/config /c/builds/1.8.0/mozilla/config/bdate.pl build_number
Can’t load ‘/usr/lib/perl5/5.6.1/msys/auto/IO/IO.dll’ for module IO: dlopen: Win32 error 5 at /usr/lib/perl5/5.6.1/msys/XSLoader.pm line 75.
at /usr/lib/perl5/5.6.1/msys/IO.pm line 9
Compilation failed in require at /usr/lib/perl5/5.6.1/msys/IO/Handle.pm line 256.
[ followed by a long list of Compilation failed messages: IO::Handle (above), IO::Seekable, IO::File, mozBDate.pm, bdate.pl]
December 20th, 2006 at 1:29 am
A few other comments and questions:
The “no such repository” error on checkout is presumably because you were checking out on top of a cygwin tree pulled with DOS newlines, and this config has MSYS set up with Unix newlines. (Not sure if that’s configurable.) I saw that as well, but I’ve been meaning to switch to Unix newlines for a while, so I’m happy with it.
What’s the recommended way (if there is one) to add additional packages to MSYS? I’ve already noticed that it doesn’t have wget/curl, nor does it have any man pages.
December 20th, 2006 at 12:22 pm
Hello,
First off I’d like to applaud you for working towards unifying the mess of requirements to set up Mozilla. I had built firefox once before using the cygwin method and agree that the setup required is prohibitively complicated and time consuming. My results with your package are as follows:
I tried with Visual C++ 2005 Express and hit the same snag as Wladimir Palant:
“I didn’t have a path to my installation of Visual C++ 2005 Express Edition in the registry. Maybe that was only my installation options or maybe Express Edition generally doesn’t put there. Anyway, I had to add a key to my registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VC. Then I added a string value named ProductDir to it with the path to the Visual C++ installation. ”
The express edition puts a copy of its setup files in a subfolder off the main Visual Studio Directory:
“C:\Program Files\Microsoft Visual Studio 8\Microsoft Visual C++ 2005 Express Edition – ENU”
Perhaps a check could be incorporated for the existence of a folder with this name?
My second issues were with the documentation on the mozilla website involving checking out the sources. This probably isnt your responsibility but I wanted to mention it anyway. The syntax as pasted from the website code samples does not work:
http://developer.mozilla.org/en/docs/Mozilla_Source_Code_Via_CVS
“cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk”
This command fails with authentication errors, I had to break it into parts and login first, then try checking out in a second command, a beginner would not know how to do this.
“cd mozilla”
“make -f client.mk checkout MOZ_CO_PROJECT=browser”
This command fails with the error “The mozilla directory cannot be located in a path with spaces”. The directory I am trying to download to is c:\mozilla, and does not contain spaces. I don’t know if this has to do with quirks of the msys environment.
December 20th, 2006 at 5:27 pm
Thanks it looks like this might help ease many woes.
But alas still no joy here! I think it’s time to give up now and stick to simple things like baking bread… who want’s mozilla anyway? forget it… bake some bread… get pissed … lifes too short.
Stuff the internet. :q
December 20th, 2006 at 10:21 pm
For what it’s worth, my perl problem had something to do with the file permissions created by extracting mozilla-build.zip using cygwin zip. I re-extracted it using msys zip and it worked fine.
In response to the comments about the VC++2005 Express Edition — is there a different registry key that you do have that Benjamin should be looking for?
December 20th, 2006 at 10:26 pm
Supporting MSVC8 Express is bug 363942: MSVC8 Express is easy; detecting and configuring the SDK is not so easy.
January 9th, 2007 at 8:19 pm
The VC 2005 Express location can be found in:
HKLM\SOFTWARE\Microsoft\VCExpress\8.0\Setup\VC
The easy way is to change SET MSVC8KEY=%MSVCROOTKEY%\8.0\Setup\VC in guess-msvc.bat to the above location.
Creation of MSVC8EXPRESSKEY, VC8EXPRESSDIR in the . bat and a start-msvc8Express.bat would be savvy
January 12th, 2007 at 12:53 pm
[…] MozillaBuild RC1 I have a version of MozillaBuild ready for widespread testing, packaged as an installer. I’m calling this RC1 because I don’t know of any bugs and unless we find some it is fine to put into production. It works with MSVC6, 7, 8, and MSVC 8 Express with an SDK. It builds the trunk, 1.8, and 1.8.0 branches. Download MozillaBuildSetup.exe now The installer was built using the patch in bug 366823, which hasn’t been reviewed or landed yet. Please download and test this package (and start using it as your Windows development environment). If you have issues, please file bugs in Core->Build Config. […]
April 26th, 2009 at 9:29 pm
Windows 7 Release Candidate gets new features…
I have an Nvidia board and had exactly the same quicktime/ itunes issues, BSOD’ s and stuttering under Vista. My fix was to go into device manager and find“ Nvidia Nforce serial ATA controller†and then right click and select update driver softwa…