during the last months I've been trying on my spare time to port firefox3 to Irix. I started with a vanilla firefox3 source package, without using any other patches, and tried to compile using latest nekoware gcc. Unfortunately I have failed, but have reached to a point which I should share. The package compiles cleanly, but segfaults when running.
Here are the steps to compile firefox 3.0.1 on Irix using gcc:
- Change configure to get the gcc version correctly, otherwise unrelated things break while running configure. Related bug: 449671. Also change configure so that -rpath-link is converted to -rpath, the proper ld option for Irix. Change configure to comment out -Wall in CFLAGS and CXXFLAGS in the -irix6 part because warnings stop the compilation.Related patch.
- Apply jsgc.c patch because MAP_ANONYMOUS is not implemented on Irix.
- Apply the xptcall refactoring patch for Irix. Related bug: 443234.
- Apply xpcom_glue_standalone_Makefile.in.diff so that the gtkEmbed related stuff is built. Bugs related: 444500, 298044.
- Patch widget/src/gtk2/nsWindow.cpp because Irix doesn't have XFree86 includes. Related bug: 449695.
- Patch toolkit/xre/nsNativeAppSupportUnix.cpp to replace non ANSI C functions setenv() and unsetenv() with their glib counterparts. Related bug: 449702.
- Patch gfx/src/thebes/nsThebesDeviceContext.cpp to replace round() with NS_round(). Irix doesn't provide round() but rint() for rounding. Related bug: 449718.
- Fix the various Makefiles by applying Makefiles-for-Irix.patch. It fixes issues like gp_overflow(5) for the linker, removes some hardsetted -mips3 flags, fixes order of libraries on the ld command etc...
- Enforce my CFLAGS for NSS too that doesn't respect them, by applying nss-enforce-cflags.diff.
My .mozconfig file is the following:
Code: Select all
PERL=/usr/nekoware/bin/perl
CFLAGS='-UR4000 -mips4'; export CFLAGS
CXXFLAGS=-mips4; export CXXFLAGS
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj1-@CONFIG_GUESS@
ac_add_options --enable-application=browser
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --disable-dbus
ac_add_options --disable-javaxpcom
ac_add_options --disable-optimize
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
ac_add_options --enable-system-cairo
ac_add_options --disable-gnomevfs
ac_add_options --disable-gnomeui
ac_add_options --disable-plugins
ac_add_options --disable-accessibility
ac_add_options --disable-inspector-apis
ac_add_options --disable-pref-extensions
ac_add_options --disable-extensions
ac_add_options --disable-installer
ac_add_options --disable-updater
ac_add_options --disable-parental-controls
ac_add_options --enable-debug
Various notes:
- The package compiles but doesn't run. Many tests pass but others fail miserably (some xpcshell tests), and no debugger can help me. dbx 7.3.7 segfaults badly, gdb 6.3 reports a corrupted stack and gdb 6.8 hangs. Similar misbehavior when debugging the core files. I ended up debugging the debugger but had no luck... That's the primary reason for my failure.
- To compile --with-system-png, the neko_libpng should be patched to support APNG.
- I was using latest versions for cairo,glib,gtk,libpixman,pango. They all compiled easily under gcc, with the following small quirks in case you want to build them:
- libpixman needed a small patch, but should now be fixed upstream.
- glib also needed a small patch, but this fix I think has landed to trunk, not to the stable branch.
- I compiled cairo succesfully with --enable-glitz! This option exists also for firefox3. Imagine how nice it would be to have that beast accelerated with OpenGL...
- TODO: compile with other compilers. Latest gcc or SGI cc. Find a fast system for the job, my miserable O2 was too slow, needed a full day for an unoptimized build.
That is all for now! I wish you better luck. Thanks to all the people who helped me one way or the other (joerg, alver on the IRC, nekonoko for the package updates). I will be out of town for a long time, so don't be insulted if it takes some time to answer.