Skip to content

trouble to install the Rstream package

2 messages · Laurent Gautier, Brian Ripley

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

Any hint is welcome,



Laurent




--
Laurent Gautier                 CBS, Building 208, DTU
PhD. Student                    D-2800 Lyngby,Denmark
tel: +45 45 25 24 85            http://www.cbs.dtu.dk/laurent


-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010612/aab06ba6/attachment.html
#
On Tue, 12 Jun 2001, Laurent Gautier wrote:

            
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.