But, "xxhash" is missing as a dependency.
My build don't have this dependency 🤷♂️
@zstepanek I think it's because @k0ste chose to link libyang2 instead of libyang3. Running namcap on libyang3 (or indeed libyang4, even though FRR doesn't build against it just yet) shows that it links xxhash. ldd just picked up the transitive dependency.
So a proper fix would be to declare xxhash as a dependency of libyang>=3. I've already done so on my fork libyang3, which you'll have to use before FRR works with libyang4.
@majenko, just use libyang 2.1.128, and build will be okay
libyang has been updated in AUR to 4.2.2 - and frr no longer compiles against it. Various functions have changed and flags have been removed since libyang3.
My build don't have this dependency 🤷♂️
[k0ste@host /]$ sudo ldd /usr/bin/zebra
linux-vdso.so.1 (0x00007fe5e86d1000)
libfrr.so.0 => /usr/lib/libfrr.so.0 (0x00007fe5e8000000)
libunwind.so.8 => /usr/lib/libunwind.so.8 (0x00007fe5e8695000)
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x00007fe5e8665000)
libprotobuf-c.so.1 => /usr/lib/libprotobuf-c.so.1 (0x00007fe5e865a000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x00007fe5e828f000)
libcap.so.2 => /usr/lib/libcap.so.2 (0x00007fe5e864e000)
libyang.so.2 => /usr/lib/libyang.so.2 (0x00007fe5e7ec0000)
libpcre2-posix.so.3 => /usr/lib/libpcre2-posix.so.3 (0x00007fe5e8647000)
liblua.so.5.4 => /usr/lib/liblua.so.5.4 (0x00007fe5e7e7b000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fe5e7d83000)
libjson-c.so.5 => /usr/lib/libjson-c.so.5 (0x00007fe5e827b000)
libatomic.so.1 => /usr/lib/libatomic.so.1 (0x00007fe5e8270000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fe5e7b93000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fe5e86d3000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007fe5e7b5f000)
libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007fe5e7ab3000)
[k0ste@host /]$
"For what binary?"
At least /usr/bin/ospfd and /usr/bin/zebra.
[root@igw-elite ~]# ldd /usr/bin/zebra
linux-vdso.so.1 (0x00007ffd351a3000)
libfrr.so.0 => /usr/lib/libfrr.so.0 (0x00007df487977000)
libunwind.so.8 => /usr/lib/libunwind.so.8 (0x00007df48795c000)
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x00007df48792c000)
libprotobuf-c.so.1 => /usr/lib/libprotobuf-c.so.1 (0x00007df487921000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x00007df4877b0000)
libcap.so.2 => /usr/lib/libcap.so.2 (0x00007df4877a4000)
libyang.so.3 => /usr/lib/libyang.so.3 (0x00007df48764e000)
libpcre2-posix.so.3 => /usr/lib/libpcre2-posix.so.3 (0x00007df487649000)
liblua.so.5.4 => /usr/lib/liblua.so.5.4 (0x00007df487604000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007df48750c000)
libjson-c.so.5 => /usr/lib/libjson-c.so.5 (0x00007df4874f8000)
libatomic.so.1 => /usr/lib/libatomic.so.1 (0x00007df4874ed000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007df4872fb000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007df487e17000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007df4872c7000)
libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007df48721b000)
libxxhash.so.0 => /usr/lib/libxxhash.so.0 (0x00007df487210000)
Hi. I can confirm that FRR works with current "libyang" - 3.12.2-1.
But, "xxhash" is missing as a dependency.
@Frankkkkk Thanks for the great work.
Edit: it seems like dependencies declared with version restrictions (e.g. libyang<3.0.0) do not work with provides entries (e.g. provides=('libyang')). So I guess this should be done instead:
diff --git a/PKGBUILD b/PKGBUILD
index b1a318d..8b772f8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@ arch=('x86_64' 'aarch64' 'armv7h')
url="https://frrouting.org"
license=('GPL2')
depends=('libcap' 'libnl' 'readline' 'ncurses' 'perl' 'pam' 'json-c' 'net-snmp'
- 'rtrlib' 'libyang>=2.1.128' 'libunwind' 'c-ares' 'protobuf-c' 'pcre2'
+ 'rtrlib' 'libyang2>=2.1.128' 'libunwind' 'c-ares' 'protobuf-c' 'pcre2'
'lua53' 'sqlite')
makedepends=('gcc' 'bison' 'perl-xml-libxml' 'python-sphinx')
checkdepends=('python-pytest')