Loom targets Ubuntu 12.04 and 14.04 (with gcc-4.8) systems and requires the distributions library. This guide describes how to install both loom and distributions.
WARNING loom does not work with gcc-4.9, so on ubuntu 14.04 systems,
export CC=gcc-4.8
export CXX=g++-4.8
# 1. Make a new virtualenv named 'loom'.
sudo apt-get install -y virtualenvwrapper
source ~/.bashrc # pulls 'mkvirtualenv' into path
mkvirtualenv --system-site-packages loom
# 2. Set environment variables.
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$VIRTUAL_ENV/lib' >> $VIRTUAL_ENV/bin/postactivate
echo 'export DISTRIBUTIONS_USE_PROTOBUF=1' >> $VIRTUAL_ENV/bin/postactivate
workon loom # pulls the above definitions into current environment
# 3. Clone the repos.
git clone https://github.com/posterior/distributions
git clone https://github.com/posterior/loom
# 4. Install required packages.
sudo easy_install pip
source loom/requirements.sh # uses apt and pip
# 5. Build distributions.
cd distributions
make && make install
cd ..
# 6. Build loom.
cd loom
make && make install
make test # optional, takes ~30 CPU minutes
cd ..
Make sure to workon loom
whenever you start a new bash session for looming.
If you prefer to avoid using virtualenvwrapper:
-
Set environment variables.
echo 'export DISTRIBUTIONS_USE_PROTOBUF=1' >> ~/.bashrc source ~/.bashrc
-
Build distributions and loom as above, but installing as root
sudo make install # instead of
make install
Loom assumes distributions is installed in a standard location.
You may need to set CMAKE_PREFIX_PATH
for loom to find distributions.
Within a virtualenv, both distributions and loom assume a prefix of
$VIRTUAL_ENV
. make install
installs headers to
$VIRTUAL_ENV/include
, libs to $VIRTUAL_ENV/lib
, and so on.
For distributions and loom to find these installed libraries at
runtime, LD_LIBRARY_PATH
must include $VIRTUAL_ENV/lib
. With
virtualenvwrapper, it's convenient to do this in a postactivate hook:
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$VIRTUAL_ENV/lib' >> $VIRTUAL_ENV/bin/postactivate