blob: dd38f1885a7c8c76e6348a457495c75aa397dc5f [file] [log] [blame]
Alexander Afanasyev284257b2014-04-11 14:16:51 -07001.. _NFD Installation Instructions:
2
3NFD Installation Instructions
4=============================
5
6Prerequisites
7-------------
8
Alexander Afanasyev4a771362014-04-24 21:29:33 -07009- `ndn-cxx library <https://github.com/named-data/ndn-cxx>`__
Alexander Afanasyev284257b2014-04-11 14:16:51 -070010 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 Afanasyev5c865702014-05-01 12:30:03 -070019 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 Afanasyev284257b2014-04-11 14:16:51 -070021
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
32To 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
51Build
52-----
53
54The following commands should be used to build NFD:
55
56::
57
58 ./waf configure
59 ./waf
60 sudo ./waf install
61
Alexander Afanasyev26181532014-05-07 23:38:51 -070062Refer to ``./waf --help`` for more options that can be used during ``configure`` stage and
63how to properly configure and run NFD.
Alexander Afanasyev284257b2014-04-11 14:16:51 -070064
65In some configurations, configuration step may require small modification. For example, on
66OSX 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
76On 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 Afanasyev26181532014-05-07 23:38:51 -070085Debug symbols
86+++++++++++++
87
88The default compiler flags enable debug symbols to be included in binaries. This
89potentially allows more meaningful debugging if NFD or other tools happen to crash.
90
91If it is undesirable, default flags can be easily overridden. The following example shows
92how to completely disable debug symbols and configure NFD to be installed into ``/usr``
93with configuration in ``/etc`` folder.
94
95::
96
97 CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc
98 ./waf
99 sudo ./waf install
100
Alexander Afanasyev284257b2014-04-11 14:16:51 -0700101Building documentation
102----------------------
103
104NFD 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
118Manpages are automatically created and installed during the normal build process
119(e.g., during ``./waf`` and ``./waf install``), if ``python-sphinx`` module is detected
120during ``./waf configure`` stage. By default, manpages are installed into
121``${PREFIX}/share/man`` (where default value for ``PREFIX`` is ``/usr/local``). This
122location can be changed during ``./waf configure`` stage using ``--prefix``,
123``--datarootdir``, or ``--mandir`` options.
124
125For more details, refer to ``./waf --help``.