The Next Step in DVCS



Building SourceGear Veracity under Linux


Introduction

This document provides instructions on building Veracity on two of the most common Linux distributions (Ubuntu and Fedora). Ubuntu is the distribution used by our Linux-oriented developers, and is the only Linux build we test as the moment. While there's nothing specifically preventing you from building Veracity elsewhere, we're not (yet) able to help you.


If you are running a recent Ubuntu version (9 or above) or the latest Fedora (Fedora 14), and are comfortable installing a few packages, this document should get you on your way to a working Veracity build.


Getting/Unpacking the Source

Retrieve the latest Veracity tarball from sourcegear


Unpack it under the directory of your choice - for brevity, we'll pretend you unpacked it under ~/v, and so your source tree begins at ~/v/veracity


Prerequisites

Ubuntu Packages


These packages should all be installed in the standard way, e.g.

sudo apt-get install zlib1g-dev

Install the following packages in this manner:

Fedora Packages

There packages should all be installed through yum, e.g.

sudo yum install cmake

Install the following packages:

Other Third-Party Dependencies

Under Linux, you'll need to get the SpiderMonkey JavaScript engine. To do so, cd to ~/v/veracity/thirdparty and run the following:

./build_linux.sh

This script downloads the SpiderMonkey source code, builds it, and "installs" it to a new folder in ~/v/vv-thirdparty, which it creates.


Creating the Build Directory

cmake will handle the creation of Makefiles, etc. You just need to give it a place to work.


For example, let's create a ~/v/debug, a neighbor of our source directory.


cd to this folder, then run:

cmake -G "Unix Makefiles" ../veracity

... or, if you'd also like an Eclipse project:

cmake -G "Eclipse CDT4 - Unix Makefiles" ../veracity

(Installing Eclipse is left as an exercise to the reader.)


Building Veracity

You now have a build tree, replete with Makefiles. You'll only need to run the top-level one. So:

cd ~/v/debug
make

Updating your PATH to find Veracity Command Line Tools

To make your life easier at this point, you'll want to add the following to your PATH:

~/v/debug/src/cmd
~/v/debug/src/script

the homes of vv (the Veracity command-line app) and vscript (the scripting engine), respectively.


Running the Test Suite

To run the test suite:

cd ~/v/debug
make test

All tests should pass, with any exceptions noted on our known issues page.