Solutions to typical compiling errors: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
m (category)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
''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 [http://forums.mozillazine.org/viewtopic.php?t=169070 forum discussion] for information.
''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 [http://forums.mozillazine.org/viewtopic.php?t=169070 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:
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:
Line 30: Line 30:
**Mozillazine Forum for Third Party Builders [http://forums.mozillazine.org/viewforum.php?f=42]
**Mozillazine Forum for Third Party Builders [http://forums.mozillazine.org/viewforum.php?f=42]
**Mozillazine Forum for Official Builds [http://forums.mozillazine.org/viewforum.php?f=23]
**Mozillazine Forum for Official Builds [http://forums.mozillazine.org/viewforum.php?f=23]
[[Category:Development]]

Latest revision as of 22:43, 22 October 2005

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:

  • In mozilla/profile/src:
    nsProfile.cpp: In member function `virtual nsresult
    nsProfile::StartupWithArgs(nsICmdLineService*, int)':
    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.

    Common causes:
    • 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 [1]. Firefox should be compiled with the command make -f client.mk build in the mozilla directory.
    • 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.
  • In mozilla/rdf/chrome:
    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 :
    . $topsrcdir/browser/config/mozconfig

Building Information

  • Official Build Information
    • Firefox Build Instructions [2]
    • General Mozilla Build Instructions [3]
  • Howto guides from the community
    • Building Firefox on Linux [4]
    • Building Firefox on Win32 using Visual Studio .NET instead of v6.0 [5]
    • Building Firefox on Win32 using the free mingw compiler [6]
    • Building Firefox on Win32 using the free Microsoft tools (.NET) [7]
  • Getting Help
    • Mozillazine Forum for Third Party Builders [8]
    • Mozillazine Forum for Official Builds [9]