Software\’s whipping boy

October 21, 2005

How to build Flock

Filed under: Uncategorized — rslomkow @ 2:05 pm

How do I build flock from source?

Well first you need to be familiar with building software, but you probably are if you are looking at this page.

First you need the mozilla build requirements. If you cannot build mozilla, you cannot build

Additional restrictions: on Windows we have only testing with Microsoft Visual Studio .NET 2003. I have been told that didn’t work for someone who tried with a different compiler.

Quick buiild

Quick way: If you have everything setup to be able to build mozilla.
Download flock-source-0.4.9-complete.tar

*NOTE on Windows you will need to set the followin environment variables

$ CC=cl ; CXX=cl ; export CC CXX

Everyone needs the following steps

$ tar xvf flock-source-0.4.9-complete.tar
$ cd flock-source-0.4.9-complete
$ sh ./

This will probably take over an hour (possibly several hours) depending on how fast your computer is.

Building by hand

This assumes you are a pretty advanced developer and familiar with UN*X tools. First make sure you have all of the requirements listed below. Download all of the source code files and the Patch into the same directory, from now on I will refer to this directory as src_dir

  • Windows needs to use cl to compile clucene
    CC=cl; CXX=cl; export CC CXX
  • FreeBSD needs a patch for cairo
    I am hoping the need for this will go away as this goes into mainstream Firefox
  1. Mozilla development requirements:
  2. Mozilla Firefox Beta 2 source code:
  3. Flock MPL source code:
  4. Flock GPL source code:
  5. Clucene 0.8.13 source code:
  6. Flock Clucene Patch:

Now to build

  1. Get the Mozilla build requirements for your platform!
  2. unpack Firefox Beta 2 source code (this must be done first as flock over-writes some files from this)
    tar xjf firefox-1.5b2-source.tar.bz2
  3. Make a directory called “local” at the same level as the mozilla directory
    mkdir local
  4. unpack Flock MPL source code
    tar xzf flock-0.4.8-strict_mpl.tar.gz
  5. unpack Flock GPL source code
    tar xzf flock-0.4.8-gpl.tar.gz
  6. unpack Clucene source code
    tar xzf clucene-0.8.13-src.tar.gz
  7. apply the Flock Clucene Patch to the clucene code
    patch -p0
  8. change into the clucene directory
    cd clucene-0.8.13
  9. configure Clucene with the prefix of the local directory
    ./configure –prefix=src_dir/local
  10. build clucene and install it
    make && make install
  11. change to the mozilla directory
    cd src_dir; cd mozilla
  12. configure mozilla
  13. make
  14. when this succeeds (75 minutes on laptop)
  1. Linux: files executable is ./dist/bin/flock
    cd ./dist/bin; ./flock
  2. Windows: executable is ./dist/bin/flock.exe
    cd ./dist/bin; ./flock.exe
  3. MacOS: executable is ./dist/
    cd ./dist; open

That should be it. The first thing to try if you run into problems is to make sure you can build firefox
with the instructions from:



  1. […] Robin posts about how to build flock. […]

    Pingback by » Flock Release — October 21, 2005 @ 6:55 pm

  2. The download link for flock 0.4.9 tarball seems to be invalid. Would you check on that?

    Comment by Jeongkyu Kim — October 21, 2005 @ 8:29 pm

  3. sorry about that 0.4.9 is not out just yet…..

    should still work

    Comment by Robin * Slomkowski — October 21, 2005 @ 8:33 pm

  4. The quick build scirpt in 0.4.9 tarball looks great, but it doesn’t work for me on Windows. Does it only work for *nix platform at this stage?

    Comment by Jeongkyu Kim — October 22, 2005 @ 3:02 am

  5. I just built it on windows, it does need to run under cygwin (as does the mozilla build system).

    If you could run it with

    sh -x ./ > build.log 2>&1 and send/post the log somwhere
    I will happily debug it.

    Comment by Robin * Slomkowski — October 22, 2005 @ 6:35 am

  6. When I ran the script from cygwin, clucene was configured to build with g++, so I got ‘libclucene.a’ instead of ‘libclucene.lib’.

    Am I missing something here?

    Comment by Jeongkyu Kim — October 22, 2005 @ 10:11 am

  7. […] I think Jeong Kyu is the probably the first person out there to build flock outside the company, and now with Robin’s instructions it should be possible for more people to give it a try. […]

    Pingback by » Open, as in Source. — October 22, 2005 @ 3:48 pm

  8. Ha, I suss’d it.

    My environment on windows I set


    I will update the build instruction accordingly!

    Comment by Robin * Slomkowski — October 23, 2005 @ 5:27 am

  9. […] Today I downloaded Flock 0.4.9 source and started compiling on my home pc mac running Gentoo. […]

    Pingback by Gopalarathnam’s Weblog » Building Flock on Gentoo/PPC — November 6, 2005 @ 3:18 pm

  10. […] Today I downloaded Flock 0.4.9 source and started compiling on my home pc mac running Gentoo. […]

    Pingback by » Blog Archive » Building Flock on Gentoo/PPC — December 23, 2005 @ 4:58 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Blog at

%d bloggers like this: