Fetching contributors…
Cannot retrieve contributors at this time
107 lines (72 sloc) 2.45 KB

Ubuntu 16.04

Create lclsrc group, modify /usr/local/* to allow group members to write:

# Create a lclsrc group
sudo /usr/sbin/groupadd --system lclsrc

# Add this user to the group (will need to re-login)
sudo usermod -a -G lclsrc $USER

# Change the group ownership of /usr/local to lclsrc
sudo chgrp -R lclsrc /usr/local
sudo chmod -R g+rw /usr/local
sudo find /usr/local -type d -exec chmod g+s {} \;

Setup Git

sudo apt-get update
sudo apt-get install autoconf automake libtool curl make cmake g++ unzip
sudo apt-get install git arcanist
arc install-certificate
git config --global ""
git config --global "Your Name"
git clone
sudo apt-get install plantuml

If you plan on building bonsai-simulink, skip down to the section titled Build with Static Dependencies and proceed from there


sudo apt-get install libboost-dev libboost-coroutine-dev libboost-program-options-dev


sudo apt-get install libcpprest-dev

Protobuf 3.4 -

cd /usr/local/src
git clone
cd protobuf
git checkout 3.4.x
sudo make install
sudo ldconfig # refresh shared library cache.


sudo apt-get install python3-pip



To build the library run ./, this will create a ./build folder with the dynamic and static libraries.

General Installation

Install by running make install from the build directory.

cd ./build
make install

Build With Static Dependencies

In some cases, it may be desirable to build libbonsai with as few shared object dependencies as possible. For example, when building a library to be loaded into another application or framework which may have hard dependencies on other versions of some of the same libraries upon which libbonsai depends.

To force static linkage internal to both libbonsai.a and, do the following:

cd lib
cd ..
mkdir build
cd build

NB: may take quite some time, as it needs to download and build all dependent libraries from source. This is required to produce position independent code in the object files comprising libbonsai's library dependencies.