monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] coLinux and 0.26pre1: Address family not supported


From: Thomas Moschny
Subject: Re: [Monotone-devel] coLinux and 0.26pre1: Address family not supported by protocol
Date: Thu, 19 Jan 2006 00:55:12 +0100
User-agent: KMail/1.9.1

Matthew Gregan wrote:
> Was the semistatic binary built on a modern machine, and you're trying
> to use it on an older machine?  If so, what probably happened is that
> configure has detected getaddrinfo is available and has used it for name
> resolution in the netxx code.  However, getaddrinfo doesn't work well with
> statically linked binaries--in fact, the linker will warn you about this:
>
> % cc -static getaddrinfo.c
> /tmp/cclZTOsu.o: In function `main':
> getaddrinfo.c:(.text+0x84): warning: Using 'getaddrinfo' in statically
> linked applications requires at runtime the shared libraries from the glibc
> version used for linking
>
> ...which means that the statically linked binary will work on the machine I
> built it on, and any machine that happens to have a recent enough glibc,
> but will fail with address resolution errors on machines with a glibc that
> is too old.

Yes and no. 

The (old) semi-static builds were not completely static, (hence the name 
"semi-static"), but still dynamically linked to glibc, in order to *avoid* 
such problems with shared nss libraries that don't match the glibc version on 
the build machine.

However, in this special case, the problem was different: a present but 
non-functional getaddrinfo() function in old glibc versions. From the strace 
output Henry provided, it can be seen that getaddrinfo() does nothing on his 
system.

The problem was solved by building a binary that doesn't use getaddrinfo(),  
but gethostbyname() and getservbyname() instead.

-- 
Thomas Moschny <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]