Info Node: (efaq)Problems talking to certain hosts
(efaq)Problems talking to certain hosts
Why can't Emacs talk to certain hosts (or certain hostnames)?
=============================================================
The problem may be that Emacs is linked with a wimpier version of
`gethostbyname' than the rest of the programs on the machine. This is
often manifested as a message on startup of "X server not responding.
Check your `DISPLAY' environment variable." or a message of "Unknown
host" from `open-network-stream'.
On a Sun, this may be because Emacs had to be linked with the static
C library. The version of `gethostbyname' in the static C library may
only look in `/etc/hosts' and the NIS (YP) maps, while the version in
the dynamic C library may be smart enough to check DNS in addition to
or instead of NIS. On a Motorola Delta running System V R3.6, the
version of `gethostbyname' in the standard library works, but the one
that works with NIS doesn't (the one you get with -linet). Other
operating systems have similar problems.
Try these options:
* Explicitly add the host you want to communicate with to
`/etc/hosts'.
* Relink Emacs with this line in `src/config.h':
#define LIBS_SYSTEM -lresolv
* Replace `gethostbyname' and friends in `libc.a' with more useful
versions such as the ones in `libresolv.a'. Then relink Emacs.
* If you are actually running NIS, make sure that `ypbind' is
properly told to do DNS lookups with the correct command line
switch.