On 12/10/06, <b class="gmail_sendername">Yann E. MORIN</b> &lt;<a href="mailto:yann.morin.1998@anciens.enib.fr">yann.morin.1998@anciens.enib.fr</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Denis, all,<br><br>On Sunday 10 December 2006 040, Denis Vlasenko wrote:<br>&gt; Static glibc cannot do name resolution. Forget &quot;ping &lt;hostname&gt;&quot; -<br>&gt; it won't work. (Didn't check recently - maybe fixed now).
<br><br>Yes it does. *But* you have to have at least one of those:<br>&nbsp;&nbsp; libnss_{compat,dns,files,hesiod,nis{,plus}}*.so<br><br>And, yes, those are shared libraries, and you need them to be present even if<br>your binary was statically linked. NSS stands for Name Service Switch, and is
<br>configured via /etc/nsswitch.conf.<br><br>And those libraries are linked against libc.so and ld-linux.so, then you'll<br>have to have the shared C library and the dynamic loader as well!<br><br>Thus, compiling static binaries, which require name services (eg. DNS), with
<br>glibc anyway sucks in libc.so and at least one of the libnss libraries...<br><br>So, stay away from static linking with glibc. Use uClibc.<br><br>Regards,<br>Yann E. MORIN.</blockquote><div><br>Well said.&nbsp; There really isn't much of a reason to statically link with glibc.&nbsp; If you do, you can live with seeing Busybox spit out some warnings.
<br></div><br></div>