]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-libyang.rst
Merge pull request #13141 from mjstapp/fix_ospf_json_keys
[mirror_frr.git] / doc / developer / building-libyang.rst
1 FRR depends on the relatively new ``libyang`` library to provide YANG/NETCONF
2 support. Unfortunately, most distributions do not yet offer a ``libyang``
3 package from their repositories. Therefore we offer two options to install this
4 library.
5
6 **Option 1: Binary Install**
7
8 The FRR project builds some binary ``libyang`` packages.
9
10 RPM packages are at our `RPM repository <https://rpm.frrouting.org>`_.
11
12 DEB packages are available as CI artifacts `here
13 <https://ci1.netdef.org/browse/LIBYANG-LIBYANGV2/latestSuccessful/artifact>`_.
14
15 .. warning::
16
17 ``libyang`` version 2.0.0 or newer is required to build FRR.
18
19 .. note::
20
21 The ``libyang`` development packages need to be installed in addition to the
22 libyang core package in order to build FRR successfully. Make sure to
23 download and install those from the link above alongside the binary
24 packages.
25
26 Depending on your platform, you may also need to install the PCRE
27 development package. Typically this is ``libpcre2-dev`` or ``pcre2-devel``.
28
29 **Option 2: Source Install**
30
31 .. note::
32
33 Ensure that the `libyang build requirements
34 <https://github.com/CESNET/libyang/#build-requirements>`_
35 are met before continuing. Usually this entails installing ``cmake`` and
36 ``libpcre2-dev`` or ``pcre2-devel``.
37
38 .. code-block:: console
39
40 git clone https://github.com/CESNET/libyang.git
41 cd libyang
42 git checkout v2.0.0
43 mkdir build; cd build
44 cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr \
45 -D CMAKE_BUILD_TYPE:String="Release" ..
46 make
47 sudo make install