no name resolution in busybox system

Jun 21, 2007 3 Replies

I created an embedded (CF card based) system using a glibc linked version of busybox. I do have a /etc/nsswitch.conf file but I cannot get any name resolution for the entries in /etc/hosts.



Some of my custom programs do gethostbyname() calls and they also fail so the problem is not busybox specific.



Any clues?



and what is in your /etc/nsswitch.conf file?

That's not the issue...trust me...

Problem was, that modern glibc breaks up services into several different libraries. It is enough of an unforgivable sin to not be able to create a static binary that uses naming services unless you dynamically link glibc, but to then have to include additional support libraries besides libc.so... well, this is what happens when you have a large group of undisciplined programmers working on something and no draconian authority to force things in a specific direction.

But I'm getting close to my other rant about how modern linux is becoming less and less suited for embedded applications...so I'll shut up for now.

-regards

Ah that would bite me too. I'd not caught up with that, still using 2.4 era distributions for most of my current dev efforts. Quick logon to a very recent linux box, and indeed man resolver has the "Link with

-lresolv." advice. wonder why the glibc guys split it out?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required