res_* weak symbols missing from /usr/lib64/libresolv.so [mike@dbldog64 CIMS]$ nm -D /usr/lib/libresolv.so | grep res_search 0000000000006c60 T __res_search 0000000000006c60 W res_search [mike@dbldog64 CIMS]$ nm -D /usr/lib64/libresolv.so | grep res_search 0000003d4b707d00 T __res_search [mike@dbldog64 CIMS]$ This makes some configure scripts barf.
Then the configure scripts are broken. If you want to check for res_search, you need to #include <resolv.h> first. The res_* symbols in /usr/lib/libresolv.so are for compatibility only with very old glibc's, and given that the x86-64 port is fairly new, such compatibility is not needed there.
It seems a little backwards to me. Why preserve the __name and not the canonical name? So if understand correctly, given the following: AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(resolv, res_search) The last line is obviously wrong? Are all RH symbols going to be redefined as __ symbols in future releases? Will AC_CHECK_LIB be modified to handle this?
First of all, this is nothing RH specific, that's what upstream glibc does and there this originates from bind which is the origin of glibc's libresolv.so. If you are using AC_CHECK_LIB, you should use AC_CHECK_LIB(resolv, res_search) AC_CHECK_LIB(resolv, __res_search) or something like that, or better do an AC_TRY_LINK test for it.
Hmm, any possibility that the upstream developers got it wrong? Here's my point: AC_CHECK_LIB(resolv, res_search) Works on Solaris 2.5-10, AIX 4.x-5.x, HPUX 11.00-11.25, Suse, Debian, RH 7.2- 3.0 (x86). I'm curious what's the compelling feature we get now that justifies everyone changing their code?