Linking the Libzip and Json C to chiventure on CSIL machines - uchicago-cs/chiventure GitHub Wiki

As libzip and json-c aren't installed on the CSIL machines, linking these libraries is different from linking other libraries Chiventure has that are installed to the system directory (such as Criterion, LibYAML, etc.).

Right now, a workaround is to checkout this repositories and then point pCMake to the local folders that will be stored in your home directory on the CSIL machines. This document will describe how to achieve the local library linking process.

Step 1: Set up a directory to store your installations in

cd ~
mkdir libfiles
cd libfiles
mkdir json-c
mkdir libzip

Step 2: download, make, and install json-c

cd ~
git clone https://github.com/json-c/json-c.git
mkdir json-c-build
cd json-c-build
cmake -DCMAKE_INSTALL_PREFIX=~/libfiles/json-c ../json-c
make
make test
make install

Step 3: download, make, and install libzip

cd ~
git clone https://github.com/nih-at/libzip.git
mkdir libzip-build
cd libzip-build/
cmake -DCMAKE_INSTALL_PREFIX=~/libfiles/libzip ../libzip
make
make test
make install

Step 4: From inside chiventure/build, run

cmake -DJSONC_INCLUDE_DIR="~/libfiles/json-c/include/json-c/" -DJSONC_LIBRARY=~/libfiles/json-c/lib/libjson-c.so -DLIBZIP_INCLUDE_DIR="~/libfiles/libzip/include/" -DLIBZIP_LIBRARY=~/libfiles/libzip/lib/libzip.so ..

You should now be able to make & test as usual.