[Rd] robustbase compilation problem: probably boneheaded? maybe 32-bit?

Ben Bolker bbolker at gmail.com
Fri Jul 12 04:57:28 CEST 2013

With a recent SVN build (R Under development (unstable) (2013-07-10
r63264) -- "Unsuffered Consequences"), I'm having trouble installing the
robustbase package.  The bottom line is that I *think* it's a
32-bit-system problem, but I could easily be mistaken.

robustbase is passing its package checks:

 ... but from the names of the targets it doesn't look like it is tested
on 32-bit platforms?

  The error is:

gcc -std=gnu99 -I/usr/local/lib/R/include -DNDEBUG  -I/usr/local/include
   -fpic  -g -O2  -c init.c -o init.o
In file included from init.c:3:
robustbase.h:20: error: redefinition of typedef ‘R_xlen_t’
/usr/local/lib/R/include/Rinternals.h:69: note: previous declaration of
‘R_xlen_t’ was here

  As far as I can see there isn't any junk left over in my systems from
previous installs.

Rinternals.h has

    typedef ptrdiff_t R_xlen_t;
    typedef struct { R_xlen_t lv_length, lv_truelength; } R_long_vec_hdr_t;
# define R_XLEN_T_MAX 4503599627370496
# define R_SHORT_LEN_MAX 2147483647
# define R_LONG_VEC_TOKEN -1
    typedef int R_xlen_t;

 while robustbase has

# ifndef XLENGTH
   // for  R <= 2.15.x :
#  define XLENGTH(x) LENGTH(x)
   typedef int R_xlen_t;
# endif

 It seems the problem is that I have

#define SIZEOF_SIZE_T 4

in my config.log , which in turn turns off LONG_VECTOR_SUPPORT, which is
otherwise (?) assumed only to be true for R<=2.15.x ... can this be
because I'm on 32-bit Linux , or on old linux with gcc 4.4.3, or ... ?

  Can anyone confirm/enlighten me?

    Ben Bolker

More information about the R-devel mailing list