- GNU Make (Anything reasonably recent)
- GNU g++ (4.9.x)
- git (>= 1.6.0)
- Perl (Anything reasonably recent)
- For mergedeps.pl, which automatically inserts included headers in source files into the make dependencies.
- Python 2.6, epydoc
- If you're having issues with Boost on Ubuntu, check boost ticket #3844.
- Doxygen 1.7.1
- protocol buffers
- java and javac (>= 1.7.0_25)
To get a working toolchain on Debian (and probably Ubuntu), this used to be sufficient:
aptitude install build-essential git-core doxygen libboost1.42-all-dev libpcre3-dev protobuf-compiler libprotobuf-dev libcrypto++-dev libevent-dev
To get a working toolchain on SUSE Linux Enterprise or openSUSE perform the following steps:
zypper rm libevent-1_4-2 *boost*
zypper install mpfr-devel glibc-devel-32bit doxygen scons libzip-devel libbz2-devel pcre-devel *boost*1_44*
Install from sources: libevent-2.0.20-stable, protobuf-2.4.1, cryptopp560, gcc-4.4.6
Here are some toolchain installation commands that have worked for other members of the community on different systems:
|Ubuntu 15.04 /|
apt-get install build-essential git-core doxygen=
For Core Developers
For those with r+w access to the repository on GitHub, which currently hosts our git repository, clone from here for write access:
git submodule update retrieves additional repos needed to build RAMCloud, such as
ln -s command arranges for various consistency checks to run during commits, such as ensuring the absence of carriage returns)
For Read-Only Access
Use the same instructions as above, except replace "email@example.com:PlatformLab/RAMCloud.git" with "https://github.com/PlatformLab/RAMCloud.git" in the
git clone command. With this approach you don't need to have r+w access to the repository on GitHub, and you can't push commits to the repository. With read-only access, you can send us patches, or we can pull them from your repository.
Object files and executables will appear in the subdirectory
xxx is your current branch (typically
master). By default, RAMCloud compiles with debugging symbols, which slows the system down considerably. If you want to make performance measurements, recompile without debugging symbols:
This shouldn't be necessary any more on the Stanford cluster, as /etc/skel/.bashrc now includes the line. -Diego 2012-04-15
Update your LD_LIBRARY_PATH to include /usr/local/lib. If you do not do so, you'll get cryptic errors claiming libramcloud.so cannot be found. It can, but some of its dependencies in /usr/local/lib cannot. Do the following:
make- build the RAMCloud server and client software
- Replace 'master' with the git local branch name you are on if it is not 'master'
make tests- build and run RAMCloud unit tests (requires CppUnit)
make check- currently runs Google style checker against files in the src directory; subject to check as style evolves
We have a comprehensive style guide for how code should be formatted in RAMCloud. Actually, we don't quite follow what that style guide says, but we do keep a consistent style.
If you use GNU EMACS this configuration can help.
Commit Style Rules
Obviously, you can do anything you want on your own clones.
You can also do anything you want to your own branches on fiz, including rewriting their histories in any way. (If you're working with someone else on a branch on fiz, you might want to use stricter rules.)
An issue below roughly means a logically independent change to the code base.
For any pushes into the master branch on fiz:
- No commit should include changes for multiple issues. (Each commit in the push should complete or work towards a single issue.)
- Pushes should complete any issues they start, but individual commits within a push do not need to complete an issue.
- If at all possible, each commit should represent a version of the system that actually works (e.g., passes all unit tests and runs simple apps and system tests). This is important so that people can use
git bisectto hunt down the commit that caused a bug: if commits are broken,
git bisectwon't work.
- All commit messages should be meaningful without looking at the diff. (By reading a commit message, you should get some idea of what was modified and what the intent was. If you can't fit this in one line, skip a line and then write more.)
Speed Up Build
Put the following lines in the file `private/MakefragPrivateTop`:
Running Under Valgrind
Compiling unit test:
Running unit test: The 'master' part in 'obj.master' could be replaced your git branch name.
Running system test with valgrind: Use 'scripts/cluster.py', which posts RAMCloud tasks into the server cluster, with '–valgrind'. Use '–valgrindArgs' to pass the options to valgrind:
Running With Google's Sanitizers
There are currently three Sanitizers available in the build option: AddressSanitizer (ASan), ThreadSanitizer (TSan) and UndefinedBehaviorSanitizer (UBSan). They can be enabled with the SANITIZER symbol. Different Sanitizers are not consistent with each other, so there can be only one Sanitizer enabled at a time.
Building RAMCloud and unit tests with ASan: Similarly, replace 'address' with 'thread' or 'undefined' to enable TSan or UBSan respectively.
Running unit tests and system tests are the same as usual once RAMCloud and the respective test files are compiled with the Sanitizer.
For more information (e.g., the kinds of bugs each Sanitizer can find, bug report format, additional runtime options, etc.), see: https://github.com/google/sanitizers/wiki
Additional Sanity Checks
Before pushing to the master branch on fiz it is generally a good idea to make sure your changes haven't caused regressions in the recovery system.
recovery.py runs a small but complete recovery. See Running Recoveries with recovery.py for details on testing more complicated recoveries with this tool.
- run.py runs a variety of messed up failure scenarios that try to exercise the system. As the system is able to tolerate more scenarios they will be added to this test suite.