All Distance Sketch  0.1
All distance sketch based algorithms
Installation

Prerequisites

The package is designed to have fairly minimal requirements to build and use with your projects, but there are some. Currently, we support Linux based paltforms.

Linux Requirements

These are the base requirements to build and use the package (as described below):

  1. GNU-compatible Make
  2. GCC compiler (version >= 4.8.3)
  3. SNAP (https://snap.stanford.edu/snap/ version >= 2.3)
  4. Boost (http://www.boost.org/ version >= 1.58)
  5. Gtest (https://github.com/google/googletest)
  6. Protobuf compiler (https://developers.google.com/protocol-buffers/docs/downloads version >= 2.6.0)

Installation

The following documentation is correct to the day it was written. case you have problems with my instruction see the packages website for additional information.

Build Instructions for root users

All packages expect SNAP can be installed by running the following command from the directory you downloaded and unpacked the package

>./configure
>make
>make install
>make check

To install SNAP just run the following command from the unpacked directory:

>make all

Since SNAP build is local you need to indicate its location for this package build. You do it using the config.site file. See non root users and only place the details that are relevant to SNAP.

Build Instructions for non root users

The standard way to install packages when you don't have root privileges it to use the –prefix option when running the ./configure

>./configure --prefix=<path>

The above command will cause the package to be installed in the path given in the –prefix option. SNAP doesn't require any additional option and just type

>make all 

From the directory you unpacked the source. Since you installed the packages in you desired location you need to list them in a file that will allow the package to find them and link with them and this is where config.site comes into play. After you installed Gtest (in ${GTEST_DIR}), SNAP (in ${SNAP_DIR}) and PROTOBUF (in ${PROTO_DEST}) create a file named config.site (I ommit Boost but if you need to install it just do the same as the others).

The file should contain the location of SNAP and Gtest:

config.site content

CPPFLAGS="${CPPFLAGS} -I${GTEST_DIR}/include/ -I{SNAP_DIR}/snap-adv/ \
-I{SNAP_DIR}/snap-core/ -I{SNAP_DIR}/snap-exp/ -I{SNAP_DIR}/glib-core/ -I${PROTO_DEST}/include/" 
LIBS="${LIBS} {SNAP_DIR}/snap-core/Snap.o ${GTEST_DIR}/libgtest.a -lpthread"
LDFLAGS="${LDFLAGS} -L${PROTO_DEST}/lib"
PROTOC="${PROTO_DEST}/bin/protoc"
PKG_CONFIG_PATH="${PROTO_DEST}/lib/pkgconfig/" 

Example for a config.site

CPPFLAGS="${CPPFLAGS} -I/work/eng/eliavb/googletest-release-1.7.0/include/ -I/work/eng/eliavb/Snap-2.3/snap-adv/ -I/work/eng/eliavb/Snap-2.3/snap-core/ -I/work/eng/eliavb/Snap-2.3/snap-exp/ -I/work/eng/eliavb/Snap-2.3/glib-core/ -I/work/eng/eliavb/protobuf_install/include/" 
LIBS="${LIBS} /work/eng/eliavb/Snap-2.3/snap-core/Snap.o /work/eng/eliavb/googletest-release-1.7.0/libgtest.a -lpthread"
LDFLAGS="${LDFLAGS} -L/work/eng/eliavb/protobuf_install/lib/"
PROTOC="/work/eng/eliavb/protobuf_install/bin/protoc"

Case you enounter:

configure: error: Package requirements (protobuf >= 2.6.0) were not met:

No package 'protobuf' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Try changing the package config env variable using the following command:

export PKG_CONFIG_PATH='${PROTO_DEST}/lib/pkgconfig/'   

Case you encounter:

error while loading shared libraries: libprotobuf.so.9: cannot open shared object file: No such file or directory

Try:

export LD_LIBRARY_PATH="$LD_LIBRAY_PATH:${PROTO_DEST}/lib/" 

CONFIG_SITE

After the file was created we need to set an env variable named CONFIG_SITE to point to the config.site:

>export CONFIG_SITE=$CONFIG_SITE:<path>/config.site

BUILD! non root users

Suppose you placed the package in ${ADS_DIR} and want to install it in ${ADS_DEST}.

Enter to the ${ADS_DIR} and run:

>./configure --prefix=${ADS_DEST}
>make
>make install

Checking the install was a success non root users

Since this is not a root install we need to add the location of the proto lib

>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PROTO_DEST}/lib
>make check

BUILD! root users

Suppose you placed the package in ${ADS_DIR}.

Enter to the ${ADS_DIR} and run:

>./configure
>make
>make install
>make check