]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-libyang.rst
Merge pull request #3288 from nitinsoniism/show_intf_brief
[mirror_frr.git] / doc / developer / building-libyang.rst
1 The libyang library can be installed from third-party packages available `here
2 <https://ci1.netdef.org/browse/LIBYANG-YANGRELEASE/latestSuccessful/artifact>`_.
3
4 Note: the libyang dev/devel packages need to be installed in addition
5 to the libyang core package in order to build FRR successfully.
6
7 .. warning::
8 libyang ABI version 0.16.74 or newer will be required to build FRR in the
9 near future since it significantly eases build and installation
10 considerations. "0.16-r3" is equal to 0.16.105 and will work, "0.16-r2"
11 is equal to 0.16.52 and will stop working. The CI artifacts will be
12 updated shortly.
13
14 For example, for CentOS 7.x:
15
16 .. code-block:: shell
17
18 wget https://ci1.netdef.org/artifact/LIBYANG-YANGRELEASE/shared/build-1/CentOS-7-x86_64-Packages/libyang-0.16.46-0.x86_64.rpm
19 wget https://ci1.netdef.org/artifact/LIBYANG-YANGRELEASE/shared/build-1/CentOS-7-x86_64-Packages/libyang-devel-0.16.46-0.x86_64.rpm
20 sudo rpm -i libyang-0.16.46-0.x86_64.rpm libyang-devel-0.16.46-0.x86_64.rpm
21
22 or Ubuntu 18.04:
23
24 .. code-block:: shell
25
26 wget https://ci1.netdef.org/artifact/LIBYANG-YANGRELEASE/shared/build-1/Ubuntu-18.04-x86_64-Packages/libyang-dev_0.16.46_amd64.deb
27 wget https://ci1.netdef.org/artifact/LIBYANG-YANGRELEASE/shared/build-1/Ubuntu-18.04-x86_64-Packages/libyang_0.16.46_amd64.deb
28 sudo apt install libpcre3-dev
29 sudo dpkg -i libyang-dev_0.16.46_amd64.deb libyang_0.16.46_amd64.deb
30
31 .. note::
32 For Debian-based systems, the official libyang package requires recent
33 versions of swig (3.0.12) and debhelper (11) which are only available in
34 Debian buster (10). However, libyang packages built on Debian buster can
35 be installed on both Debian jessie (8) and Debian stretch (9), as well as
36 various Ubuntu systems. The python3-yang package will not work, but the
37 other packages (libyang-dev is the one needed for FRR) will.
38
39 Alternatively, libyang can be built and installed manually by following
40 the steps below:
41
42 .. code-block:: shell
43
44 git clone https://github.com/opensourcerouting/libyang
45 cd libyang
46 git checkout -b tmp origin/tmp
47 mkdir build; cd build
48 cmake -DENABLE_LYD_PRIV=ON ..
49 make
50 sudo make install
51
52 When building libyang on CentOS 6, it's also necessary to pass the
53 ``-DENABLE_CACHE=OFF`` parameter to cmake.
54
55 Note: please check the `libyang build requirements
56 <https://github.com/CESNET/libyang/blob/master/README.md#build-requirements>`_
57 first.