Bug 151857 - Missing res_* symbols in 64bit libresolv.so
Missing res_* symbols in 64bit libresolv.so
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-03-22 17:44 EST by Mike Patnode
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-23 01:40:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mike Patnode 2005-03-22 17:44:09 EST
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.
Comment 1 Jakub Jelinek 2005-03-23 01:40:42 EST
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.
Comment 2 Mike Patnode 2005-03-23 12:14:33 EST
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 
Comment 3 Jakub Jelinek 2005-03-23 12:22:36 EST
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.
Comment 4 Mike Patnode 2005-03-23 12:35:40 EST
Hmm, any possibility that the upstream developers got it wrong?  Here's my 

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?

Note You need to log in before you can comment on or make changes to this bug.