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
Flock.
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
http://downloads.flock.com/?product=flock-source-0.4.9-complete
*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 ./flock-build.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
- Mozilla development requirements:
http://developer.mozilla.org/en/docs/Build_Documentation
- Mozilla Firefox Beta 2 source code:
http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5b2/source/firefox-1.5b2-source.tar.bz2 - Flock MPL source code:
http://downloads.flock.com/?product=flock-source-0.4.8-mpl
- Flock GPL source code:
http://downloads.flock.com/?product=flock-source-0.4.8-gpl
- Clucene 0.8.13 source code:
http://sourceforge.net/projects/clucene - Flock Clucene Patch:
http://www.flock.com/developer/download/source/clucene-0.8.13.patch.0
Now to build
- Get the Mozilla build requirements for your platform!
- 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 - Make a directory called “local” at the same level as the mozilla directory
mkdir local - unpack Flock MPL source code
tar xzf flock-0.4.8-strict_mpl.tar.gz - unpack Flock GPL source code
tar xzf flock-0.4.8-gpl.tar.gz - unpack Clucene source code
tar xzf clucene-0.8.13-src.tar.gz - apply the Flock Clucene Patch to the clucene code
patch -p0 - change into the clucene directory
cd clucene-0.8.13 - configure Clucene with the prefix of the local directory
./configure –prefix=src_dir/local - build clucene and install it
make && make install - change to the mozilla directory
cd src_dir; cd mozilla - configure mozilla
./configure - make
make - when this succeeds (75 minutes on laptop)
- Linux: files executable is ./dist/bin/flock
cd ./dist/bin; ./flock - Windows: executable is ./dist/bin/flock.exe
cd ./dist/bin; ./flock.exe - MacOS: executable is ./dist/Flock.app
cd ./dist; open Flock.app
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: http://developer.mozilla.org/en/docs/Build_Documentation



[...] Robin posts about how to build flock. [...]
Pingback by ian.wordpress.com » Flock Release — October 21, 2005 @ 6:55 pm
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
sorry about that 0.4.9 is not out just yet…..
http://downloads.flock.com/?product=flock-source-0.4.8-complete
should still work
Comment by Robin * Slomkowski — October 21, 2005 @ 8:33 pm
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
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-flock.sh > 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
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
[...] 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 ian.wordpress.com » Open, as in Source. — October 22, 2005 @ 3:48 pm
Ha, I suss’d it.
My environment on windows I set
CC=cl
CXX=cl
I will update the build instruction accordingly!
Comment by Robin * Slomkowski — October 23, 2005 @ 5:27 am
[...] 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
[...] Today I downloaded Flock 0.4.9 source and started compiling on my home pc mac running Gentoo. [...]
Pingback by gopalarathnam.com » Blog Archive » Building Flock on Gentoo/PPC — December 23, 2005 @ 4:58 pm