doc: stick libunwind into build docs

It's strictly optional, but… the backtraces are really much better.
Specifically, `libunwind` is notably more capable in figuring out
function names compared to glibc/libexecinfo `backtrace_symbols()`.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2021-11-10 12:16:40 +01:00
parent de75bdc37b
commit afb8fe93b1
13 changed files with 38 additions and 10 deletions

View file

@ -11,7 +11,9 @@ Installing Dependencies
git autoconf automake libtool make cmake pcre readline texinfo \ git autoconf automake libtool make cmake pcre readline texinfo \
pkg-config pam json-c bison flex python-pytest \ pkg-config pam json-c bison flex python-pytest \
c-ares python python2-ipaddress python-sphinx \ c-ares python python2-ipaddress python-sphinx \
net-snmp perl libcap libelf net-snmp perl libcap libelf libunwind
.. include:: building-libunwind-note.rst
.. include:: building-libyang.rst .. include:: building-libyang.rst

View file

@ -22,7 +22,9 @@ Add packages:
readline-devel texinfo net-snmp-devel groff pkgconfig \ readline-devel texinfo net-snmp-devel groff pkgconfig \
json-c-devel pam-devel bison flex pytest c-ares-devel \ json-c-devel pam-devel bison flex pytest c-ares-devel \
python-devel python-sphinx libcap-devel \ python-devel python-sphinx libcap-devel \
elfutils-libelf-devel elfutils-libelf-devel libunwind-devel
.. include:: building-libunwind-note.rst
.. include:: building-libyang.rst .. include:: building-libyang.rst

View file

@ -15,7 +15,9 @@ Add packages:
automake libtool make readline-devel texinfo net-snmp-devel pkgconfig \ automake libtool make readline-devel texinfo net-snmp-devel pkgconfig \
groff pkgconfig json-c-devel pam-devel bison flex python2-pytest \ groff pkgconfig json-c-devel pam-devel bison flex python2-pytest \
c-ares-devel python2-devel libcap-devel \ c-ares-devel python2-devel libcap-devel \
elfutils-libelf-devel elfutils-libelf-devel libunwind-devel
.. include:: building-libunwind-note.rst
.. include:: building-libyang.rst .. include:: building-libyang.rst

View file

@ -11,7 +11,9 @@ Add packages:
sudo apt-get install git autoconf automake libtool make \ sudo apt-get install git autoconf automake libtool make \
libreadline-dev texinfo libjson-c-dev pkg-config bison flex \ libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
libc-ares-dev python3-dev python3-pytest python3-sphinx build-essential \ libc-ares-dev python3-dev python3-pytest python3-sphinx build-essential \
libsnmp-dev libcap-dev libelf-dev libsnmp-dev libcap-dev libelf-dev libunwind-dev
.. include:: building-libunwind-note.rst
.. include:: building-libyang.rst .. include:: building-libyang.rst

View file

@ -15,7 +15,9 @@ Installing Dependencies
readline-devel texinfo net-snmp-devel groff pkgconfig json-c-devel \ readline-devel texinfo net-snmp-devel groff pkgconfig json-c-devel \
pam-devel python3-pytest bison flex c-ares-devel python3-devel \ pam-devel python3-pytest bison flex c-ares-devel python3-devel \
python3-sphinx perl-core patch libcap-devel \ python3-sphinx perl-core patch libcap-devel \
elfutils-libelf-devel elfutils-libelf-devel libunwind-devel
.. include:: building-libunwind-note.rst
.. include:: building-libyang.rst .. include:: building-libyang.rst

View file

