Bug 151857 - Missing res_* symbols in 64bit libresolv.so
Summary: Missing res_* symbols in 64bit libresolv.so
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc
Version: 4.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-22 22:44 UTC by Mike Patnode
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-03-23 06:40:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike Patnode 2005-03-22 22:44:09 UTC
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 06:40:42 UTC
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 17:14:33 UTC
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?


Comment 3 Jakub Jelinek 2005-03-23 17:22:36 UTC
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 17:35:40 UTC
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?


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