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

Bug#757941: busybox-static: DNS resolver stopped working in busybox-static version 1.22.0-7



21.09.2014 17:19, Diederik de Haas wrote:
> On Tuesday 12 August 2014 21:46:43 Michael Tokarev wrote:
>> Nope.  This is getaddrinfo() function.  So it is glibc, not gcc or
>> optimization.
>>
>> getaddrinfo() does not work in jessie glibc when linked statically.
>> It immediately returns "Name or service not known" (rc=-2) without
>> trying to read /etc/hosts or send dns queries.
> 
> Any news on this bug?
> 
> When I look at the diff from 1.22.0-6 to 1.22.0-7 it indeed doesn't seem likely 
> that the issue is in busybox itself.
> But when you look at the changelog of (e)glibc since 1.22.0-6 was released 
> there has been a new upstream release (2.19) and various patches relating to 
> dns resolving (as far as I can understand it).
> 
> Maybe this should be reassigned to (e)glibc?

This _is_ a glibc problem, and it can be trivially demonstrated by writing
a tiny program that calls, say, getaddrinfo() on its argument.  When built
statically it always returns NOTFOUND, without any attempt to load any
nss modules or make dns queries or even do a /etc/hosts lookup.

More, I don't think reassigning it to glibc will do any good either, because
static linking has been discoraged there for ages.

I'm thinking about building busybox-static against uclibc.  This means
compiling uclibc from uclibc-source during build time, but it is not much
more work than, say, compiling qemu (which also needs to link statically,
but has additional prob because it links with glib which can't be mixed
with uclibc).  But anyway it will be a much bigger change than I'd like
to implement here.

If anyone has better idea please share.

Thanks,

/mjt


Reply to: