blob: eaf4a88dd1612c7c8f830c329de47417b65e5e6f [file] [log] [blame]
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -07001.. _NDNS Installation Instructions:
2
3NDNS Installation Instructions
4==============================
5
6Prerequisites
7-------------
8
9- Install the `ndn-cxx library <http://named-data.net/doc/ndn-cxx/current/INSTALL.html>`_
10 and its requirements
11
Shock Jiang895bc1b2014-10-01 20:00:58 -070012Another additional libraries include:
13- ``log4cxx``
14
15 On OS X 10.8, 10.9 and 10.10 with MacPorts:
16
17 ::
18
19 sudo port install log4cxx
20
21 On Ubuntu >= 12.04:
22
23 ::
24
25 sudo apt-get install liblog4cxx10-dev
26
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070027To build manpages and API documentation:
28
29- ``doxygen``
30- ``graphviz``
31- ``python-sphinx``
32
33 On OS X 10.8 and 10.9 with MacPorts:
34
35 ::
36
37 sudo port install doxygen graphviz py27-sphinx sphinx_select
38 sudo port select sphinx py27-sphinx
39
40 On Ubuntu >= 12.04:
41
42 ::
43
44 sudo apt-get install doxygen graphviz python-sphinx
45
46Build
47-----
48
49The following basic commands should be used to build NDNS on Ubuntu:
50
51::
52
53 ./waf configure
54 ./waf
55 sudo ./waf install
56
57Some platforms, such as OS X with MacPorts and certain Linux distributions (e.g., Fedora)
58require setting the ``PKG_CONFIG_PATH`` before running configure.
59
60For example, on OS X with MacPorts (assuming the default ``/opt/local`` MacPorts path):
61
62::
63
64 export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH
65 ./waf configure
66 ./waf
67 sudo ./waf install
68
69or some Linux distributions:
70
71::
72
73 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:$PKG_CONFIG_PATH
74 ./waf configure
75 ./waf
76 sudo ./waf install
77
78
79Refer to ``./waf --help`` for more options that can be used during ``configure`` stage and
80how to properly configure and run NFD.
81
82Debug symbols
83+++++++++++++
84
85The default compiler flags enable debug symbols to be included in binaries. This
86potentially allows more meaningful debugging if NDNS or other tools happen to crash.
87
88If it is undesirable, default flags can be easily overridden. The following example shows
89how to completely disable debug symbols and configure NDNS to be installed into ``/usr``
90with configuration in ``/etc`` folder.
91
92::
93
94 CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc
95 ./waf
96 sudo ./waf install
97
98Building documentation
99----------------------
100
101NDNS tutorials and API documentation can be built using the following commands:
102
103::
104
105 # Full set of documentation (tutorials + API) in build/docs
106 ./waf docs
107
108 # Only tutorials in `build/docs`
109 ./waf sphinx
110
111 # Only API docs in `build/docs/doxygen`
112 ./waf doxgyen
113
114
115Manpages are automatically created and installed during the normal build process
116(e.g., during ``./waf`` and ``./waf install``), if ``python-sphinx`` module is detected
117during ``./waf configure`` stage. By default, manpages are installed into
118``${PREFIX}/share/man`` (where default value for ``PREFIX`` is ``/usr/local``). This
119location can be changed during ``./waf configure`` stage using ``--prefix``,
120``--datarootdir``, or ``--mandir`` options.
121
122For more details, refer to ``./waf --help``.