Current-Users archive

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

Re: having problems using 'gethostbyname'



I don't understand why I should have this problem, because this is the only -single- program that won't work.
 
I'm working on porting an industrial control system called EPICS over to NetBSD.  One of the components of that system is called edm (Extensible Display Manager), which is the only program in the system that doesn't work.
 
Edm is a pretty big program, made up of around 10-15 different libraries and component parts.
 
The problem this program is having is clearly in the 'hosts' line of the nsswitch.conf file, and as I change my nsswitch.conf file, I can change the failure message from 'nss_dns.so.0' to 'nss_files.so.0' (don't see an error on loading 'nss_nis.so.0' however).
 
Other programs in the group clearly don't have this problem, and work fine.  I'm assuming it's some kind of a linkage problem, but libc is referenced and linked by almost all of the programs.
 
Is there a way I can trace through this?
 
David

On Sat, Dec 13, 2008 at 5:37 AM, Matthias Scheler <tron%zhadum.org.uk@localhost> wrote:

On 12 Dec 2008, at 19:25, David Dudley wrote:
I have a C++ program that I'm trying to get running.

Could you please tell us what program that is?


It uses the 'gethostbyname' function call,

If it is your own program you would be much better of to use
getaddrinfo(3) instead.


and when I try to load it, I get

'Shared object "nss_dns.so.0" not found'

What does your "/etc/nsswitch.conf" look like?


Where is this located, and how do I make sure it's available?

It is part of "libc" and should therefore be available.

       Kind regards

--
Matthias Scheler                           http://zhadum.org.uk/





Home | Main Index | Thread Index | Old Index