Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jun 1998 20:22:33 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Hostas Red <kong@kong.spb.ru>
Cc:        current@FreeBSD.ORG
Subject:   Re: ssh 1.2.25: port broken on current 
Message-ID:  <199806161222.UAA03749@spinner.netplex.com.au>
In-Reply-To: Your message of "Tue, 16 Jun 1998 11:35:19 %2B0400." <Pine.BSF.3.96.980616112851.5743K-100000@kong.dorms.spbu.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
Hostas Red wrote:
> Hi!
> 
> On Tue, 16 Jun 1998, Peter Wemm wrote:
> 
> > > sshconnect.o: Undefined symbol `___inet_addr' referenced from text segmen
    t
> > > sshconnect.o: Undefined symbol `___inet_ntoa' referenced from text segmen
    t
> > > sshconnect.o: Undefined symbol `___inet_ntoa' referenced from text segmen
    t
> 
> [...]
> 
> > This is an include files / libc version mismatch.  It looks like you've 
> > updated the system includes, but have not updated libc yet.  Check the 
> > timestamps on /usr/include/arpa/inet.h and /usr/lib/libc.so.3.1 - they 
> > should be around the same.
> 
> Yes, it is. But - /usr/lib/aout/libc.so.3.1 (jun,16) almost the same date
> as /usr/include/arpa/inet.h (jun 12), but /usr/lib/libc.so.3.1 is
> (may,26). But - /usr/lib/aout in LIBPATH, not /usr/lib. Whats the problem?

At a guess, your ldconfig path in /etc/rc is putting /usr/lib first so 
you're getting the "old" library...


If you do a grep inet_ntoa /usr/include/arpa/inet.h, you'll get:

peter@overcee[8:15am]~src-133> grep inet_ntoa /usr/include/arpa/inet.h 
#define inet_ntoa       __inet_ntoa
[..]

And if you then look at the libraries:

peter@overcee[8:16pm]~src-135> nm /usr/lib/libc.so.3.1 | grep inet_ntoa
0003e1ac T  _inet_ntoa
peter@overcee[8:16pm]~src-136> nm /usr/lib/aout/libc.so.3.1 | grep inet_ntoa
         U  ___inet_ntoa
00044064 T  ___inet_ntoa
00000000 I  _inet_ntoa

The 'I' flag is "indirect", kinda like a backwards compatability alias so 
that you can run old programs that are linked against "_inet_addr".  New 
programs will be compiled to use "___inet_addr" because of the #define in 
arpa/inet.h.

Why do this?  It's part of the bind 8 resolver interface..  Paul Vixie has
done this in the name of posix linker namespace protection.  If you
happened a program that was unrelated to inet/socket/nameserver/etc, and 
it had it's own "inet_ntop()" function for some reason, under the old 
system you'd get a conflict, but under the new system you should be OK.

I'm not sure that it's worth the hassle, but I asked around and the 
consensis was to go with the flow.

> Adios,
> /KONG

Cheers,
-Peter
--
Peter Wemm <peter@netplex.com.au>   Netplex Consulting



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806161222.UAA03749>