__ns_put16 and shared libresolv

Frédéric L. W. Meunier 2@pervalidus.net
Sun Jan 1 18:42:00 GMT 2006


When linking an application (host - 
http://www.weird.com/~woods/projects/host.html) with -lresolv, 
I got undefined references to __ns_put16, but linking 
statically against /usr/lib/libresolv.a worked.

I noticed an identical report at 
http://sourceware.org/ml/bug-glibc/2002-01/msg00105.html , but 
this was 4 years ago.

Is the shared and static linking difference a bug, "feature", 
or what?

BTW, the Makefile for host has this:

# GNU LibC (i.e. all variants of GNU/Linux) has a horrible mis-mash of
# half-baked header files and mangled resolver subroutines, at least
# as of 2.3.x.  E.g. there's an __RES define in <resolv.h> and a
# __NAMESER define in <arpa/nameser.h> indicating it to be BIND-8
# compatible, but there is no implementation of getipnodebyname() in
# sight.  Even worse gethostbyaddr() is totally broken and doesn't
# return multiple PTRs.  PLEASE build & link with BIND-8.4.0 or newer!

I don't know if it's "true" or still applies with 2.3.6.

-- 
How to contact me - http://www.pervalidus.net/contact.html



More information about the Libc-alpha mailing list