Alexander Afanasyev | 6dbacda | 2012-10-23 17:20:18 -0700 | [diff] [blame] | 1 | FAQ |
| 2 | === |
| 3 | |
| 4 | Boost libraries |
| 5 | --------------- |
| 6 | |
Alexander Afanasyev | 326410e | 2013-03-09 20:39:11 -0800 | [diff] [blame] | 7 | .. note:: |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 8 | **My ubuntu/redhat/freebsd have an old version of boost libraries. How can I get the |
| 9 | latest one?** |
Alexander Afanasyev | 6dbacda | 2012-10-23 17:20:18 -0700 | [diff] [blame] | 10 | |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 11 | .. _Installing boost libraries: |
Alexander Afanasyev | 6dbacda | 2012-10-23 17:20:18 -0700 | [diff] [blame] | 12 | |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 13 | Installing boost libraries to ``/usr/local`` |
| 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Alexander Afanasyev | 6dbacda | 2012-10-23 17:20:18 -0700 | [diff] [blame] | 15 | |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 16 | .. role:: red |
| 17 | |
Alexander Afanasyev | 326410e | 2013-03-09 20:39:11 -0800 | [diff] [blame] | 18 | .. note:: |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 19 | **The following instructions are for those who want to install latest version of boost |
| 20 | libraries** :red:`and has root access`. |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 21 | |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 22 | The following commands would install the latest version of boost libraries (at the time of |
| 23 | writing, version 1.53) ot ``/usr/local``, assuming you have a root access to your machine. If |
| 24 | you don't have root access, please refer to section :ref:`Installing boost libraries to a |
| 25 | non-privileged location`. |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 26 | |
| 27 | .. note:: |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 28 | If you are using Ubuntu, make sure that you have installed ``libbz2-dev``, otherwise not |
| 29 | all libraries required by ndnSIM will be installed (see :ref:`Common pitfalls`) |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 30 | |
| 31 | .. code-block:: bash |
| 32 | :linenos: |
| 33 | |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 34 | wget http://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.tar.bz2 |
| 35 | tar jxf boost_1_57_0.tar.bz2 |
| 36 | cd boost_1_57_0 |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 37 | ./bootstrap.sh |
| 38 | sudo ./b2 --prefix=/usr/local install |
| 39 | |
| 40 | |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 41 | The following commands should allow compilation and run of NS-3 simulations with custom install |
| 42 | of boost libraries: |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 43 | |
| 44 | .. code-block:: bash |
| 45 | :linenos: |
| 46 | |
| 47 | cd <ns-3> |
| 48 | ./waf configure --boost-includes=/usr/local/include --boost-libs=/usr/local/lib --enable-examples |
| 49 | ./waf |
| 50 | LD_LIBRARY_PATH=/usr/local/lib NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple |
| 51 | |
| 52 | .. note:: |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 53 | ``LD_LIBRARY_PATH=/usr/local/lib`` is necessary on Linux platform in order for the dynamic |
| 54 | linker to find libraries installed in a location different from one of the folders |
| 55 | specified in ``/etc/ld.so.conf``. |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 56 | |
| 57 | .. _Installing boost libraries to a non-privileged location: |
| 58 | |
| 59 | Installing boost libraries to a non-privileged location |
| 60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 61 | |
Alexander Afanasyev | 326410e | 2013-03-09 20:39:11 -0800 | [diff] [blame] | 62 | .. note:: |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 63 | **Follow these general instructions if you are trying to installboost libraries to a |
| 64 | non-privileged location** :red:`(i.e., you do not have root access),` **but something is |
| 65 | going wrong.** |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 66 | |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 67 | Normally, to compile and install boost libraries in non-privileged mode, you would need to |
| 68 | issue following commands (e.g., for boost version 1.57.0): |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 69 | |
| 70 | .. code-block:: bash |
| 71 | :linenos: |
| 72 | |
| 73 | export BOOSTDIR=/home/non-privileged-user/boost |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 74 | wget http://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.tar.bz2 |
| 75 | tar jxf boost_1_57_0.tar.bz2 |
| 76 | cd boost_1_57_0 |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 77 | ./bootstrap.sh |
| 78 | ./b2 --prefix=$BOOSTDIR install |
| 79 | |
| 80 | However, after the following steps you may still not able to use ndnSIM. |
| 81 | |
| 82 | .. _Common pitfalls: |
| 83 | |
| 84 | Common pitfalls |
| 85 | ^^^^^^^^^^^^^^^ |
| 86 | |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 87 | The common pitfalls is with the **boost iostreams** library, which is required by ndnSIM, but |
| 88 | failed to build because of the missing bzip2 library. This problem can be easily fixed by |
| 89 | downloading and installing bzip2 library, e.g., using the following steps: |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 90 | |
| 91 | .. code-block:: bash |
| 92 | :linenos: |
| 93 | |
| 94 | wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz |
| 95 | tar zxf bzip2-1.0.6.tar.gz |
| 96 | cd bzip2-1.0.6 |
| 97 | make PREFIX=$BOOSTDIR CFLAGS="-fPIC -O2 -g" install |
| 98 | |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 99 | Afte bzip2 library is installed, you may recompile and reinstall boost libraries using custom |
| 100 | compilation flags:: |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 101 | |
| 102 | ./b2 --prefix=$BOOSTDIR cxxflags=-I$BOOSTDIR/include linkflags=-L$BOOSTDIR/lib install |
| 103 | |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 104 | Alternatively, you can solve this particular problem by installing development package for |
| 105 | bzip2 library (:red:`if you have root access`). For example, on Ubuntu 12.04 it would be the |
| 106 | following command:: |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 107 | |
| 108 | sudo apt-get install libbz2-dev |
| 109 | |
| 110 | And then compiling and installing boost without custom compilation flags:: |
| 111 | |
| 112 | ./b2 --prefix=$BOOSTDIR |
| 113 | |
| 114 | |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 115 | The following commands should allow compilation and run of NS-3 simulations with custom install |
| 116 | of boost libraries:: |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 117 | |
| 118 | cd <ns-3> |
| 119 | ./waf configure --boost-includes=$BOOSTDIR/include --boost-libs=$BOOSTDIR/lib --enable-examples --enable-ndn-plugins=topology,mobility |
| 120 | ./waf |
| 121 | LD_LIBRARY_PATH=$BOOSTDIR/lib NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple |
| 122 | |
| 123 | .. note:: |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 124 | ``LD_LIBRARY_PATH=$BOOSTDIR/lib`` is necessary on Linux platform in order for the dynamic |
| 125 | linker to find libraries installed in a location different from one of the folders |
| 126 | specified in /etc/ld.so.conf. |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 127 | |
| 128 | |
Alexander Afanasyev | 6dbacda | 2012-10-23 17:20:18 -0700 | [diff] [blame] | 129 | |
| 130 | Visualizer problems |
| 131 | ------------------- |
| 132 | |
| 133 | .. topic:: Visualizer module is not working |
| 134 | |
| 135 | Every time I'm trying to run visualizer, I get the following error:: |
| 136 | |
| 137 | Waf: Entering directory `/ndnSIM/ns-3/build' |
| 138 | Could not find a task generator for the name 'ns3-visualizer'.. |
| 139 | |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 140 | Something is wrong with your python bindings and python bindings dependencies. Please follow |
| 141 | the :ref:`requirements` section that lists what should be installed in order to run visualizer. |
Alexander Afanasyev | 6dbacda | 2012-10-23 17:20:18 -0700 | [diff] [blame] | 142 | |
| 143 | Code questions |
| 144 | -------------- |
| 145 | |
| 146 | .. topic:: Failing a link between nodes |
| 147 | |
| 148 | How can I fail a link between to NDN nodes? |
| 149 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 150 | Refer to :ref:`Link Control Helper`. |
Alexander Afanasyev | 6dbacda | 2012-10-23 17:20:18 -0700 | [diff] [blame] | 151 | |
| 152 | General questions |
| 153 | ----------------- |
| 154 | |
| 155 | .. topic:: Errors/bugs reporting |
| 156 | |
| 157 | I found an error in the documentation / bug in the code. What should I do? |
| 158 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 159 | Please submit a bug report on `redmine <http://redmine.named-data.net/projects/ndnsim?jump=welcome>`_, |
| 160 | or tell us about the error on `our mailing list |
| 161 | <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ . |