From hin-tak.leung at cimr.cam.ac.uk  Tue Dec 19 18:13:56 2006
From: hin-tak.leung at cimr.cam.ac.uk (Hin-Tak Leung)
Date: Tue, 19 Dec 2006 17:13:56 +0000
Subject: [Rd] Error compiling on HP-UX
In-Reply-To: <200612191432.11240.pascal.niklaus@ipw.agrl.ethz.ch>
References: <200612181434.17135.pascal.niklaus@ipw.agrl.ethz.ch>
	<200612191213.30590.pascal.niklaus@ipw.agrl.ethz.ch>
	<4587CE97.3040109@cimr.cam.ac.uk>
	<200612191432.11240.pascal.niklaus@ipw.agrl.ethz.ch>
Message-ID: <45881DD4.3070204@cimr.cam.ac.uk>

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



[Rd] Error compiling on HP-UX
Hin-Tak Leung