Ben Laurie blathering

Porting Chromium to FreeBSD

In my copious spare time, I’ve started work on a FreeBSD port of Chromium. So far it doesn’t even build, but I’ve identified a few problem areas people might like to pitch in on.

  • NSS port: the FreeBSD NSS port needs to be upgraded to at least NSS 3.12. Ideally to the latest version because it fixes some security holes.
  • Sound: mostly whatever Linux does it likely to be the right thing for FreeBSD, too, so much of the porting work at this stage is pretty mechanical. But sound isn’t – the Linux port uses ALSA, which FreeBSD has no truck with. I am informed that the right thing to use on FreeBSD is OSS. But someone needs to do that.
  • Build farm: building this sucker is slow. I wouldn’t mind having access to a nice big build farm.

So far none of the work has been committed, but I am optimistic that some will be soon. In the meantime, you’ll be needing some patches.

There’ll probably be another patch soon – I’m going through the rest of the code right now getting the parts that don’t need NSS or ALSA building.

In order to build this lot, you’ll need to configure like this:

cd src && GYP_GENERATORS=make python tools/gyp/gyp_chromium -D 'OS=freebsd' -D 'use_system_libxml=1' build/all.gyp

and build using gmake:

cd src && gmake chrome

Right now anything that fails on NSS or ALSA I’m just manually removing from the .mk files.

You’ll also need a bunch of ports installed, here’s what my notes currently say

Python >= 2.4       (lang/python24, lang/python25, lang/python26, lang/python30)
Perl >= 5.x         (lang/perl5.6, lang/perl5.8, lang/perl5.10)
gcc/g++ >= 4.2      (lang/gcc42, lang/gcc43, lang/gcc44, lang/gcc45)
g++-multilib >=4.2  (?)
bison >= 2.3        (devel/bison == 2.4.1)
flex >= 2.5.34      (base system: 2.5.4 - oops?)
gperf >= 3.0.3      (lang/gperf - NB: base system has /usr/bin/gperf == 2.7.2, port installs /usr/local/bin/gperf)
pkg-config >= 0.20  (devel/pkg-config == 0.23)
libnss3-dev >= 3.12 (security/nss == 3.11.9_2 - hand install?)
libgconf2-dev       (devel/gconf2)
libglib2.0-dev      (devel/glib20)
libgtk2.0-dev       (x11-toolkits/gtk20)
libnspr4-0d >= 4.7.1+1.9-0ubuntu0.8.04.5 (ubuntu0.8.04.1 causes duplicate dtoa references)   (devel/nspr?)
libnspr4-dev >= 4.7.1+1.9-0ubuntu0.8.04.5  (devel/nspr)
msttcorefonts (Microsoft fonts)
freetype-dev        (print/freetype)
libcairo2-dev       (no port!)
libdbus-1-dev       (devel/dbus)

Get in touch if you want to help. Or join the chromium-dev mailing list and pitch in.


  1. g++-multilib seems to install a library for multilib or multi-arch support and the cairo libraries should be installed by the graphics/cairo port in FreeBSD. Also, the system flex and gperf are up to date on FreeBSD 7.2, I suspect yours are older cuz you’re on FreeBSD 6.

    Comment by sprewell — 31 Aug 2009 @ 2:06

  2. Hi Ben,

    I’ve had a crack at upgrading FreeBSD ports’ security/nss tonight. It seems to be working for me, but it needs more testing. I took it up to 3.12.4:


    Comment by Aragon — 31 Aug 2009 @ 20:39

  3. […] Plačiau […]

    Pingback by Chromium naršyklė FreeBSD sistemoje | — 3 Sep 2009 @ 10:26

  4. Hello,

    About ALSA:
    you could try to port only libasound, from

    Then, it should be possible to redirect every ALSA call to OSS with the following lines in $PREFIX/etc/asound.conf:

    pcm.!default {
    type oss
    device /dev/dsp

    ctl.!default {
    type oss
    device /dev/mixer

    Good luck!

    Th. Thomas.

    Comment by Thierry Thomas — 4 Sep 2009 @ 20:33

  5. […] Laurie has started porting Chromium (the open source project behind the Google Chrome browser) to FreeBSD. In my copious spare time, […]

    Pingback by Porting Chromium to FreeBSD | FreeBSD - the unknown Giant — 30 Nov 2009 @ 23:49

  6. Hi;
    I just contacted the devel/icu maintainer regarding the missing platform.h header. He suggested we use icu4, which will eventually replace icu. It has the desired header.

    Comment by Pedro Giffuni — 16 Jan 2010 @ 2:14

  7. […] Ben Laurie started work on a FreeBSD port of Chromium, and Sprewell applied the finishing touches. Peter Valchev maintains an OpenBSD port based in part on Sprewell’s port, and there is a NetBSD project as well. […]

    Pingback by Chromium Browser on FreeBSD lacks only the right set of extensions | Linux and Open Source | — 1 Nov 2010 @ 16:17

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress