Parallel versions - richardclegg/xcpd GitHub Wiki

How to compile different versions of rofl and xdpd to coexist We're going to build in this example version 0.3 into /usr/local and version 0.4 into /usr/local4 Compile version 0.3

#set up directories and get code
mkdir code
cd code
git clone [email protected]:richardclegg/rofl-fork.git
git clone [email protected]:richardclegg/xdpd.git
cd rofl-fork
checkout devel-0.3
#If you use a modern version of autoconf you will need to
#edit configure.ac and remove -Werror from second line
sh autogen.sh
#If you had to do the edit this will produce warnings about subdir-objects
cd build
../configure --enable-debug
make
sudo make install
#now for xdpd
cd ~/code/xdpd
checkout devel-0.3
#If you use a modern version of autoconf you will need to edit 
# four different configure.ac files 
#as before but also 
#./src/xdpd/fwd-modules/gnu_linux/configure.ac
#./src/xdpd/fwd-modules/example/configure.ac
#./src/xdpd/fwd-modules/netfpga10g/configure.ac
sh autogen.sh
# again produces errors
cd build
../configure --enable-debug
make
sudo make install

Now compile version 0.4. We're going to put the code in code/rofl4 and code/xdpd4 and the libraries, binaries etc in /usr/local4

cd ~/code
sudo mkdir /usr/local4
sudo mkdir /usr/local4/bin
sudo mkdir /usr/local4/sbin
sudo mkdir /usr/local4/lib
sudo mkdir /usr/local4/include
git clone [email protected]:richardclegg/rofl-fork.git rofl4
git clone [email protected]:richardclegg/xdpd.git xdpd4
cd rofl4
git checkout devel-0.4
# As before you might need to edit configure.ac (in same way)
sh autogen.sh
cd build
../configure --enable-debug --prefix=/usr/local4
make
sudo make install
#This installs rofl v0.4 to /usr/local4
# now for xdpd 0.4
cd ~/code/xdpd4
# As before edit configure.ac if necessary (4 files this time)
sh autogen.sh
cd build
ROFL_LIBS=-L/usr/local4/lib ROFL_CFLAGS=-I/usr/local4/include ../configure --enable-debug --prefix=/usr/local4
make
sudo make install

You can now do sudo /usr/local/bin/xdpd --version or sudo /usr/local4/sbin/xdpd --version

⚠️ **GitHub.com Fallback** ⚠️