MacOSX:Fix some plugins invalid to self built Gecko browser

General discussion about web technology.
Post Reply
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

MacOSX:Fix some plugins invalid to self built Gecko browser

Post by barbaz »

Just discovered this today when I went to check that my Adobe Shockwave for Director was still good. I hope the following information will save someone else some significant headaches.

Problem: Switched from official Firefox/SeaMonkey releases to self builds. Self built Firefox or SeaMonkey on Mac OS X does not register all plugins, and/or some plugins don't run but just display as white area. Other browsers, including official Firefox/SeaMonkey release builds and Safari, recognize the plugins just fine.
pluginreg.dat shows these plugins in the Invalid section even though the plugin files are unchanged from when they worked.
New profile doesn't help, and re-generating pluginreg.dat results in the plugins that were previously there but not working, not even listed.
(In my case, was QuickTime Plugin and Shockwave for Director that didn't register)

Cause: Browser build is mac64 only - not universal binary - and these plugins are trying to load in 32 bit mode but can't.

Solution: Rebuild the browser as a universal binary.
The instructions on MDN seem incomplete, and there are some annoying bugs in the build system that you can't work around when building universal binary, so here is the .mozconfig I used to build SeaMonkey "2.28.4-unofficial" on Mac OS X Lion, Xcode 4.4.1 + commandline tools, topsrcdir is /srv/seamonkey/comm-esr31:

Code: Select all

mk_add_options MOZ_OBJDIR=/srv/seamonkey/comm-esr31/objdir

# Big Hack that unsets CC / CXX so that mozconfig.common doesn't get
# mixed up with host/target CPUs when trying to work out how to do the
# universal build. When we redo the build system (bug 648979) this will
# go away.
if test -e "$topsrcdir/suite/config/version.txt"; then
  unset CC
  unset CXX
fi

. $topsrcdir/build/macosx/universal/mozconfig

ac_add_options --enable-application=suite

export CFLAGS="-gdwarf-2"
export CXXFLAGS="-gdwarf-2"

# For NSS symbols
export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-debug-symbols="-gdwarf-2"

ac_add_options --without-ccache

# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j4"
You need to make the following symlink, to account for the mozconfigs in the source tree being written for older Xcode:

Code: Select all

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer /Developer
All set to build, that should take about an hour.
Then re-package:

Code: Select all

make -C ./x86_64 package
Install the new build and all plugins should be working. :)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Windows NT 5.2; rv:33.0) Gecko/20100101 SeaMonkey/2.30
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: MacOSX:Fix some plugins invalid to self built Gecko brow

Post by barbaz »

for those coming here from a search who want to self build current SeaMonkey, the above mozconfig won't work with current SeaMonkey on some Macs, you'll get a really obscure build error; see http://forums.mozillazine.org/viewtopic ... &t=2935217.
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply