Uncategorized

How to install Chromium (Google Chome) on Gentoo Linux

Update: As of 27th August the buildbot now provides 64-bit builds. Thanks Jeff :)

The other day I was surfing the web and read an article about Google Chrome in some sort of hacking competition – this then prompted me to check out Google’s progress on porting Google Chrome to Linux and Mac. For those that don’t know Google Chrome is Google’s attempt at making a browser. So far it seems like a really good attempt.

It seems as though lately the Linux builds (I ignored the Mac stuff – but I hear it’s getting good too) seem to be getting to a usable state. Definitely not finished, definitely buggy, but usable. So, like any other Gentooer, I began trying to find out how to get it.

Step 1) Any ebuilds out there?

Why bother do hard work myself if somebody’s already put it in portage? With some google-fu it seems as though there are a couple ebuilds. One by the French, and another by the Chinese. The French one (have not tested) is available in the `THE` overlay, available by doing layman -a THE. The chinese one seems to be called “Shellex-overlay”, and can be accessed here. I’m not quite sure what the French one does as the ebuild didn’t really like my amd64 system (note: Google Chrome only supports 32-bit as of writing). However the Chinese one fared better and provided me with a binary. If you are on a 32-bit system (x86) you should try those ebuilds.

If you don’t want to compile from source, check the depencies list just a bit further down, then check out the build bot. Note: the build bot provides binaries for Windows, Linux AND Mac, so if you’re on a Mac, you’re in luck!

For more information, you should visit the Chromium Linux Building page.

Under `Prerequisites`, it lists down the dependencies as packaged by the Ubuntu system. Here is the list of dependencies as what Gentoo calls them:

  • Python >= 2.4
  • Perl >= 5.x
  • gcc >= 4.2
  • bison >= 2.3
  • flex >= 2.5.34
  • gperf >= 3.0.3
  • pkgconfig >= 0.20
  • nss >= 3.12
  • gconf
  • glib
  • gtk-engines-murrine
  • nspr
  • corefonts
  • freetype
  • cairo
  • dbus

Their version requirements are listed as needed.

Step 2) What about 64-bit systems?

There are several techniques of getting Chromium on a 64-bit system. However no matter what, I highly recommend that you create a 32-bit chroot. If you want to track each library individually and symlink your system to hell (as I first attempted), be my guest, but you’re wasting your time. So, first create a chroot by following this nifty guide.

Once you’ve got your chroot up, you can either try out the ebuilds I mentioned before, compile it yourself from source (via Google’s instructions) or be lazy and grab the binary from the Chromium build bot. I have tested the latter two techniques (can’t trust the French nor the Chinese!). To compile it yourself from source, follow the Chromium Linux Building page. Note: you will require quite a bit of HD space (the sources tarball itself is 640MB+), I also suggest you bootstrap from the tarball, the subversion checkout seems a lot longer and a waste of time really. Finally, if you’re just interested in getting the binary and running Chrome (not development), I would do use Release mode (see the building page for instructions). Of course, after making sure you have the dependencies I listed above, you should have Chrome compiled!

If you’re lazy and don’t want to compile, there is a build bot.

Step 3) Run Chromium on Linux!

At this stage, you should have the Chrome binary (either by compiling from source or ebuild, or getting the build bot binary). Now you just have to run the program and enjoy. If you’re running using the chroot, you should use the xhost hack. Do xhost local:localhost outside the chroot, then try run the binary again. Obviously you don’t want to waste time setting up X in the chroot.

Finally, here is a screenshot of Chromium running on Fluxbox! (I normally use KDE, but I wanted a more lightweight WM when compiling Chromium) You might also consider doing nice -n 10 when compiling if you want to continue doing your stuff. In fact, I’m running Chrome right now on KDE to write this post. It’s very fast, uses about 1% CPU, separates itself into different processes per tab, and so far seems pretty “stable”. However I have found that opening a file browse dialog (eg: in an upload form) makes Chromium jump up to about 50% CPU, which sucks.


Any thanks, issues or problems feel free to ask.

Spread the love
Tagged: , , , , , , , ,

12 Comments

  1. ahh don’t bother publishing the previous post, I realized I jumped inadvertently the relevant section.

    too much coffee

  2. @p.: I agree with .yankee on this one. Google Chrome is still relatively a very new browser whereas Mozilla Firefox’s development has spanned back quite a while. It isn’t right to compare them – obviously Firefox is a lot more mature: as can be seen by all the plugins, themes, tweaks, mods, patches, etc. Chrome being fresh is introducing a lot of new ideas (eg: google gears, one process per tab) but lacks Firefox’s maturity.

    Which one do I prefer at the moment? That I can answer. At the moment I prefer Chrome.

    It’s funny how leaving IE behind raises your expectations of browsers. I personally now find Firefox quite bulky.

  3. I recently tried out Google Chrome on my Macbook. The Mac OS X version ran fairly well, but there were a few small glitches and disappointing things that made the experience not as enjoyable as it might otherwise have been.

    Overall I think that the Google developers have a decent start on a browser, but it needs more than fancy new tab effects to make it work. It needs more addons, and in that respect it really can’t compete with good old Firefox. :)

    Nathan

  4. @Ryan: haha, looking back at it I guess it isn’t French. I’m not sure what made me say it was :)

    …always a good sport to poke fun at the French nevertheless.

Leave a Reply

Your email address will not be published. Required fields are marked *