[Patch] Build fails with undefined references with slibtool.
Note: I intended to make a MR, but the system would not let me.
Patch: knot-dns-undefined.patch
When building knot-dns with slibtool (https://dev.midipix.org/cross/slibtool) the build fails with many undefined references.
These are basically the same 3 issues repeated.
ld: warning: libdnssec.so.8, needed by .libs/libknot.so, not found (try using -rpath or -rpath-link)
ld: .libs/libknotus.a(la-rrset-dump.o): undefined reference to symbol 'pow@@GLIBC_2.29'
ld: .libs/libknotus.a(la-error.o): undefined reference to symbol 'mdb_strerror'
These can be fixed by adding libdnssec.la
to LDADD
, adding $(math_LIBS)
and $(lmdb_LIBS)
to LDFLAGS
. I attached a patch that does this.
I am not sure what GNU libtool is doing to hide them, but it is a common occurrence that slibtool exposes undefined references that libtool hides by silently adding linker flags or ignoring -no-undefined
.
Also see this downstream issue: https://bugs.gentoo.org/778335