]> git.proxmox.com Git - mirror_frr.git/commitdiff
doc: add build instructions for libyang
authorRenato Westphal <renato@opensourcerouting.org>
Tue, 16 Oct 2018 01:00:12 +0000 (22:00 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 27 Oct 2018 18:16:12 +0000 (16:16 -0200)
These instructions are intended to be temporary until we have libyang
packages available for all supported platforms.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
17 files changed:
doc/developer/building-frr-for-centos6.rst
doc/developer/building-frr-for-centos7.rst
doc/developer/building-frr-for-debian8.rst
doc/developer/building-frr-for-debian9.rst
doc/developer/building-frr-for-fedora24.rst
doc/developer/building-frr-for-freebsd10.rst
doc/developer/building-frr-for-freebsd11.rst
doc/developer/building-frr-for-freebsd9.rst
doc/developer/building-frr-for-netbsd6.rst
doc/developer/building-frr-for-netbsd7.rst
doc/developer/building-frr-for-omnios.rst
doc/developer/building-frr-for-openbsd6.rst
doc/developer/building-frr-for-ubuntu1204.rst
doc/developer/building-frr-for-ubuntu1404.rst
doc/developer/building-frr-for-ubuntu1604.rst
doc/developer/building-frr-for-ubuntu1804.rst
doc/developer/building-libyang.rst [new file with mode: 0644]

index f085598e08830d5923531c138470978bb63748e1..5f9ce705f222a6a283487993bc419b2ab6e95c14 100644 (file)
@@ -115,6 +115,8 @@ Update rpm database & Install newer sphinx
    sudo yum update
    sudo yum install python27-sphinx
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index ca62b1239a2b5033ff330bb6b81467329f0cd7d2..8f82cd6c9ab6ab6b8acf6271065ea894fe1d6d66 100644 (file)
@@ -24,6 +24,8 @@ Add packages:
       json-c-devel pam-devel bison flex pytest c-ares-devel \
       python-devel systemd-devel python-sphinx
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index 2b591bf1aacc505c9ac83eb90046447c286128c6..97e9382d4603d62865380664c0cdc737d82e2737 100644 (file)
@@ -25,6 +25,8 @@ Install newer pytest (>3.0) from pip
 
     sudo pip install pytest
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index db22e4f44efb8282d83bd69b4761777c3b3ad5bb..7c9f567b8db150165f5b6c72ea2115091a715191 100644 (file)
@@ -12,6 +12,8 @@ Add packages:
       libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
       python-pip libc-ares-dev python3-dev python-pytest python3-sphinx
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index 86e0c8d99141147056f2a0e11d05e2b4956f22d3..2edf9b3e44915f6d6ee4d9c20f745a267ec1a335 100644 (file)
@@ -17,6 +17,8 @@ Add packages:
       json-c-devel pam-devel pytest bison flex c-ares-devel \
       python3-devel python3-sphinx
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index e9bc9adb167654d48978932a53cdc431a4f57076..5dde915f6aa5861d59ad3fd52569adba5da45b7c 100644 (file)
@@ -17,7 +17,7 @@ is first package install and asked)
 ::
 
     pkg install git autoconf automake libtool gmake gawk json-c pkgconf \
-        bison flex py27-pytest c-ares python3 py-sphinx
+        bison flex py27-pytest c-ares python3 py-sphinx libyang
 
 Make sure there is no /usr/bin/flex preinstalled (and use the newly
 installed in /usr/local/bin): (FreeBSD frequently provides a older flex
index f578f085ae0c6ceff38aba6fa194abda6eaad621..9bef1fbfde16d90acefc7147e28f839c4657f918 100644 (file)
@@ -17,7 +17,7 @@ is first package install and asked)
 .. code-block:: shell
 
    pkg install git autoconf automake libtool gmake gawk json-c pkgconf \
