kss28@mail.cba.nau.edu
2002-Mar-25  20:18 UTC
[Rd] int 32 bit error on SPARC 64bit (PR#1415)
Full_Name: Krassimir Sedmakov
Version: R-1.4.1
OS: Solaris 8
Submission from: (NULL) (134.114.165.52)
********
Problem:
********
When running make for R-1.4.1 on Solaris 8, SPARC 64 bit the following error
message is generated:
arithmetic.c:672: #error code requires that int have 32 bits
gmake[3]: *** [arithmetic.o] Error 1
gmake[3]: Leaving directory `/opt/R/R-1.4.1/src/main'
gmake[2]: *** [R] Error 2
gmake[2]: Leaving directory `/opt/R/R-1.4.1/src/main'
gmake[1]: *** [R] Error 1
gmake[1]: Leaving directory `/opt/R/R-1.4.1/src'
gmake: *** [R] Error 
*************
Related Code:
*************
***Related code in arithemtic.c file:
667  #ifndef INT_32_BITS
   668  /* configure checks whehter int is 32 bits.  If not this code will
   669     need to be rewritten.  Since 32 bit ints are pretty much universal,
   670     we can worry about writing alternate code when the need arises.
   671     To be safe, we signal a compiler error if int is not 32 bits. */
   672  # error code requires that int have 32 bits
   673  #else
   674  /* Just to be on the safe side, configure ought to check that the
   675     mashine uses two's complement. A define like
   676  #define USES_TWOS_COMPLEMENT (~0 == (unsigned) -1)
   677     might work, but at least one compiler (CodeWarrior 6) chokes on it.
   678     So for now just assume it is true.
   679  */
***Related code in configure file:
10871  if test "${ac_cv_sizeof_int}" = 4; then
10872    cat >> confdefs.h <<\EOF
10873  #define INT_32_BITS 1
10874  EOF
10875
10876  fi
10877  if test "${cross_compiling}" = yes; then
10878    warn_xcompile_sizeof_long="assuming C longs are 4 byte on
${host}"
10879    echo "configure: warning: ${warn_xcompile_sizeof_long}"
1>&2
10880  fi
*********
Solution:
*********
Run ./configure
Ignore warnings
in R-1.4.1/ directory create a file confdefs.h and enter (*see related configure
file)
#define INT_32_BITS 1
Run make
run make install
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ripley@stats.ox.ac.uk
2002-Mar-25  20:48 UTC
[Rd] int 32 bit error on SPARC 64bit (PR#1415)
You haven't told us anything about your compilers. You can set options to make ints 64bits, and you must not for use with R. This works correctly for me, using SunPro 6 compilers. The configure script reports the size of ints, and if this is not 4 bytes, change the options. If it is 4 bytes, the correct option will be set. On Mon, 25 Mar 2002 kss28@mail.cba.nau.edu wrote:> Full_Name: Krassimir Sedmakov > Version: R-1.4.1 > OS: Solaris 8 > Submission from: (NULL) (134.114.165.52) > > > ******** > Problem: > ******** > > When running make for R-1.4.1 on Solaris 8, SPARC 64 bit the following error > message is generated: > > arithmetic.c:672: #error code requires that int have 32 bits > gmake[3]: *** [arithmetic.o] Error 1 > gmake[3]: Leaving directory `/opt/R/R-1.4.1/src/main' > gmake[2]: *** [R] Error 2 > gmake[2]: Leaving directory `/opt/R/R-1.4.1/src/main' > gmake[1]: *** [R] Error 1 > gmake[1]: Leaving directory `/opt/R/R-1.4.1/src' > gmake: *** [R] Error > > ************* > Related Code: > ************* > > ***Related code in arithemtic.c file: > > 667 #ifndef INT_32_BITS > 668 /* configure checks whehter int is 32 bits. If not this code will > 669 need to be rewritten. Since 32 bit ints are pretty much universal, > 670 we can worry about writing alternate code when the need arises. > 671 To be safe, we signal a compiler error if int is not 32 bits. */ > 672 # error code requires that int have 32 bits > 673 #else > 674 /* Just to be on the safe side, configure ought to check that the > 675 mashine uses two's complement. A define like > 676 #define USES_TWOS_COMPLEMENT (~0 == (unsigned) -1) > 677 might work, but at least one compiler (CodeWarrior 6) chokes on it. > 678 So for now just assume it is true. > 679 */ > > ***Related code in configure file: > > 10871 if test "${ac_cv_sizeof_int}" = 4; then > 10872 cat >> confdefs.h <<\EOF > 10873 #define INT_32_BITS 1 > 10874 EOF > 10875 > 10876 fi > 10877 if test "${cross_compiling}" = yes; then > 10878 warn_xcompile_sizeof_long="assuming C longs are 4 byte on ${host}" > 10879 echo "configure: warning: ${warn_xcompile_sizeof_long}" 1>&2 > 10880 fi > > ********* > Solution: > ********* > Run ./configure > Ignore warnings > in R-1.4.1/ directory create a file confdefs.h and enter (*see related configure > file) > #define INT_32_BITS 1 > Run make > run make install > > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-devel 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-devel-request@stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- Brian D. Ripley, ripley@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-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._