@ -17,7 +17,9 @@ is first package install and asked)
:: ::
pkg install git autoconf automake libtool gmake json-c pkgconf \ pkg install git autoconf automake libtool gmake json-c pkgconf \
bison flex py36-pytest c-ares python3.6 py36-sphinx bison flex py36-pytest c-ares python3.6 py36-sphinx libunwind
.. include:: building-libunwind-note.rst
Make sure there is no /usr/bin/flex preinstalled (and use the newly Make sure there is no /usr/bin/flex preinstalled (and use the newly
installed in /usr/local/bin): (FreeBSD frequently provides a older flex installed in /usr/local/bin): (FreeBSD frequently provides a older flex

View file

@ -17,7 +17,9 @@ is first package install and asked)
.. code-block:: shell .. code-block:: shell
pkg install git autoconf automake libtool gmake json-c pkgconf \ pkg install git autoconf automake libtool gmake json-c pkgconf \
bison flex py36-pytest c-ares python3.6 py36-sphinx texinfo bison flex py36-pytest c-ares python3.6 py36-sphinx texinfo libunwind
.. include:: building-libunwind-note.rst
Make sure there is no /usr/bin/flex preinstalled (and use the newly Make sure there is no /usr/bin/flex preinstalled (and use the newly
installed in /usr/local/bin): (FreeBSD frequently provides a older flex installed in /usr/local/bin): (FreeBSD frequently provides a older flex

View file

@ -14,7 +14,9 @@ Installing Dependencies
readline-devel texinfo net-snmp-devel groff pkgconfig libjson-c-devel\ readline-devel texinfo net-snmp-devel groff pkgconfig libjson-c-devel\
pam-devel python3-pytest bison flex c-ares-devel python3-devel\ pam-devel python3-pytest bison flex c-ares-devel python3-devel\
python3-Sphinx perl patch libcap-devel libyang-devel \ python3-Sphinx perl patch libcap-devel libyang-devel \
libelf-devel libelf-devel libunwind-devel
.. include:: building-libunwind-note.rst
Building & Installing FRR Building & Installing FRR
------------------------- -------------------------

View file

@ -15,7 +15,9 @@ Installing Dependencies
pkg-config libpam0g-dev libjson-c-dev bison flex \ pkg-config libpam0g-dev libjson-c-dev bison flex \
libc-ares-dev python3-dev python3-sphinx \ libc-ares-dev python3-dev python3-sphinx \
install-info build-essential libsnmp-dev perl libcap-dev \ install-info build-essential libsnmp-dev perl libcap-dev \
libelf-dev libelf-dev libunwind-dev
.. include:: building-libunwind-note.rst
.. include:: building-libyang.rst .. include:: building-libyang.rst

View file

@ -15,7 +15,9 @@ Installing Dependencies
pkg-config libpam0g-dev libjson-c-dev bison flex \ pkg-config libpam0g-dev libjson-c-dev bison flex \
libc-ares-dev python3-dev python3-sphinx \ libc-ares-dev python3-dev python3-sphinx \
install-info build-essential libsnmp-dev perl \ install-info build-essential libsnmp-dev perl \
libcap-dev python2 libelf-dev libcap-dev python2 libelf-dev libunwind-dev
.. include:: building-libunwind-note.rst
Note that Ubuntu 20 no longer installs python 2.x, so it must be Note that Ubuntu 20 no longer installs python 2.x, so it must be
installed explicitly. Ensure that your system has a symlink named installed explicitly. Ensure that your system has a symlink named

View file

@ -0,0 +1,6 @@
.. note::
The ``libunwind`` library is optional but highly recommended, as it improves
backtraces printed for crashes and debugging. However, if it is not
available for some reason, it can simply be left out without any loss of
functionality.

View file

@ -136,6 +136,7 @@ language = None
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
exclude_patterns = [ exclude_patterns = [
"_build", "_build",
"building-libunwind-note.rst",
"building-libyang.rst", "building-libyang.rst",
"topotests-snippets.rst", "topotests-snippets.rst",
"topotests-markers.rst", "topotests-markers.rst",

View file

@ -23,6 +23,7 @@ dev_RSTFILES = \
doc/developer/building-frr-for-ubuntu1604.rst \ doc/developer/building-frr-for-ubuntu1604.rst \
doc/developer/building-frr-for-ubuntu1804.rst \ doc/developer/building-frr-for-ubuntu1804.rst \
doc/developer/building-frr-for-ubuntu2004.rst \ doc/developer/building-frr-for-ubuntu2004.rst \
doc/developer/building-libunwind-note.rst \
doc/developer/building-libyang.rst \ doc/developer/building-libyang.rst \
doc/developer/building.rst \ doc/developer/building.rst \
doc/developer/cli.rst \ doc/developer/cli.rst \