Wednesday, May 06, 2009

Google Chromium (the open source chrome browser) on Gentoo!

Chromium is not yet complete no matter what I say here. Please do not post bugs or assume this is the final version of chromium. It still lacks a lot of features. My intension here is to only show you how you can get started on building chrome in Gentoo.

Google chromium project has come a long way. I have been building chromium once in a while but it was not stable and was slow until recently. But now I am using it as my primary browser (well there are some exceptions as I will explain later)! It is better than my firefox experience (at least in linux).

To get started head over to this link. First you will need to have all the prerequisites. In ubuntu it is pretty easy. On gentoo we need the gentoo package equivalents of all the prerequisites. Here is the list of things I mapped from ubuntu packages to Gentoo.

* Python >= 2.4 ---> python
* Perl >= 5.x --> perl
* gcc/g++ >= 4.2 --> gcc
* g++-multilib >=4.2 --> ?
* bison >= 2.3 --> bison
* flex >= 2.5.34 --> flex
* gperf >= 3.0.3 --> gperf
* pkg-config >= 0.20 --> pkgconfig
* libnss3-dev >= 3.12 --> nss
* libgconf2-dev --> gconf
* libglib2.0-dev --> glib
* libgtk2.0-dev --> gtk-engines-murrine
* libnspr4-0d >= 4.7.1+1.9-0ubuntu0.8.04.5 --> nspr
* libnspr4-dev >= 4.7.1+1.9-0ubuntu0.8.04.5 --> nspr
* msttcorefonts (Microsoft fonts) --> corefonts
* freetype-dev --> freetype
* libcairo2-dev --> cairo
* libdbus-1-dev --> dbus

The packages I left with a question mark are the ones that I did not how they get mapped on gentoo. Make sure you have installed all the packages with the minimum version required as specified. If you are running 64 bit OS you will probably need to install more packages. See here for 64 bit OS. I was able to build chrome in 64 bit ubuntu following those instructions, so I assume it should be fairly easy to build on 64 bit gentoo. Once you have all the dependencies, it is pretty straight forward.

Get the source code from here. I did not bootstrap from the tarball, because I found the svn checkout easier. But I would suggest that you do use the tarball. It will save a lot of time. Believe me. Following svn instructions, you will need to download depot tools. I downloaded the tools to ~/workspace/c/chrome/chromium/depot_tools. So all the instructions will use that directory.

Next you will need to configure the client and download the code using the following commands.

~/workspace/c/chrome/chromium $ ./depot_tools/gclient config http://src.chromium.org/svn/trunk/src http://chromium-status.appspot.com/lkgr

~/workspace/c/chrome/chromium $ ./depot_tools/gclient sync

This will take a really REALLY REALLY long time. Once you have the code you are ready to build.

~/workspace/c/chrome/chromium $ cd src/build

~/workspace/c/chrome/chromium/src/build $ nice -n 10 ../../depot_tools/hammer --mode=Release app

I niced it a little bit to keep my computer usable for other tasks while it is compiling. The compile will go on for a long time. If everything went without a hitch you will have your chrome browser in ~/workspace/c/chrome/chromium/src/sconsbuild/Release/chrome. Yay! Go ahead take it for a ride. You will be pleasantly surprised to see how much already works.

I ran some chrome experiments to gauge the performance and it is pretty good. Perhaps not as good as on windows, but definitely good. I did not do any firefox to chrome comparisons, so cannot comment much on that. The only downside of chrome browser is that it lacks flash at this point. So no youtube for you. But hey I can use firefox for that. A lot of things still don't work. For example ctrl-alt-t doesn't work. A lot of the options don't still work. Bookmarks have problems, etc. etc.

Here are some screen shots of chromium running in linux.


Post a Comment