Loading

Compiling Firefox 3 jemalloc build on Windows XP

So I was there trying to build Firefox 3 beta 5 with optimizations. I got several errors.I was able to compile Firefox 1.5 series and the Firefox 2 series. But quite a lot seems to have changed since then and luckily for the better. I remember of the times when the only way to fix errors was to spend time reading endless threads at mozillazine or just wait long enough to get lucky. And if you bad luck struck real hard you’ll start the build and wait till the end to get the fatal error.

Then the great developers at Mozilla came out with this package consisting of the Mozilla build tools. All you do it download and install it. It has all the opensource components which the build environment requires. So far so good.

Recently Mozilla decided to dump the native memory allocator of Visual Studio in favour of jemalloc, the default allocator for the FreeBSD libc. The decision rests upon the claims that jemalloc performs better and reduces memory fragmentation. So I set up all the tools required and one after the other cleared all errors, some easy others sending me crazy.

Basically the official build documentation doesn’t mention that you need to include the path of the Vista SDK manually. This will keep you going till the end until firefox.exe is compiled and an error occurs relating to firefox.ico. Essentially the version of rc.exe in Visual Studio 2005 is older and the right version is in the SDK. Thus SDKs bin directory whould be earlier in the path.

After several errors this was a bummer.

Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.

WINHEAP=YES RTC=YES BLD_REL_NO_DBINFO= BLD_MODEL=dll BLD_DLL=1 OBJDIR=build\intel\dll_obj CPP_OBJDIR=build\intel\dll_obj\cpp_obj PURE_OBJDIR=build\intel\dll_obj\pure_obj CLR_OBJDIR=build\intel\dll_obj\clr_obj TARGET_CPU=i386 HOST_CPU=i386 VCTOOLSINC=”E:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include” PRE_BLD=0 POST_BLD=1 & cd .
‘WINHEAP’ is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1073: don’t know how to make ‘build\intel\dll_obj\_setargv.obj’
Stop.
make[4]: *** [src/build/intel/mozcrt19.dll] Error 2
make[4]: Leaving directory `/e/mozbuild/mozilla/FFBIN/memory/jemalloc’
make[3]: *** [libs_tier_base] Error 2
make[3]: Leaving directory `/e/mozbuild/mozilla/FFBIN’
make[2]: *** [tier_base] Error 2
make[2]: Leaving directory `/e/mozbuild/mozilla/FFBIN’
make[1]: *** [default] Error 2
make[1]: Leaving directory `/e/mozbuild/mozilla/FFBIN’
make: *** [build] Error 2

Now why would nmake throw this error? Nmake is not supposed to be in the picture. Essentially I found out that service pack 1 for Visual Studio 2005 is required to get rid of this. Essentially this only occured when enabling jemalloc in the build. By the time I spent on this and the frustration I experienced, I was lucky that this error came within the first minute of starting the build. I have now submitted a request to have this mentioned at the build documentation.

What’s your favourite error? Sometimes you just have to find a way to spend time with them.

Bookmark & Share —

Search for More

Loading...

Leave a Comment

Previous post:

Next post: