Solutions to typical compiling errors

From MozillaZine Knowledge Base
Revision as of 12:48, 22 October 2004 by CrazyFred (talk | contribs) (Add most common build error (faulty mozconfig), tweak formatting)
Jump to navigationJump to search

During a typical compiling process, there are quite a few errors where an inexperienced builder may stumble upon. Here there 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. Commonly caused by the .mozconfig file not being read by client.mk. Your .mozconfig should be in your home (~) or mozilla directory, and can be called .mozconfig or mozconfig. Or use the environment variable MOZCONFIG to specify an arbitrary file. See [1] for further mozconfig setup information. (Firefox 1.0PR).
  • 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