Odd problems trying to make use of libbind as a replacement resolver...

Paul Vixie vixie at sa.vix.com
Mon Oct 17 13:58:36 UTC 2005


Brad Knowles <brad at stop.mail-abuse.org> writes:

> 	It's a lot harder than you think to maintain "source level API 
> compatibility" across this level of development.

well, yeah, but that's not what's going on in this case.

every system vendor or integrator who uses chunks of BIND in their library
packages it differently.  they usually rename our gethostbyname() symbol to
something else and they provide their own that does some kind of
/etc/nsswitch.conf thing.  they include parts of res_*() but sometimes not
all of res_n*().  they add their own flag bits and logic to deal with them
and then they have to renumber our newer flag bits for binary compatibility.
they put some of our code in libc, some in other libraries.  they split our
stuff up into one function per module, or sort our functions into different
modules than we used.  they change the size of structures, or they work really
hard to keep the size of structures from changing when we change them, for
backward binary compatibility.

this isn't like X11 where more or less one entity ships more or less one set
of libraries and all vendors more or less import it unchanged.  BIND's older
libraries (meaning BIND4 and BIND8) nearly always get "piecemealed" by every
vendor or integrator who incorporates them.

when i want to build against res_n*() for a dns-aware application, i build
it inside a BIND8 tree and i link it statically.  and sometimes even that
breaks, due to re-modularization such that a symbol i pulled in called X is
in the same BIND module as Y, whereas in the system libraries, Y is in the
same module as Z, and something else i did pulled something else in from the
system library that needed Z, and so Y is a duplicate symbol definition.
whenever that happens, BIND8 itself will usually also not be able to build,
and so we split X and Y into separate modules to increase granularity, but
this often requires things that used to be "static" to be public with a "__"
on the front of the name, which sometimes conflicts with others who have done
similar things.

my current belief is, a library is better if it exports fewer symbols, like
sleepycat DB.
-- 
Paul Vixie



More information about the bind-users mailing list