undefined symbols in libomapi
Describe the bug
Calling dhclient
fails here with
dhclient: symbol lookup error: /usr/lib/libomapi.so.0: undefined symbol: dns_rootname
This is caused by a combination of -Wl,-as-needed
and -Wl,-no-add-nedded
linkerflags (although sounding similarly, they have diffierent semantics and latter one is the default e.g. on Fedora).
Because code in libomapi.so
uses functionality from libdns
and other libraries, it should be linked against them.
I fixed it with omapilibs.patch
Index: dhcp-4.4.1/omapip/Makefile.am.in
===================================================================
--- dhcp-4.4.1.orig/omapip/Makefile.am.in
+++ dhcp-4.4.1/omapip/Makefile.am.in
@@ -11,6 +11,10 @@ libomapi_@A@_SOURCES = protocol.c buffer
handle.c message.c convert.c hash.c auth.c inet_addr.c \
array.c trace.c toisc.c iscprint.c isclib.c
+libomapi_@A@_LIBADD = $(BINDLIBDNSDIR)/libdns.@A@ \
+ $(BINDLIBIRSDIR)/libirs.@A@ \
+ $(BINDLIBISCCFGDIR)/libisccfg.@A@
+
man_MANS = omapi.3
EXTRA_DIST = $(man_MANS)
Environment:
- seen with OpenEmbedded
thud
(http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/dhcp?h=thud)