This is a step by step process about “Compiling djondb on Mac”, this will cover all the steps, if you already have installed one of the tools (for example home brew) then you can skip the step and move to the next one.
If you have any trouble, please let us know in the comment section, this will be updated with any new release or change to the process.
The first step is to install the xcode and the xcode command line tools, this will allow you to compile, debug, etc. It’s a prerequisite for home brew and djondb. XCode and XCode command line tools can be downloaded from apple’s developer page.
The next step will install home brew, if you already have brew installed in your system please do: “brew doctor” to check that everything is ok.
Some of the tools required by compilation scrips will be installed using Home brew, this is a very good installation manager for OSX. The full installation instructions are in the home brew page, basically it will lead you to execute:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Once it’s installed please execute the command: brew doctor, which will check for anything that could be wrong on brew and fix the suggestions made by it.
Now with brew installed you could install some tools that will be used later:
brew install cmake brew install git brew install boost
Download the code
djondb source code is available at github, to download it just execute:
git clone firstname.lastname@example.org:djondb/djondb.git cd djondb git checkout devel
This compilation process is available at the current development branch, later this will be transferred to the master branch.
This step will take around 15 minutes, it will compile the djondb dependencies. These dependencies will be sit at third_party/libs and third_party/includes folders.
cd <djondb dir>/db make dependencies
The final step will build djondb.
cd <djondb dir>/db mkdir build cd build cmake .. make sudo make install
Ready, one final step and everything will be set.
Make data dir
the data folder is where djondb files will be created, so you will need to create it.
cd <djondb dir>/db/third_party sudo sh prepareDir.sh
Done, you are ready to test, run or change the code of djondb.