From MozillaZine Knowledge Base
This document has not been modified to account for the changes in the build system that occured at the end of November 2004. See this forum discussion for more information.
During a typical Mozilla/Firefox/Thunderbird compilation (or build) process, there are quite a few errors an inexperienced builder may stumble upon. Here are a few of them:
nsProfile.cpp: In member function `virtual nsresult
nsProfile.cpp:415: error: `SelectLocaleForProfile' undeclared (first use this function)
MOZ_PHOENIX is not defined, so compilation proceeds for the Mozilla Suite rather than Firefox. Code changes made on the AVIARY branch mean that Mozilla does not compile. This error occurs for Firefox 1.0 PR and later.
- You have attempted to compile using
./configure; make. The Firefox build process is autoconf based and controlled by an options file called
.mozconfig. See the Firefox build instructions for information on how to set up your .mozconfig . Firefox should be compiled with the command
make -f client.mk build in the
- You have a .mozconfig file but it is in the wrong location. Your .mozconfig should be in your home (~) or
mozilla directory, and can be called .mozconfig or mozconfig. The environment variable MOZCONFIG can be used to specify an arbitrary file.
nsChromeRegistry.cpp:2693: error: prototype for `nsresult
nsChromeRegistry::UninstallPackage(const PRUnichar*, int)' does not match any in class `nsChromeRegistry'
As above for Firefox 0.9.3 and earlier.
fatal error C1601: unsupported inline assembly opcode
Mozilla code makes some usage of inline assembly code with optional cpu-specific instructions. Unless specified otherwise, cpu in use is determined automatically but the assembler must be able to understand the optimizations. If, e.g. cpu is a P4 (SSE2-compatible) and unpatched MS Visual Studio 6 is used, the MS Macro Assembler (ml.exe) will fail to compile unsupported SSE2 instructions. Preferred solution is to apply MS Processor Pack 5 for VC++, available for free at Microsoft's site (administrator rights may be needed).
fatal error C1600: unsupported data type in jidctint.c
Solution same as bove
- some toolbar icons, toolbar text fields are broken (when compiling with MS Visual Studio 6)
You have put -O2 compile optimization in .mozconfig or mozconfig.txt.. This optimization option doesn't work well with old versions of Visual Studio. Use
ac_add_options --enable-optimize="-O1" instead or disable optimization.
xxx file doesn't exist
One possible reason is that .mozconfig doesn't exist or is in the wrong place. First check whether .mozconfig exists at browser/config/mozconfig. Additionally, for Win32, mozconfig.txt must point to the above path by using the following line :
- Official Build Information
- Firefox Build Instructions 
- General Mozilla Build Instructions 
- Howto guides from the community
- Building Firefox on Linux 
- Building Firefox on Win32 using Visual Studio .NET instead of v6.0 
- Building Firefox on Win32 using the free mingw compiler 
- Building Firefox on Win32 using the free Microsoft tools (.NET) 
- Getting Help
- Mozillazine Forum for Third Party Builders 
- Mozillazine Forum for Official Builds