[Rd] Error compiling on HP-UX
hin-tak.leung at cimr.cam.ac.uk
Tue Dec 19 18:13:56 CET 2006
Pascal A. Niklaus wrote:
> BTW, the error only occurs if netdb.h is included *after* config.h. Not sure
> if this helps...
Google have the answer :-). It looks like the gcc folks and some
HP engineers know about this issue but cannot settle on what to do
with it - see this thread:
It seems that you have two ways out - either use the HP compiler to
build R, or the older gcc 3.x... or if you are feeling lucky, patching
gcc with the patch in that thread and rebuild gcc. (or check if any
similiar change has managed to get into gcc later). Sorry can't
see other alternatives :-(.
If you need to understand what the patch does - gcc on some platforms
keeps some "private" versions of hacked-up system includes in a
private location, when they are known to be slightly
funny and broken (as in this case). The patch just declares the file
as broken on *hp-hpux11* and create that private version of it.
The objection seems to be that the patch affects too many platforms (the
intial poster has an HP address did say he tested on IA64 and PA
HP-UX's, so I don't know what other HP-UXs are out there), so it is
possible that a later gcc may include a restrictive version of the
It seems that any network-related programs are affected, so it might
be a good idea to bite the bullet and patch and rebuild gcc, or
at least, keep gcc 3.x around.
More information about the R-devel