forked from Mirror/frr

It's time to say good bye to libyang 0.16.105. The recently released libyang 1.0.184 includes numerous bug fixes and performance improvements that we need. Despite the major version bump from 0.x to 1.x, the libyang API is the same except for a single backward-incompatible change in the user types interface (which we're currently not using). Hence no code changes were necessary to adapt FRR to libyang 1.x. This commit also reintroduces some leafrefs that needed to be removed from our YANG modules due to a bug that was present on libyang 0.16.105. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
54 lines
1.9 KiB
ReStructuredText
54 lines
1.9 KiB
ReStructuredText
FRR depends on the relatively new ``libyang`` library to provide YANG/NETCONF
|
|
support. Unfortunately, most distributions do not yet offer a ``libyang``
|
|
package from their repositories. Therefore we offer two options to install this
|
|
library.
|
|
|
|
**Option 1: Binary Install**
|
|
|
|
The FRR project builds binary ``libyang`` packages, which we offer for download
|
|
`here <https://ci1.netdef.org/browse/LIBYANG-YANGRELEASE/latestSuccessful/artifact>`_.
|
|
|
|
.. warning::
|
|
|
|
``libyang`` version 1.0.184 or newer is required to build FRR.
|
|
|
|
.. note::
|
|
|
|
The ``libyang`` development packages need to be installed in addition to the
|
|
libyang core package in order to build FRR successfully. Make sure to
|
|
download and install those from the link above alongside the binary
|
|
packages.
|
|
|
|
Depending on your platform, you may also need to install the PCRE
|
|
development package. Typically this is ``libpcre-dev`` or ``pcre-devel``.
|
|
|
|
.. note::
|
|
|
|
For Debian-based systems, the official ``libyang`` package requires recent
|
|
versions of ``swig`` (3.0.12) and ``debhelper`` (11) which are only
|
|
available in Debian buster (10). However, ``libyang`` packages built on
|
|
Debian buster can be installed on both Debian jessie (8) and Debian stretch
|
|
(9), as well as various Ubuntu systems. The ``python3-yang`` package will
|
|
not work, but the other packages (``libyang-dev`` is the one needed for FRR)
|
|
will.
|
|
|
|
**Option 2: Source Install**
|
|
|
|
.. note::
|
|
|
|
Ensure that the `libyang build requirements
|
|
<https://github.com/CESNET/libyang/blob/master/README.md#build-requirements>`_
|
|
are met before continuing. Usually this entails installing ``cmake`` and
|
|
``libpcre-dev`` or ``pcre-devel``.
|
|
|
|
.. code-block:: console
|
|
|
|
git clone https://github.com/CESNET/libyang.git
|
|
cd libyang
|
|
mkdir build; cd build
|
|
cmake -DENABLE_LYD_PRIV=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
|
-D CMAKE_BUILD_TYPE:String="Release" ..
|
|
make
|
|
sudo make install
|
|
|