Re: [Rd] Error compiling on HP-UX

From: Hin-Tak Leung <hin-tak.leung_at_cimr.cam.ac.uk>
Date: Tue 19 Dec 2006 - 17:13:56 GMT

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



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Dec 20 14:08:23 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 20 Dec 2006 - 03:30:55 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.