Google Gears on Amd64 in 300 seconds

Ok, I admit it could take you a bit more, especially if you don’t have the building tools already set…

If you are reading, you probably already know the issue: Google doesn’t provide and AMD64 version of Gears and you’re with yourself. Of course you can trust third-party xpi packages, or maybe you don’t want to.

Why compile? At least in my experience is easy, and you can see or have someone check the patch you are applying. I must admit checking for a patch outside its context may not be completely paranoic-proof, but at least you know gkovacs has not added some lines to phone your relevent details home. The patch he provided o me is nice and quite harmless, but you may want to check. I would like to thank him for his contribute

The usual disclaimer: follow the steps outlined at your risk. The patch is a third-party patch, and I don’t endorse it in any way. As for my patch, apply it at your own risk (basically it suppresses warnings,  so go figure)


Before installing the relevant tools but patch and subversion,  I strongly suggest you to check that the patch applies cleanly. Building tools are not known for poisoing any desktop computer but if you didn’t already install them chances are you don’t use them regularly, so  why trashing the system with useless stuff you’ll end not using because the patch is outdated?

  • patch (apt-get install patch) you’ll need this one to check if the patch applies cleanly.
  • Subversion (try out apt-get install subversion…you’ll need this or a similar tool to fetch the code from Google)
  • the patch itself (gcc-4.3 patch)
  • Google Gears Code (we’ll get it later on)

This stuff you won’t need having or installing until the patch is confirmed working:

  • to disable warning as errors. It’s a.bz2 file, you may like to rename it before using.
  • Building environment (hint a good start may be: apt-get install build-essentials and work out the missing rest)

Tools you don’t need

at least in my experience, sudo or a administrator account.

Ready on

$> cd yourpreferitedirectoryforcode

(from Google code)

$> svn checkout gears-read-only

and let it roll. This will fetch the latest code from googlecode and put it into gear-read-only/

$> cd gears-read-only/

and for the sake of simplicity move the patch in this directory (it won’t hurt). Before we go on, please note that the tool used to patch the code with the patch provided by gkovacs is named (guess what) patch.  It may be a little confusing at first, but a few times and you will learn to cope with phrases with multiple nested ‘patch’ words into them as you breath.

$ patch -p0  –dry-run <gears-gcc433.diff

you may also leave the patch where it is and run like

$ patch -p0  –dry-run <path-to-patch/bla/blaaa/blargh/gears-gcc433.diff

if the patch up-to-date with the google code, ou should get anything in place. If it complains about a file not found, you’re not in the right directory.  If it complains about a failed hunk, don’t go foward and search for an updated patch. To this point Google source code is untouched thanks to the –dry-run switch. There’s no need to revert the patch or download the source again. If patch does not complain:

$> patch -p0  <gears-gcc433.diff

$> make MODE=opt -j3

(see for make switches)

let it roll…it may stop and complain about a file called xpidl that is not executable…

$> chmod +x ../third_party/gecko_1.9/linux/gecko_sdk/bin/xpidl

$> make clean

and run make again

As mentionened in CeloGeek’s blog, choosing MODE=opt may stop your compilation as warnings are threated as errors. To avoid this, follow CeloGeek advice or apply my patch in gears-read-only/ with

$> bunzip2

$> patch -p0 –dry-run <

and if it does not complain:

$> patch -p0 <

then run make clean and make again (I’m not 100% is really useful to run make clean this time. Maybe not).

You *should* have the xpi file you need in find gears-read-only/gears/bin-opt/installers and you can install right away.