diff options
| author | Lou Berger <lberger@labn.net> | 2018-10-31 08:31:46 -0400 |
|---|---|---|
| committer | Lou Berger <lberger@labn.net> | 2018-10-31 08:31:46 -0400 |
| commit | aedd2f85158d853bc407be1e1a797df0b747bfb5 (patch) | |
| tree | e44fd4b0ae76c390f0ae201f5f6119f609ec3a2a | |
| parent | 62565dc96b19738ce598060e379c36d82fd763b4 (diff) | |
doc: add info on libyang install and configure options
Signed-off-by: Lou Berger <lberger@labn.net>
| -rw-r--r-- | doc/developer/building-libyang.rst | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/developer/building-libyang.rst b/doc/developer/building-libyang.rst index 3555658cf9..9757ad454e 100644 --- a/doc/developer/building-libyang.rst +++ b/doc/developer/building-libyang.rst @@ -4,6 +4,23 @@ The libyang library can be installed from third-party packages available `here Note: the libyang dev/devel packages need to be installed in addition to the libyang core package in order to build FRR successfully. +For example, for CentOS 7.x: + +.. code-block:: shell + + wget https://ci1.netdef.org/artifact/LIBYANG-YANGRELEASE/shared/build-1/CentOS-7-x86_64-Packages/libyang-0.16.46-0.x86_64.rpm + 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 + sudo rpm -i libyang-0.16.46-0.x86_64.rpm libyang-devel-0.16.46-0.x86_64.rpm + +or Ubuntu 18.04: + +.. code-block:: shell + + wget https://ci1.netdef.org/artifact/LIBYANG-YANGRELEASE/shared/build-1/Ubuntu-18.04-x86_64-Packages/libyang-dev_0.16.46_amd64.deb + wget https://ci1.netdef.org/artifact/LIBYANG-YANGRELEASE/shared/build-1/Ubuntu-18.04-x86_64-Packages/libyang_0.16.46_amd64.deb + sudo apt install libpcre3-dev + sudo dpkg -i libyang-dev_0.16.46_amd64.deb libyang_0.16.46_amd64.deb + Alternatively, libyang can be built and installed manually by following the steps below: @@ -23,3 +40,23 @@ When building libyang on CentOS 6, it's also necessary to pass the Note: please check the `libyang build requirements <https://github.com/CESNET/libyang/blob/master/README.md#build-requirements>`_ first. + +Libyang uses loadable libraries an YANG modules. It supports +environment variables to allow overriding the load paths for each of +these. With FRR, this override currently must be done at the time of +running FRR's configure command using new options. The new options are: + +.. code-block:: shell + + --with-yangmodelsdir=DIR + yang models directory (${datarootdir}/yang) + --with-libyang-pluginsdir=DIR + yangmodule plugins directory + (${libdir}/frr/libyang_plugins) + +an example which uses the compile directory is: + +.. code-block:: shell + + ./configure --with-libyang-pluginsdir="`pwd`/yang/libyang_plugins/.libs" \ + --with-yangmodelsdir="`pwd`/yang" |
