[Rd] Error compiling on HP-UX
Hin-Tak Leung
hin-tak.leung at cimr.cam.ac.uk
Tue Dec 19 18:13:56 CET 2006
Pascal A. Niklaus wrote:
<snipped>
> 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:
http://gcc.gnu.org/ml/gcc-patches/2006-05/threads.html#00482
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
change...
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.
Good luck.
Hin-Tak Leung
More information about the R-devel
mailing list