Don MacQueen
2007-Nov-06 01:28 UTC
[Rd] FYI: issue with arpa/inet.h on SunOS 5.9 (old gcc?)
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
Prof Brian Ripley
2007-Nov-06 07:33 UTC
[Rd] FYI: issue with arpa/inet.h on SunOS 5.9 (old gcc?)
What OS was that compiler built for? This happened when you had a version of gcc built for the wrong version of the OS, as gcc captures system headers. (There's a warning about that in the R-admin manual.) The 'report to' message is autogenerated by autoconf. SunStudio 11 is a recent version of Sun's compilers, and much to be preferred to gcc 3.0.4 on that platform (and probably to any version of gcc there). On Mon, 5 Nov 2007, Don MacQueen wrote:> 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 > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595