-      bison flex py27-pytest c-ares python3 py36-sphinx texinfo
+      bison flex py27-pytest c-ares python3 py36-sphinx texinfo libyang
 
 Make sure there is no /usr/bin/flex preinstalled (and use the newly
 installed in /usr/local/bin): (FreeBSD frequently provides a older flex
index 0efa2ebd80cb6f0b95147d573dbc2aa6a47f0c5b..36492fb88657fe5549118cd9c3ea0a32711f332d 100644 (file)
@@ -40,6 +40,8 @@ compile)
     mv /usr/bin/clang /usr/bin/clang34
     ln -s /usr/local/bin/clang36 /usr/bin/clang
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index 2023a4fafab5e75cbaaea582bf469060caefb41c..a042077fd0f0d1ec42e8b281114d98c7070e8d91 100644 (file)
@@ -40,6 +40,8 @@ Select default Python and py.test
     sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
     sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index 6b31e68e8a56eef6748e73e0be2d163fc1bf5768..b65891916c3d72d433a46481360ed80aae66f5f2 100644 (file)
@@ -31,6 +31,8 @@ Select default Python and py.test
     sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
     sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index 45df049d391ddd3069d1e9596fdbf188ad4afe55..416c89c6677a5980124e846f81ebb74d331c5efd 100644 (file)
@@ -86,6 +86,8 @@ Edit ``~/.profile`` and add the following default PATH:
 
     PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index c68c18eb7c4aeeddebfc4716393a05928714d17b..0f8d4d0f25ff293caebe1aa12812574d9578dd55 100644 (file)
@@ -23,6 +23,8 @@ Select Python2.7 as default (required for pytest)
 
     ln -s /usr/local/bin/python2.7 /usr/local/bin/python
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index 1afd66c45928fdde5c7364d39af20155cf595cf6..9b2394f0182d9e0a43f81d0d17e44389677f31df 100644 (file)
@@ -64,6 +64,8 @@ Install pytest:
 
     pip install pytest
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index 98dbb7900270dfa1eacb35830b56da3c478620c3..81ca970469de788c2b7cbc14a7582fa9eac8b29f 100644 (file)
@@ -18,6 +18,8 @@ Add packages:
        pkg-config libpam0g-dev libjson-c-dev bison flex python-pytest \
        libc-ares-dev python3-dev python3-sphinx install-info
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index b2eec49236877d444f48db19d0a1dccb80b196d2..9830b24dfca6a7d4efa59a7830c46c101dd499c6 100644 (file)
@@ -19,6 +19,8 @@ Add packages:
        libc-ares-dev python3-dev libsystemd-dev python-ipaddress \
        python3-sphinx install-info
 
+.. include:: building-libyang.rst
+
 Get FRR, compile it and install it (from Git)
 ---------------------------------------------
 
index f5cf651e228517af2adc9124409663cd540abf09..2d1edc063d6042708e84ecfdecba05a55ead70e7 100644 (file)
@@ -15,6 +15,8 @@ Required packages
       libc-ares-dev python3-dev libsystemd-dev python-ipaddress \
       python3-sphinx install-info
 
+.. include:: building-libyang.rst
+
 Optional packages
 ^^^^^^^^^^^^^^^^^
 
diff --git a/doc/developer/building-libyang.rst b/doc/developer/building-libyang.rst
new file mode 100644 (file)
index 0000000..3555658
--- /dev/null
@@ -0,0 +1,25 @@
+The libyang library can be installed from third-party packages available `here
+<https://ci1.netdef.org/browse/LIBYANG-YANGRELEASE/latestSuccessful/artifact>`_.
+
+Note: the libyang dev/devel packages need to be installed in addition
+to the libyang core package in order to build FRR successfully.
+
+Alternatively, libyang can be built and installed manually by following
+the steps below:
+
+.. code-block:: shell
+
+   git clone https://github.com/opensourcerouting/libyang
+   cd libyang
+   git checkout -b tmp origin/tmp
+   mkdir build; cd build
+   cmake -DENABLE_LYD_PRIV=ON ..
+   make
+   sudo make install
+
+When building libyang on CentOS 6, it's also necessary to pass the
+``-DENABLE_CACHE=OFF`` parameter to cmake.
+
+Note: please check the `libyang build requirements
+<https://github.com/CESNET/libyang/blob/master/README.md#build-requirements>`_
+first.