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