The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search

Building Fizzilla

by Mike Pinkerton
last modified on 2/23/2000

Note, this is not complete.

How to build...

There are 3 major steps to setup and build:

  • Download, build, and install gLib
  • Download, build, and install libIDL
  • Download, tweak, tweak, and build Mozilla.


Building glib-1.2.6

http://www.gtk.org/

1. Download

2. Extract

  • % gzip -d -c glib-1.2.6.tar.gz | tar xvf -
  • % cd glib-1.2.6/

3. Workaround cpp bug - Radar #2398808: "Macros with Variable Numbers of Arguments (## args) don't work."

  • % setenv CFLAGS -traditional-cpp

4. Build

  •  % ./configure --host=powerpc-apple-rhapsody10.0
  • % make

5. Install (you need to be root)

  • % su root
  • # make install
  • # exit
  • % cd ..


Building libIDL-0.6.8

http://hpux.cs.utah.edu/hppd/hpux/Gtk/libIDL-0.6.8/

(note: why are we getting the HP/UX version? There has got to be a better one out there)

1. Download

2. Extract

  • % gzip -d -c libIDL-0.6.8-ss-11.00.tar.gz | tar xvf -
  • % cd libIDL-0.6.8/

3. Disable HP/UX Patches

  • % mv HPUX.Install HPUX.Install.not

4. Workaround cpp bug - Radar #2398808: "Macros with Variable Numbers of Arguments (## args) don't work."

  • % setenv CFLAGS -traditional-cpp

5. Build

  • % ./configure --host=powerpc-apple-rhapsody10.0
  • % make

6. Install

  • % su root
  • # make install
    • (ignore "rename libIDL-0.6.sl.4.4 to libIDL.sl: No such file or directory")
  • # exit
  • % cd ..
 

Warning:

At this point we have created a version of libIDL that will not correctly generate constants in header files. Mozilla will not build. Check the newsgroups for how we are going to solve this or a workaround.


Building mozilla-source-M10

http://www.mozilla.org/

 

1. Download

ftp://ftp.mozilla.org/pub/mozilla/releases/m10/src/mozilla-source-M10.tar.gz

 

2. Extract

% gzip -d -c mozilla-source-M10.tar.gz | tar xvf -

% cd mozilla/

 

3. Workaround for <math.h> bug

Radar #2381837: "symbol "exception" defined in both <new.h> and <math.h>"

% su root

# patch -p0 < ../math_h.patch

# exit

 

4. Patch Mozilla for Mac OS X

% patch -p1 < ../macosx-mozilla-M10.patch

(this step isn't really necessary once we fix the bug in libIDL)

 

5. Install PowerPlant header files, required by Carbon 'widget'

% cp your_PowerPlant_folder/PP_Macros.h widget/src/mac/

% cp your_PowerPlant_folder/PP_Messages.h widget/src/mac/

% cp your_PowerPlant_folder/PP_Types.h widget/src/mac/

 

6. Build, Pass 1

% ./configure --host=powerpc-apple-rhapsody10.0 --disable-tests

% make

(will stop on "duplicate case value `nsIPref::ePrefInt'" error)

 

7. Workaround for IDL compiler bug

The IDL compiler is broken. When an IDL file says "const long foo = 1234", the generated header file says "enum { foo = 0 }". The constant has the value 0, which is incorrect.

 

% patch -p1 < ../macosx-mozillaM10-headers.patch

Now we need to rebuild part of xpcom...

% cd xpcom/components/

% rm *.o

(don't 'make clean', or else you'll wipe out patched headers)

% make

% cd ../build/

(now you're in mozilla/xpcom/build/)

% make

% cd ../../

(back to top-level directory)

 

8. Build, Pass 2

% make

(will stop in 'widget', being unable to find library gfx_macDYLIB)

 

9. Rebuild 'gfx' as a dylib

Here's the deal: 'gfx' should be a Mach-O dynamic library. However, something somewhere attempts to load in 'gfx' manually. You end up with the error "nsNativeComponentLoader: GetFactory(libgfx_mac.dylib) Load FAILED with error: Undefined error: 0", because all Mozilla components are assumed to be Mach-O bundle files, not Mach-O dynamic library files. The workaround is to build 'gfx' first as a bundle file, to satisfy whatever part of Mozilla is trying to load it in, then rebuild it as a dylib under a different name, so that 'widget' will be able to link against it later. The result is "gfx_mac.dylib", which is a bundle, and "gfx_macDYLIB.dylib", which is an actual dylib. Not pretty, but it'll do for now.

 

% cd gfx/src/mac

% emacs Makefile

* Comment out the line "DSO_LDOPTS = -bundle"

* Change the LIBRARY_NAME to "gfx_macDYLIB"

% make

% cd ../../../

(back to top-level directory)

 

10. Build, Pass 3

% make

(will stop in 'editor', which is ok)

 

11. Build the viewer app

% cd webshell/tests/viewer/

% make

% cd ../../../

(back to top-level directory)

 

12. Workaround for current NSPR config

% cd dist/bin

% ln -s . Rhapsody10.0_DBG.OBJ

 

13. Run

% ./viewer


written by Mike Pinkerton (pinkerton@netscape.com)

Copyright © 1998-2000 The Mozilla Organization.
Last modified February 23, 2000.