Bug 2802 - rsync uses extraneous libresolv.dylib
Summary: rsync uses extraneous libresolv.dylib
Status: CLOSED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.5
Hardware: PPC Mac OS X
: P3 trivial (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-15 08:42 UTC by Peter Fales
Modified: 2006-03-12 02:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Fales 2005-06-15 08:42:58 UTC
When we build rsync on darwin 10.3, it's linked with -lresolv which is
/usr/lib/libresolv.dylib.   However, it's not really necessary because rsync
will still link and run if -lresolv is not used.   The only reason I noticed
this is that we sometimes take the 10.3 compiled binaries and run them on a 10.2
system.  Since 10.2 doesn't have this library, the binary won't run there - but
it will if libresolv is not used.

The configure test is:

checking for inet_ntop in -lresolv... yes

I'm guessing that it's adding -lresolv if this check passes, even if -lresolv is
not really needed to find the symbol.

This is probably a minor issue, but it seems like it would cleaner to not have
rsync depending on a library that it doesn't really need.
Comment 1 Wayne Davison 2005-12-14 15:54:39 UTC
I changed the AC_CHECK_LIB() macro to AC_SEARCH_LIBS() so that libresolv will not get included if it is not needed.  (This got rid of the need for libresolv on Linux, and I'll be checking the build farm to make sure that this doesn't cause a problem on other OSes.)