-
Notifications
You must be signed in to change notification settings - Fork 146
Prerequisites
Sumeet Chhetri edited this page Feb 24, 2020
·
7 revisions
Before trying to compile ffead-cpp make sure you have installed the following software packages,
- c++ compiler
- autotools/cmake
- openssl & openssl-devel (ssl libraries)
- zlib & zilb-devel
- libcurl
- concurrentqueue (https://github.com/cameron314/concurrentqueue)
- picohttpparser (https://github.com/h2o/picohttpparser) (customized)
- libyuarel (https://github.com/jacketizer/libyuarel) (customized)
To use the ORM feature provided by the sdorm module, you would also need a couple of additional libraries,
- unixodbc (for SQL databases)
- mongoc/bson (for mongodb)
- libuuid
To use the caching feature provided by the cache module, you need,
- libmemcached, libmemcachedutil and libmemcachedprotocol (for memcached)
- libhiredis (for redis)
Install libcuckoo header files
cd /tmp
wget https://github.com/efficient/libcuckoo/archive/master.zip
unzip master.zip
rm -f master.zip
cd /tmp/libcuckoo-master
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ .
make install
cd /tmp
rm -rf /tmp/libcuckoo-master
Dependency intsallation for Operating Systems
MAC OS X
#Make sure Xcode is installed or at-least the Command line tools are present
xcode-select --install
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg (for Mojave)
#Install homebrew first using,
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
#Install autoconf libtool automake
brew install autoconf libtool automake
#Install cmake
brew install cmake
#Install openssl
brew install openssl
#Install unixodbc
brew install unixodbc
#Install other libraries
brew install libmongoc
brew install hiredis
brew install libmemcached
BSD
If you have not installed sources during install of freebsd then,
fetch -o /tmp ftp://ftp.freebsd.org/pub/`uname -s`/releases/`uname -m`/`uname -r | cut -d'-' -f1,2`/src.txz
tar -C / -xvf /tmp/src.txz
portsnap fetch extract
cd /usr/ports/devel/cmake && make install
cd /usr/ports/security/openssl && make install
cd /usr/ports/databases/unixODBC && make install
cd /usr/ports/databases/hiredis && make install
cd /usr/ports/databases/libmemcached && make install
cd /usr/ports/ftp/wget && make install
cd /usr/ports/misc/e2fsprogs-libuuid && make install
Redhat/Centos
yum install -y --nogpgcheck tar centos-release-scl centos-release-scl-rh epel-release
yum install -y --nogpgcheck scl-utils devtoolset-7 cmake3 libcurl libcurl-devel openssl openssl-devel libuuid-devel hiredis hiredis-devel zlib zlib-devel libmemcached libmemcached-devel unixODBC* tar gzip wget nmap-ncat
scl enable devtoolset-7 bash
mv /usr/bin/cc /usr/bin/cc_old
ln -s /opt/rh/devtoolset-7/root/usr/bin/gcc /usr/bin/cc
ln -s /opt/rh/devtoolset-7/root/usr/bin/g++ /usr/bin/c++
ln -s /usr/bin/cmake3 /usr/bin/cmake
#Download and install mongo c driver
cd /tmp
wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.4.0/mongo-c-driver-1.4.0.tar.gz
tar xf mongo-c-driver-1.4.0.tar.gz
cd mongo-c-driver-1.4.0/ && \
./configure --prefix=/usr/local --libdir=/usr/local --disable-automatic-init-and-cleanup && \
make && make install
Ubuntu/Debian
apt update -yqq && apt install -yqq gcc g++ cmake unzip libssl-dev uuid-dev odbc-postgresql unixodbc unixodbc-dev libcurl4-openssl-dev libmemcached-dev libmongoc-dev libhiredis-dev wget netcat
Arch Linux
pacman -Sy --noconfirm make clang unixodbc curl hiredis libmemcached mongo-c-driver cmake openssh libutil-linux wget gnu-netcat tar gzip zlib unzip gawk procps-ng
Gentoo
emerge-webrsync
emerge dev-db/unixODBC curl dev-libs/hiredis libmemcached cmake wget netcat tar gzip zlib
#Download and install mongo c driver
cd /tmp
wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.4.0/mongo-c-driver-1.4.0.tar.gz
tar xf mongo-c-driver-1.4.0.tar.gz
cd mongo-c-driver-1.4.0/ && \
./configure --prefix=/usr/local --libdir=/usr/local --disable-automatic-init-and-cleanup && \
make && make install
OpenSuse
zypper in -y gcc gcc-c++ make cmake libcurl-devel hiredis-devel openssl openssl-devel libmemcached-devel zlib-devel libuuid-devel unixODBC unixODBC-devel unzip wget netcat-openbsd tar gzip
#Download and install mongo c driver
cd /tmp
wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.4.0/mongo-c-driver-1.4.0.tar.gz
tar xf mongo-c-driver-1.4.0.tar.gz
cd mongo-c-driver-1.4.0/ && \
./configure --prefix=/usr/local --libdir=/usr/local --disable-automatic-init-and-cleanup && \
make && make install
CYGWIN(x86)
To install dependencies on cygwin use the cygwin setup.exe/setup-x86.exe to add required packages, package names are,
gcc-g++
autoconf (select all 3 packages - Wrapper scripts, Script builder and Extension package of m4 macros)
automake (select all packages including versions 1.10 through to the recent one and the Wrapper scripts)
bison,yacc,flex,gdb,readline,binutils
libtool, libltdl
#Download ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.2.tar.gz
then "./configure" and "make install" as usual
#Download openssl source code from https://github.com/openssl/openssl
then "./configure" and "make install" as usual
#You can even downloand and build/install openssl/unixODBC yourself
MINGW(x86)
#Install mingw and msys
mingw-get update(command line)
#Then using the MinGW installation Manager or command line install the beloe mentioned packages
mingw-get install mingw-developer-toolkit(command line)
#Make sure you have autotools, autoconf, automake, libtool, libltdl, gcc, gcc-c++ installed
mingw-get install msys-base(command line)
mingw-get install mingw32-libpthreadgc(command line)
mingw-get install mingw32-libz(command line)
mingw-get install mingw32-zlib(command line)
#Download ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.2.tar.gz and make the following changes to the following files in the uniODBC distribution
- uodbc_extras.h (comment line 76 - extern int strncasecmp (const char *s1, const char *s2, int n );)
- include/ini.h (add the below lines before the last #endif
#define EOVERFLOW 139
#define EWOULDBLOCK EAGAIN
)
then "./configure" and "make install" as usual
#Download the latest source ditsribution from https://code.google.com/p/dlfcn-win32
then "./configure --enable-static=yes --enable-shared=yes" and "make install"
#Follow instructions at http://go.kblog.us/2009/07/mingw-porting-gnu-regex-to-windows.html to install libregex in mingw
#Follow instructions at https://qt-project.org/wiki/Compiling-OpenSSL-with-MinGW to install openssl libraries and development files in mingw
#Warning - installing msys regex/openssl libraries would not be useful here as we will be natively building ffead-cpp on mingw and hence we need mingw compiled libraries
MINGW-W64
Setup autoconf, automake and libtool, Download
http://ftp.gnu.org/gnu/autoconf/autoconf-2.65.tar.gz
http://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.gz
http://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz
extract each and run './configure --prefix=/mingw && make install'
Setup OpenSSL, Download and extract
https://github.com/openssl/openssl/releases
./Configure -—prefix=/mingw no-idea no-mdc2 no-rc5 shared mingw64
make depend && make && make install