Solutions to typical compiling errors: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(Add common search terms to text)
(More info on mozconfigs, more logical presentation (I hope), add links to build information)
Line 1: Line 1:
During a typical compilation (or build) process, there are quite a few errors where an inexperienced builder may stumble upon. Here are a few of them:
=== Common Errors ===


*In <code>mozilla/profile/src</code>:<br><code> nsProfile.cpp: In member function `virtual nsresult<br>  nsProfile::StartupWithArgs(nsICmdLineService*, int)':<br>nsProfile.cpp:415: error: `SelectLocaleForProfile' undeclared (first use this function)</code><br><br>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. Commonly caused by the .mozconfig file not being read by client.mk. Your .mozconfig should be in your home (~) or <code>mozilla</code> directory, and can be called .mozconfig or mozconfig. Or use the environment variable MOZCONFIG to specify an arbitrary file. See [http://www.mozilla.org/projects/firefox/build.html] for further mozconfig setup information. (Firefox 1.0PR).
During a typical compilation (or build) process, there are quite a few errors an inexperienced builder may stumble upon. Here are a few of them:
 
*In <code>mozilla/profile/src</code>:<br><code> nsProfile.cpp: In member function `virtual nsresult<br>  nsProfile::StartupWithArgs(nsICmdLineService*, int)':<br>nsProfile.cpp:415: error: `SelectLocaleForProfile' undeclared (first use this function)</code><br><br>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.<br><br>Common causes:
**You have attempted to compile using <code>./configure; make</code>. The Firefox build process is autoconf based and controlled by an options file called <code>.mozconfig</code>. See the Firefox build instructions for information on how to set up your .mozconfig [http://www.mozilla.org/projects/firefox/build.html]. Firefox should be compiled with the command <code>make -f client.mk build</code> in the <code>mozilla</code> directory.
**You have a .mozconfig file but it is in the wrong location. Your .mozconfig should be in your home (~) or <code>mozilla</code> directory, and can be called .mozconfig or mozconfig. The environment variable MOZCONFIG can be used to specify an arbitrary file.


*In <code>mozilla/rdf/chrome</code>:<br><code>nsChromeRegistry.cpp:2693: error: prototype for `nsresult<br>nsChromeRegistry::UninstallPackage(const PRUnichar*, int)' does not match any in class `nsChromeRegistry'</code><br><br>As above for Firefox 0.9.3 and earlier.
*In <code>mozilla/rdf/chrome</code>:<br><code>nsChromeRegistry.cpp:2693: error: prototype for `nsresult<br>nsChromeRegistry::UninstallPackage(const PRUnichar*, int)' does not match any in class `nsChromeRegistry'</code><br><br>As above for Firefox 0.9.3 and earlier.
Line 12: Line 16:


*<code>xxx file doesn't exist</code><br>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 :<br><code>. $topsrcdir/browser/config/mozconfig</code>
*<code>xxx file doesn't exist</code><br>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 :<br><code>. $topsrcdir/browser/config/mozconfig</code>
=== Building Information ===
*Offical Build Information
**Firefox Build Instructions [http://www.mozilla.org/projects/firefox/build.html]
**General Mozilla Build Instructions [http://www.mozilla.org/build/]
*Howto guides from the community
**Building Firefox on win32 using the free mingw compiler [http://gemal.dk/mozilla/build.html]
**Building Firefox on win32 using the free Microsoft tools (.NET) [http://pryan.org/firefox/TierMann/page/building/index.html] [http://iterator.besmirched.org/mozilla/mozbuild.html]
*Getting Help
**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]

Revision as of 13:23, 22 October 2004

Common Errors

During a typical 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
    Older MS assemblers don't support SSE2 assembly instructions. Solution is to apply Microsoft Processor Pack 5 for VC++ (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 (compiling with MS Visual Studio 6)
    -O2 optimization is buggy. In your .mozconfig, include ac_add_options -enable-optimize (defaults to -O1 optimization) 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

  • Offical Build Information
    • Firefox Build Instructions [2]
    • General Mozilla Build Instructions [3]
  • Howto guides from the community
    • Building Firefox on win32 using the free mingw compiler [4]
    • Building Firefox on win32 using the free Microsoft tools (.NET) [5] [6]
  • Getting Help
    • Mozillazine Forum for Third Party Builders [7]
    • Mozillazine Forum for Official Builds [8]