Hello, Perhaps this is a bug, but I thought I'd start with R-Help. I'm trying to compile R-1.4.1 on a new Sun-Blade running Solaris 2.8 ( I got it running with no problem on older SUNs) I get the following error after doing the usual ./configure and make: gcc -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c arithmetic.c -o arithmetic.o arithmetic.c:672: #error code requires that int have 32 bits *** Error code 1 which is generated by the following lines in src/main/arithmetic.c ####################################################################### 1. /* The tests using integer comparisons are a bit faster than the tests using doubles, but they depend on a two's complement representation (but that is almost universal). The tests that compare results to double's depend on being able to accurately represent all int's as double's. Since int's are almost universally 32 bit that should be OK. */ #ifndef INT_32_BITS /* configure checks whehter int is 32 bits. If not this code will need to be rewritten. Since 32 bit ints are pretty much universal, we can worry about writing alternate code when the need arises. To be safe, we signal a compiler error if int is not 32 bits. */ # error code requires that int have 32 bits #else /* Just to be on the safe side, configure ought to check that the mashine uses two's complement. A define like #define USES_TWOS_COMPLEMENT (~0 == (unsigned) -1) might work, but at least one compiler (CodeWarrior 6) chokes on it. So for now just assume it is true. */ ####################################################################### So it seems that I now have 64 bit integers? Has anyone else had this problem? I did search the bugs list, and didn't find it. R-Help archive shows a query: [R] [ 1.4.0] Compilation with 64 bits on Irix Luca.Toldo at merck.de (Mon Jan 21 2002 - 14:44:16 CET) which has no answer. If it relates to the SGI build question from [R] R in IRIX 64-bit Isaac Neuhaus (Mon Feb 04 2002 - 17:41:53 CET) I don't know how to translate the answers. Help would be much appreciated. Jim Jim Robison-Cox ____________ Department of Math Sciences | | phone: (406)994-5340 2-214 Wilson Hall \ BZN, MT | FAX: (406)994-1789 Montana State University | *_______| Bozeman, MT 59717-2400 \_| e-mail: jimrc at math.montana.edu -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 3 Apr 2002, Jim Robison-Cox wrote:> > So it seems that I now have 64 bit integers? > Has anyone else had this problem?There should be a compiler flag to have 32bit ints and 64bit longs. On some Unix compilers this is the default even for 64bit machines (eg the Sun Enterprise Server we used to have). I'm surprised that configure didn't find a problem with the Fortran compiler -- I thought Fortran INTEGER was specified to be a 32 bit type, but we test that Fortran and C agree during configuration. -thomas -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 3 Apr 2002, Jim Robison-Cox wrote:> Hello, > > Perhaps this is a bug, but I thought I'd start with R-Help. > > I'm trying to compile R-1.4.1 on a new Sun-Blade running Solaris 2.8 > ( I got it running with no problem on older SUNs)Which version of gcc, which options? gcc is normally built to have 32-bit ints and 32-bit longs on 64-bit Solaris. There are flags such as -m32, -m64, -mcmodel=code-model, However, my Solaris version of gcc says -m32 -m64 Generate code for a 32-bit or 64-bit environment. The 32-bit environment sets int, long and pointer to 32 bits. The 64-bit environment sets int to 32 bits and long and pointer to 64 bits. I use Sun compilers on 64-bit Solaris, as they perform a lot better in my tests. -- 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._