Skip to content

Latest commit

 

History

History
212 lines (163 loc) · 5.78 KB

BUILD.md

File metadata and controls

212 lines (163 loc) · 5.78 KB

Requirements

Required operating systems

  • CentOS 7.x or CentOS 8.x
  • SUSE 12SP2
  • Ubuntu 18.04LTS

Required compilers

  • GCC 4.8.5 or higher
  • CMake 3.3 or higher

Required libraries

  • boost-devel
  • boost-static

Build steps

CentOS and RedHat

  1. Prepair the environment.
# install gcc
yum groupinstall "Development Tools"
# install cmake
yum -y install cmake
# install more required libraries
yum -y install libpcap-devel boost-devel boost-static

# build and install libzmq
wget https://github.com/zeromq/libzmq/archive/v4.3.2.zip
unzip v4.3.2.zip
cd /path/to/unziped/dir
mkdir build && cd build
cmake ..
sudo make -j4 install

# build and install cppzmq
wget https://github.com/zeromq/cppzmq/archive/v4.6.0.zip
unzip v4.6.0.zip
cd /path/to/unziped/dir
mkdir build && cd build
cmake -DCPPZMQ_BUILD_TESTS=OFF ..
sudo make -j4 install
  1. build static libs of third parties from src code (links provided below) and copy the built libs to /path/cloud-probe/dep/unix/lib

Note: you can also get those libs built by us from below link for your convenience.

  1. Clone or download the project.
  2. Go to the project folder and build it.
cd /path/to/cloud-probe
mkdir build && cd build
cmake .. && make
  1. Check output binaries. There should be four files in the bin folder.
ls ../bin
gredemo*     gredump*     pcapcompare* pktminerg*

Debian and Ubuntu

  1. Prepair the environment.
# install gcc
apt-get -y install build-essential
# install cmake
apt-get -y install cmake
# install more required libraries
apt-get -y install libpcap-dev libboost-all-dev

# build and install libzmq
wget https://github.com/zeromq/libzmq/archive/v4.3.2.zip
unzip v4.3.2.zip
cd /path/to/unziped/dir
mkdir build && cd build
cmake ..
sudo make -j4 install

# build and install cppzmq
wget https://github.com/zeromq/cppzmq/archive/v4.6.0.zip
unzip v4.6.0.zip
cd /path/to/unziped/dir
mkdir build && cd build
cmake -DCPPZMQ_BUILD_TESTS=OFF ..
sudo make -j4 install
  1. build static libs of third parties from src code (links provided below) and copy the built libs to /path/cloud-probe/dep/unix/lib

Note: you can also get those libs built by us from below link for your convenience.

  1. Clone or download the project.
  2. Go to the project folder and build it.
cd /path/to/packet-agent
mkdir build && cd build
cmake .. -DPLATFORM_DEBIAN=ON && make
  1. Check output binaries. There should be four files in the bin folder.
ls ../bin
gredemo*     gredump*     pcapcompare* pktminerg*  probedaemon

SUSE

  1. Prepair the environment.
# install git
zypper -n install git-core
# install cmake
zypper -n install cmake
# install more required libraries
zypper -n install libpcap-devel boost-devel
zypper -n si boost
cd /usr/src/packages/SOURCES/
tar --bzip2 -xf boost_1_54_0.tar.bz2
cd  boost_1_54_0/
./bootstrap.sh
./b2 install stage 

# build and install libzmq
wget https://github.com/zeromq/libzmq/archive/v4.3.2.zip
unzip v4.3.2.zip
cd /path/to/unziped/dir
mkdir build && cd build
cmake ..
sudo make -j4 install

# build and install cppzmq
wget https://github.com/zeromq/cppzmq/archive/v4.6.0.zip
unzip v4.6.0.zip
cd /path/to/unziped/dir
mkdir build && cd build
cmake -DCPPZMQ_BUILD_TESTS=OFF ..
sudo make -j4 install
  1. build static libs of third parties from src code (links provided below) and copy the built libs to /path/cloud-probe/dep/unix/lib

Note: you can also get those libs built by us from below link for your convenience.

  1. Clone or download the project.
  2. Go to the project folder and build it.
cd /path/to/packet-agent
mkdir build && cd build
cmake ..  && make
  1. Check output binaries. There should be four files in the bin folder.
ls ../bin
gredemo*     gredump*     pcapcompare* pktminerg* probedaemon*

FAQ

CMake Error 51

CMake Error at /usr/local/Cellar/cmake/3.9.4/share/cmake/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "/usr/bin/cc" is not able to compile a simple test program.

A: Firstly, check that Xcode has been installed. Then make sure you have accepted the xcodebuild license.

sudo xcodebuild -license accept