[R] trouble to install the Rstream package

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jun 12 18:30:13 CEST 2001


On Tue, 12 Jun 2001, Laurent Gautier wrote:

> Dear R-users,
>
>
> I successfully installed the package Rstreams under linux, but my first
> attempt to do so on SGI IRIX 6.5 (64bits) lead to the following error
> message.
>
> --------------------
> laurent at genome> R CMD INSTALL Rstreams
> Installing source package `Rstreams' ...
> creating cache ./config.cache
> checking for ftruncate... yes
> checking size of long double... 16
> updating cache ./config.cache
> creating ./config.status
> creating src/config.h
>  libs
> gcc -I/home/ibiology1/laurent/share/irix64/lib/R/include -DHAVE_CONFIG_H
> -I/usr/local/include   -fPIC  -O2 -c Rstreams.c -o Rstreams.o
> Rstreams.c: In function `readfloat':
> Rstreams.c:179: duplicate case value
> Rstreams.c:173: this is the first entry for that value
> Rstreams.c: In function `writefloat':
> Rstreams.c:284: duplicate case value
> Rstreams.c:278: this is the first entry for that value
> gmake: *** [Rstreams.o] Error 1
> ERROR: Compilation failed for package `Rstreams'
> -----------------
>
> I suspect an obvious mistake from my side, but I just cannot see what is
> wrong at the moment.

We've seen this before, on an Alpha.  Something is wrong in the configure,
for the code reads

        case 8:
            if (read(*handle, &d1, size) <= 0) goto enddata;
            if (*swapbytes) swap(&d1, size);
            result[i] = d1;
            break;
#if SIZEOF_LONG_DOUBLE > 8
        case sizeof(long double):
            if (read(*handle, &e1, size) <= 0) goto enddata;
            if (*swapbytes) swap(&e1, size);
            result[i] = (double) e1;
            break;
#endif

so this will only happen if sizeof(long double) is 8 and
SIZEOF_LONG_DOUBLE > 8.  I am very surprised that sizeof(long double)
is 8 on a 64-bit machine (SGI or Alpha) but that may reflect limitations
of gcc.

What does src/config.h say SIZEOF_LONG_DOUBLE is?

I can only presume that you have different compilers or compiler options
at configure and build times.  You may need to set CC=gcc, for example.


As a more general point, there is nothing in Rstreams that cannot be done
with binary connections, except reading S data objects which package
foreign now covers.  So for new code, use the alternatives.

-- 
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list