terriko: (Default)
[personal profile] terriko
This is my (slightly cranky) record of building Firefox. I am reminded of why I don't do much open source dev directly on my mac -- documentation tends to be weak, and searching error messages yields many people being told by devs "I'm sorry, I don't have a mac to test this." Frustrating. Actually, I probably should have thrown more of the error messages into this document for those people... but I'm not going and breaking my build again to do that, so this is mostly for my own reference.

Mozilla does, a few layers deep, tell you that fink is not recommended for building Mozilla. It's buried in this document, but of course that came well after the "getting the source code" document which said fink was fine, and is surrounded by instructions on how to use fink. Oh well.

I had to upgrade fink to get Mercurial installed properly, so I'm feeling stubborn about it now and want to see if it can be done. So here's what I've had to do....


  1. Reinstall fink to get mercurial

  2. Get the source. Which takes a good long while, but takes even longer when it hangs the first time and you don't bother to fix it for an hour.

  3. Make a mozconfig file in the source directory. Mine currently contains:

    . $topsrcdir/browser/config/mozconfig
    mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-dbg
    mk_add_options MOZ_MAKE_FLAGS="-s -j4"
    ac_add_options --disable-optimize
    ac_add_options --enable-debug
    ac_add_options --enable-tests
    ac_add_options --disable-webm


    The very last line is because webm threw an error, and I didn't care enough to debug it just now.

  4. Then you can start trying to run make -f client.mk and see what breaks, such as webm as I mentioned above.

  5. You'll need autoconf2.13 because Mozilla is stuck in the past requires some features from it. The fink package is called autoconf2.13-legacy, and when you run fink -b install autoconf2.13-legacy it will install non-intuitively in /sw/lib/autoconf2.13 to avoid conflicts. I then added a link so that mozilla's default config file could find it:

    ln /sw/lib/autoconf2.13/bin/autoconf /sw/bin/autoconf2.13

  6. Next I was missing libIDL-2.0, which is libidl2 in fink. Yet another fink -b install libidl2 and some waiting.

  7. I thought my next problem is due to missing Java libraries, available from Apple, but it turns out that it was actually something else, so I have no idea if these are really necessary.

  8. The "something else" is that I don't have the 64bit libraries thanks to not having selected "64 bit only" when installing fink. Bank to reinstalling fink... *sigh*

    I'm awfully glad I started making this list, though, as I'm now going to have to go through it all again.

  9. Get some hideous error:

    IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure

    It seems related to this bug in python2.7, although it doesn't seem like it's python's fault so much as fink's if my python was build for 10...

    Fastest solution: uninstall python 2.7. Which uninstalls mercurial since it was based on 2.7, but I don't need to check anything in for a while and care more about having a functioning build atm.

  10. Over an hour of compiling later... Success! I can run TumucumaqueDebug.app (yes, that's Firefox) from obj-ff-uni/x86_64/dist -- not that this was helpfully given to me anywhere. After some fruitless directory clicking, I found it by searching for *.app.


Final mozconfig:

$topsrcdir/browser/config/mozconfig
. $topsrcdir/build/macosx/universal/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-uni
mk_add_options MOZ_MAKE_FLAGS="-s -j2"
mk_add_options MACOSX_DEPLOYMENT_TARGET=10.6
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --disable-webm

Profile

terriko: (Default)
terriko

June 2025

S M T W T F S
1234567
89 1011121314
15161718 19 20 21
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 23rd, 2025 05:17 am
Powered by Dreamwidth Studios