From macq at llnl.gov  Tue Nov  6 02:28:37 2007
From: macq at llnl.gov (Don MacQueen)
Date: Mon, 5 Nov 2007 17:28:37 -0800
Subject: [Rd] FYI: issue with arpa/inet.h on SunOS 5.9 (old gcc?)
Message-ID: <p06230907c355359f870f@[128.115.153.6]>

This just information of my experience installing R on SunOS 5.9 
today, not a request for help.
(in case anyone cares, and if not, I apologize for the distraction)

I am building R 2.6.0 (patched; svn revision 43319, 2007-11-01) and 
encountered the problem described below.

I believe the problem is an old gcc (version 3.0.4, built some 5 
years ago), because the warnings do not occur when I specify
    CC = cc
in the environment before configuring, and building R succeeds.

Hence I'm mailing to r-devel instead of r-bugs, as suggested in the 
warning messages.

I don't have much information about the cc I used (I'm not the 
sysadmin of this or any Solaris machine), other than it resides in 
/opt/SUNWspro, and appears to be part of "Sun Studio 11", whatever 
that is.


The messages from R's configure were:

configure: WARNING: arpa/inet.h: present but cannot be compiled
configure: WARNING: arpa/inet.h:     check for missing prerequisite headers?
configure: WARNING: arpa/inet.h: see the Autoconf documentation
configure: WARNING: arpa/inet.h:     section "Present But Cannot Be Compiled"
configure: WARNING: arpa/inet.h: proceeding with the preprocessor's result
configure: WARNING: arpa/inet.h: in the future, the compiler will 
take precedence
configure: WARNING:     ## ----------------------------------- ##
configure: WARNING:     ## Report this to r-bugs at R-project.org ##
configure: WARNING:     ## ----------------------------------- ##

And then the same set of warnings for
   netdb.h
   netinet/in.h
   sys/socket.h

At the very end configure reports:

configure: WARNING: could not determine type of socket length


Then, make fails with:

In file included from /usr/include/netinet/in.h:41,
                  from /usr/include/netdb.h:98,
                  from ../../../R-patched/src/main/platform.c:1586:
/usr/include/sys/stream.h:307: parse error before "projid_t"
make[3]: *** [platform.o] Error 1
make[3]: Leaving directory `/apps/kosapps/R/R-2.6.0/build/src/main'
make[2]: *** [R] Error 2
make[2]: Leaving directory `/apps/kosapps/R/R-2.6.0/build/src/main'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/apps/kosapps/R/R-2.6.0/build/src'
make: *** [R] Error 1

-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
925-423-1062



[Rd] FYI: issue with arpa/inet.h on SunOS 5.9 (old gcc?)
Don MacQueen