Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 1 | .. _NFD Installation Instructions: |
| 2 | |
| 3 | NFD Installation Instructions |
| 4 | ============================= |
| 5 | |
| 6 | Prerequisites |
| 7 | ------------- |
| 8 | |
Alexander Afanasyev | 4a77136 | 2014-04-24 21:29:33 -0700 | [diff] [blame] | 9 | - `ndn-cxx library <https://github.com/named-data/ndn-cxx>`__ |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 10 | and its requirements: |
| 11 | |
| 12 | - ``libcrypto`` |
| 13 | - ``libsqlite3`` |
| 14 | - ``libcrypto++`` |
| 15 | - ``pkg-config`` |
| 16 | - Boost libraries (>= 1.48) |
| 17 | - OSX Security framework (on OSX platform only) |
| 18 | |
Alexander Afanasyev | 5c86570 | 2014-05-01 12:30:03 -0700 | [diff] [blame] | 19 | Refer to `Getting started with ndn-cxx <http://named-data.net/doc/ndn-cxx/current/INSTALL.html>`_ |
| 20 | for detailed installation instructions of the library. |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 21 | |
| 22 | - ``libpcap`` |
| 23 | |
| 24 | Comes with base on OS X 10.8 and 10.9: |
| 25 | |
| 26 | On Ubuntu >= 12.04: |
| 27 | |
| 28 | :: |
| 29 | |
| 30 | sudo apt-get install libpcap-dev |
| 31 | |
| 32 | To build manpages and API documentation: |
| 33 | |
| 34 | - ``doxygen`` |
| 35 | - ``graphviz`` |
| 36 | - ``python-sphinx`` |
| 37 | |
| 38 | On OS X 10.8 and 10.9 with macports: |
| 39 | |
| 40 | :: |
| 41 | |
| 42 | sudo port install doxygen graphviz py27-sphinx sphinx_select |
| 43 | sudo port select sphinx py27-sphinx |
| 44 | |
| 45 | On Ubuntu >= 12.04: |
| 46 | |
| 47 | :: |
| 48 | |
| 49 | sudo apt-get install doxygen graphviz python-sphinx |
| 50 | |
| 51 | Build |
| 52 | ----- |
| 53 | |
| 54 | The following commands should be used to build NFD: |
| 55 | |
| 56 | :: |
| 57 | |
| 58 | ./waf configure |
| 59 | ./waf |
| 60 | sudo ./waf install |
| 61 | |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame^] | 62 | Refer to ``./waf --help`` for more options that can be used during ``configure`` stage and |
| 63 | how to properly configure and run NFD. |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 64 | |
| 65 | In some configurations, configuration step may require small modification. For example, on |
| 66 | OSX that uses macports (correct the path if macports was not installed in the default path |
| 67 | ``/opt/local``): |
| 68 | |
| 69 | :: |
| 70 | |
| 71 | export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH |
| 72 | ./waf configure |
| 73 | ./waf |
| 74 | sudo ./waf install |
| 75 | |
| 76 | On some Linux distributions (e.g., Fedora 20): |
| 77 | |
| 78 | :: |
| 79 | |
| 80 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:$PKG_CONFIG_PATH |
| 81 | ./waf configure |
| 82 | ./waf |
| 83 | sudo ./waf install |
| 84 | |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame^] | 85 | Debug symbols |
| 86 | +++++++++++++ |
| 87 | |
| 88 | The default compiler flags enable debug symbols to be included in binaries. This |
| 89 | potentially allows more meaningful debugging if NFD or other tools happen to crash. |
| 90 | |
| 91 | If it is undesirable, default flags can be easily overridden. The following example shows |
| 92 | how to completely disable debug symbols and configure NFD to be installed into ``/usr`` |
| 93 | with configuration in ``/etc`` folder. |
| 94 | |
| 95 | :: |
| 96 | |
| 97 | CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc |
| 98 | ./waf |
| 99 | sudo ./waf install |
| 100 | |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 101 | Building documentation |
| 102 | ---------------------- |
| 103 | |
| 104 | NFD tutorials and API documentation can be built using the following commands: |
| 105 | |
| 106 | :: |
| 107 | |
| 108 | # Full set of documentation (tutorials + API) in build/docs |
| 109 | ./waf docs |
| 110 | |
| 111 | # Only tutorials in `build/docs` |
| 112 | ./waf sphinx |
| 113 | |
| 114 | # Only API docs in `build/docs/doxygen` |
| 115 | ./waf doxgyen |
| 116 | |
| 117 | |
| 118 | Manpages are automatically created and installed during the normal build process |
| 119 | (e.g., during ``./waf`` and ``./waf install``), if ``python-sphinx`` module is detected |
| 120 | during ``./waf configure`` stage. By default, manpages are installed into |
| 121 | ``${PREFIX}/share/man`` (where default value for ``PREFIX`` is ``/usr/local``). This |
| 122 | location can be changed during ``./waf configure`` stage using ``--prefix``, |
| 123 | ``--datarootdir``, or ``--mandir`` options. |
| 124 | |
| 125 | For more details, refer to ``./waf --help``. |