libjson-c.so.5: cannot open shared object file: No such file or directory
Describe the bug
In RedHat 8
lib/clippy: error while loading shared libraries: libjson-c.so.5: cannot open shared object file: No such file or directory
make[1]: *** [Makefile:17634: lib/filter_cli_clippy.c] Error 127
make[1]: Leaving directory '/root/frr'
make: *** [Makefile:6369: all] Error 2
@ton31337 please help
Do you have json-c-devel installed?
@ton31337 I was able to package RedHAT and successfully install FRR -
Here is the steps for future references - if it is required for someone
Install all dependencies to build FRR and packaging rpms
yum install rpm-build net-snmp-devel pam-devel libcap-devel python3-devel python3-sphinx platform-python-devel git libtool readline-devel wget flex cmake c-ares-devel systemd-devel texinfo json-c-devel pcre2-devel bison byacc libssh-devel -y
Install pre-requisite for FRR test [optional - if not done, you might see some warnings during compilation]
pip3 install pytest
Libyang is another dependencies - by default RedHAT repositories does not have latest version; FRR depends on this library version > 2.x
So download the RPMs from the repo, and install manually - if you use yum, you will see compilation error due to version mismatch
Create a folder and download RPMs
mkdir libyang && cd libyang
wget https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-12/RedHat-8-x86_64-Packages/libyang2-2.0.7-1.el8.x86_64.rpm
wget https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-12/RedHat-8-x86_64-Packages/libyang2-debuginfo-2.0.7-1.el8.x86_64.rpm
wget https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-12/RedHat-8-x86_64-Packages/libyang2-debugsource-2.0.7-1.el8.x86_64.rpm
wget https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-12/RedHat-8-x86_64-Packages/libyang2-devel-2.0.7-1.el8.x86_64.rpm
wget https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-12/RedHat-8-x86_64-Packages/libyang2-tools-2.0.7-1.el8.x86_64.rpm
wget https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-12/RedHat-8-x86_64-Packages/libyang2-tools-debuginfo-2.0.7-1.el8.x86_64.rpm
wget https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-12/RedHat-8-x86_64-Packages/libyang2-2.0.7-1.el8.x86_64.rpm
Install using libyang package using rpm command
rpm -ivh libyang2-debuginfo-2.0.7-1.el8.x86_64.rpm
rpm -ivh libyang2-debugsource-2.0.7-1.el8.x86_64.rpm
rpm -ivh libyang2-tools-debuginfo-2.0.7-1.el8.x86_64.rpm
rpm -ivh libyang2-2.0.7-1.el8.x86_64.rpm
rpm -ivh libyang2-devel-2.0.7-1.el8.x86_64.rpm
rpm -ivh libyang2-tools-2.0.7-1.el8.x86_64.rpm
cd
Another library dependencies that requires manual installation is librtr
mkdir librtr && cd librtr
wget https://ci1.netdef.org/browse/RPKI-RTRLIB-147/artifact/shared/RedHat-8-x86_64-Packages/#:~:text=librtr%2D0.8.0%2D1.el8.src.rpm
wget https://ci1.netdef.org/artifact/RPKI-RTRLIB/shared/build-147/RedHat-8-x86_64-Packages/librtr-0.8.0-1.el8.x86_64.rpm
wget https://ci1.netdef.org/artifact/RPKI-RTRLIB/shared/build-147/RedHat-8-x86_64-Packages/librtr-devel-0.8.0-1.el8.x86_64.rpm
wget https://ci1.netdef.org/artifact/RPKI-RTRLIB/shared/build-147/RedHat-8-x86_64-Packages/librtr-doc-0.8.0-1.el8.noarch.rpm
wget https://ci1.netdef.org/artifact/RPKI-RTRLIB/shared/build-147/RedHat-8-x86_64-Packages/rtr-tools-0.8.0-1.el8.x86_64.rpm
Install the librtr package using rpm command
rpm -ivh *.rpm
cd
Now, we are ready for FRR installation, clone the repo
git clone https://github.com/frrouting/frr.git frr
cd frr
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
Prepare for compilation
./bootstrap.sh
./configure --with-pkg-extra-version=-MyRPMVersion
make dist
Make RPMs
mkdir rpmbuild mkdir rpmbuild/SOURCES mkdir rpmbuild/SPECS cp redhat/.spec rpmbuild/SPECS/ cp frr.tar.gz rpmbuild/SOURCES/
Edit the FRR spec as required; default FPM is enabled as per this config - if required EDIT, otherwise skip it
rpmbuild/SPECS/frr.spec
Build RPMs
rpmbuild --define "_topdir pwd/rpmbuild" -ba rpmbuild/SPECS/frr.spec
You should have RPMs in rpmbuild/RPMS/x86_64/ path, install using rpm command
rpm -ivh *.rpm
Edit the /etc/frr/daemons to enable bgpd
bgpd=yes [from no]
Start the FRR daemon
systemctl start frr
Check the status of FRR
systemctl status frr
Thanks @ton31337
@ton31337 Now I am looking for some references to listen to route change events using FPM and sends the routes information to our remote data plane - any references to that?
Let's get back to https://github.com/FRRouting/frr/discussions/11746