Sunday, November 02, 2008

The status of Chromium on Linux

When Chromium was first announced in the beginning of September I was very surprised that it was a Windows only application given that WebKit is very much cross platform. The past few weeks I have been spending a little bit of time here and there hacking on the source code and thought I would write an update for those who are interested on the status of the native port of Chromium on Linux.

On day one you could checkout the source code on Linux and you could build some things. Of course all that you were building were some object files, nothing more, not even Webkit was being built. There was no test application, no linking and no Chrome.

From what I can tell nearly all of the development for Chrome was done on Windows in Visual Studio. There is even a c# tool that can be found in the sources. This lead to the case where the normal course of action when something didn't build on Linux was to just disable it. So by the time that the release was made nearly nothing was being built. I am also pretty sure that the Chromium port was entirely different then the Android port

Starting with the glue directory I went file by file fixing the compiler errors. Developed in Windows there was fun fixes such as the Windows "String.h" include that was not used, but caused build breakage on non-Windows platforms. Many patches later a lot more builds and Linux. Linux is part of the build farm so as each file was fixed and enabled it became one more file that Windows developers could not break or their change would be reverted. The Chromium developers had also been syncing up with WebKit trunk and so the Chromium fork of WebKit also built. Attempting to link a test application we found only 500 missing symbols. Tracking these down one by one and either porting, fixing or adding a stub the test application finally linked about a week ago. It can't do anything and will crash, but that is where we are. (update: Pointed out by Evan as of Friday it can render

Beyond a webkit test application, Chrome on Linux is far away from happening. There are still a large number of basic components such as fonts, clipboard, plugins, and basic widget handling that have to be implemented. The test application is only a test for WebKit. In the next month or so you should be able to see WebKit rendering and at some point next year a beta of Chrome on Linux will be running, but it wont be tomorrow or next week.

Sharing some of the same code OS X is in the same boat, but they are a little better because they can re-use the OS X WebKit code, they currently can render pages, but can't do things like click on links.

Things are not as bad as they sound. The Chromium team is a good team that is moving forward quickly. As they integrate more with upstream WebKit more of the Linux port will work. They are also re-writing chunks of their code to be more cross platform friendly. And now that OS X is kinda working and Linux links there is a lot more interest in putting developer time on the Linux port to get things done.

An important lesson that Google should take away from this is the importance of developing cross platform software on all platforms at the same time. Assigning just one guy six months ago to the Linux port would have significantly improved the source on day 1. Having the build bot catch errors early such as using a Windows only function rather then a C function pays off in developing cross platform code. The sad thing is that any company that does cross platform development could have told them this without them having to learn it the hard way.

If you are interested in helping with Chromium and want to hack in git rather than on svn, an official mirror that is updated every other minute is now on github:

I have written up getting started instructions and created a script to upload (and update) patches from git here:

Thanks to the guys on #chromium-dev who are very patient and helpful.

Popular Posts