blob: 34ae78575c5ef22ec1c80230cdedcbafef5ce267 [file] [log] [blame]
Alexander Afanasyev7099ffb2012-10-16 20:42:11 -07001Installing boost libraries
2==========================
3
4Normally, to compile and install boost libraries in non-privileged mode, you would need to issue following commands (e.g., for boost version 1.51.0)::
5
6 export BOOSTDIR=/home/non-privileged-user/boost
7
8 wget http://downloads.sourceforge.net/project/boost/boost/1.51.0/boost_1_51_0.tar.bz2
9 tar jxf boost_1_51_0.tar.bz2
10 cd boost_1_51_0
11 ./bootstrap.sh
12 ./b2 --prefix=$BOOSTDIR install
13
14However, after the following steps you may still not able to use ndnSIM.
15
16Common pitfalls
17---------------
18
19The common pitfalls is with boost iostreams library, which is failed to build because of missing bzip2 library.
20This problem can be easily fixed by downloading and installing bzip2 library, e.g., using the following steps::
21
22 wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
23 tar zxf bzip2-1.0.6.tar.gz
24 cd bzip2-1.0.6
25 make PREFIX=$BOOSTDIR CFLAGS="-fPIC -O2 -g" install
26
27Afte bzip2 library is installed, you may recompile and reinstall boost libraries using custom compilation flags::
28
29 ./b2 --prefix=$BOOSTDIR cxxflags=-I$BOOSTDIR/include linkflags=-L$BOOSTDIR/lib install
30
31Alternatively, you can solve this particular problem by installing development package for bzip2 library (if you have root access). For example, on Ubuntu 12.04 it would be the following command::
32
33 sudo apt-get install libbz2-dev
34
35And then compiling and installing boost without custom compilation flags::
36
37 ./b2 --prefix=$BOOSTDIR
38
39
40Compiling NS-3 with custom boost libraries
41==========================================
42
43The following commands should allow compilation and run of NS-3 simulations with custom install of boost libraries::
44
45 cd <ns-3>
46 ./waf configure --boost-includes=$BOOSTDIR/include --boost-libs=$BOOSTDIR/lib --enable-examples --enable-ndn-plugins=topology,mobility
47 LD_LIBRARY_PATH=$BOOSTDIR/lib NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple
48
49.. note::
50 `LD_LIBRARY_PATH=$BOOSTDIR/lib` is necessary on Linux platform in order for the dynamic linker to find libraries installed in a location different from one of the folders specified in /etc/ld.so.conf.