Ruby on a Cray SV1

Believe it or not, I would like to install ruby on a Cray SV1.

However, the compilation is failing for 1.6.7 using Cray’s cc
compiler,

     cc -g -I. -I. -I/u/kleb/local/include -c dir.c

CC-20 cc: ERROR File = dir.c, Line = 433
The identifier “MAXPATHLEN” is undefined.

   int size = MAXPATHLEN;

Where to I go from here? (Short of trying to compile gcc too.)

There are also a bunch of compilation warnings for bignum.c, e.g.,

CC-63 cc: WARNING File = bignum.c, Line = 1317
The indicated shift count is too large.

     num = BIGUP(xds[i]);
           ^

Total warnings detected in bignum.c: 61

Regards,

···


Bil Kleb
NASA Langley Research Center
Hampton, Virginia, USA

Hi,

However, the compilation is failing for 1.6.7 using Cray’s cc
compiler,

     cc -g -I. -I. -I/u/kleb/local/include -c dir.c

CC-20 cc: ERROR File = dir.c, Line = 433
The identifier “MAXPATHLEN” is undefined.

   int size = MAXPATHLEN;

Where to I go from here? (Short of trying to compile gcc too.)

Cray has sys/param.h but no MAXPATHLEN? Try with following
patch.

There are also a bunch of compilation warnings for bignum.c, e.g.,

CC-63 cc: WARNING File = bignum.c, Line = 1317
The indicated shift count is too large.

     num = BIGUP(xds[i]);
           ^

Total warnings detected in bignum.c: 61

What does the command display?

$ grep SIZEOF config.h

Index: file.c

···

At Fri, 25 Oct 2002 04:06:15 +0900, Bil Kleb wrote:

RCS file: /cvs/ruby/src/ruby/file.c,v
retrieving revision 1.41.2.33
diff -u -2 -p -r1.41.2.33 file.c
— file.c 25 Sep 2002 07:07:37 -0000 1.41.2.33
+++ file.c 24 Oct 2002 22:12:33 -0000
@@ -34,5 +34,6 @@ int flock _((int, int));
#ifdef HAVE_SYS_PARAM_H

include <sys/param.h>

-#else
+#endif
+#ifndef MAXPATHLEN

define MAXPATHLEN 1024

#endif


Nobu Nakada