You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



FizzillaCFM

This is the home of the fully Carbon, fully Mac, fully CFM (Code Fragment Manager) version of Fizzilla. This is different from the Mach-O Fizzilla build.

Contents


Setting Up The Environment

The Fizilla CFM build uses the same CodeWarrior Pro 7 build tools as the Classic build. You can read about them on the Mac build page.

Working with Multiple Environments

If you have another version of CodeWarrior installed (to build the OS9 mozilla, for example), you need to make sure that the correct version is launched or you will run into problems since it won't be able to find the correct Universal Headers.

The easiest way to accomplish this is to have each environment on a separate disk image. Create a 500MB image for each environment, that should be plenty of space. When you want to build, make sure only the correct image is mounted and then you are guaranteed that the correct CodeWarrior will be launched.

If you do not want to work with disk images, launch the appropriate version of ToolServer, MacPerl, and CodeWarrior prior to building, and make sure you quit any others that might be running. Since the Finder checks to see if an app is running prior to launching another, by having them already running you guarantee the correct environment is selected.


Pulling and Building

Next, you need to pull the source. Familiarity with the way our build system works (perl, etc) is highly recommended. Note: Make sure tinderbox shows green in the Mac columns before you begin your pull, else you'll end up with something that won't even build without Carbon, let alone with it. There is a Fizzilla tinderbox on the Ports page. You should check that as well. (Thank you very much to Skip Levens from Apple for getting us the hardware).

Once you have the source, tweak your settings so that you build with carbon

1.

In your Prefs folder, there is a file called "Mozilla [debug/opt] build prefs". Open up this file with a text editor and add the line:

options carbon 1

anywhere w/in the file. This will do things like define TARGET_CARBON and ensure you build the Carbon targets in certain projets.

2.

If you are building the commercial product (Netscape/AOL internal people only), you need to do one more step if and only if you are building on MacOSX. Add the line:

PERL_COPIES_DIST 1

in your Netscape (not mozilla) build prefs. This tells MacPerl to copy dist, not send an appleEvent to the Finder, which for some reason doesn't work on OSX.


Debugging

You've got a bug that the mac weenies say only happens in the Fizzilla build. You've got several options at your disposal.

First, try to duplicate the problem in MacOS 9. Boot into OS9 and run the fizzilla build just like the classic build. While we don't QA it, it works pretty well and might be enough to reproduce your problem (it usually is). If you see the bug here, consider yourself lucky -- you can use the standard Pro5 debugger and debug like the classic build.

If that doesn't work, you can try to deduce the problem from stack traces. The stack traces from the OSX CrashReporter app are pretty good at tracking down a problem. Usually, a crash that only happens on MacOSX and not OS9 is a null pointer or something failing to load correctly. Make sure you are checking error codes and pointers before you call through them. A common crash happens because someone passes null to strlen(). While this is fine on OS9, it's deadly on OSX.

If you still haven't found the answer, take a page from the X-heads and use printf(). If you're using the debug build, the printf's will show up in the SIOUX console window, just like OS9. If you're using the optimized build, printf's show up in the OSX console (use the console application to view the console messages).

If all else fails, use the Pro7 debugger. The problem is, getting all the pieces together can be difficult, and this is complicated by the fact that Pro7 has yet to be released to the general public. If you have exhausted all other options, ask someone in MacDev about this. Hopefully by the time you really need it, we'll have all the issues worked out.

TIP: Remember while you're working in OSX, you can make changes to the app with Pro5 running in the classic environment and then run fizzilla natively. The turnaround is much faster than booting back and forth between OS9 and OSX.


FAQ

Can I build on Mac OS X?

Absolutely! As of MacOSX 10.0.4, you can pull and build entirely from within MacOSX, though the apps will run in the Classic OS9 environment. We don't recommend pulling on OSX if you are running a version prior to 10.0.4. I've found that booting back into OS9 is the fastest and most reliable way to build fizzilla, but YMMV.

I'm building on OSX and I get "Can't open header file XYZ" errors. What's wrong?

There are intermittant problems with the classic environement that Pro5 runs inside on OSX. I have found that Force Quitting the classic environment (quitting all running classic apps isn't enough, you have to kill the environment as a whole) and resuming the build solves this issue. Hopefully Pro7 won't have this problem since it runs natively.

The build keeps telling me to insert the disk image with the source on it, but it's already mounted. What's wrong?

If you use a disk image to hold your source, aliases created in one OS don't correctly resolve when you boot into the other OS. For example, if you do a build in OS9 and then boot into OSX, the aliases in dist won't correctly resolve to your source disk image. You have to throw away mozilla/dist and rebuild to regenerate the aliases and make the annoying dialogs go away.

When I'm building commercial on OSX and MacPerl dies trying to copy dist. What's wrong?

See step #2 of the build instructions above.

My build hangs when running an opt build on OSX. How do I fix it?

There seems to be a problem with the console stub library in the optimized build that can cause the app to lock up when it tries to assert. The solution is to remove the NSConsoleDebug.shlb.

How do I see where it crashed?

In Mac OS 10.1, you can set preferences in the Console application to have it show crash lots. In 10.0.4 add the following line:

CRASHREPORTER=-YES-

to your /etc/hostconfig file. You need to be root to do this and changes take effect after a full reboot (to start it w/out rebooting, run /usr/libexec/CrashReporter from a terminal). Now when the app crashes, it will ask you if you want to see the log. Note that the crash is appended to the end of the log, but the window has a tendency to open at the top of the log.

What If It Still Doesn't Work?

There are two places to go for help building Fizzilla:

  • the #mozilla channel at irc.mozilla.org is a good place to find some mac weenies in real time who, if you ask nicely and don't be a pest, will happily get you on your way
  • post to the newsgroup netscape.public.mozilla.macosx

written by Mike Pinkerton (pinkerton@netscape.com)