I'm trying to compile R-beta on IRIX using the native MipsPro 7.4
compilers, without great satisfaction. A list of problems is given
below, and any advice on solving them is appreciated.
Martyn
Configuration:
-------------
Here are the configuration options I am using
./configure CC=cc CXX=CC F77=f77 CPPFLAGS="-I/usr/freeware/include"
LDFLAGS="-L/usr/freeware/lib32" CFLAGS="-g -O2"
CXXFLAGS="-g -O2"
FFLAGS="-g -O2"
The CPPFLAGS and LDFLAGS are required for readline and NLS capabilities.
The compilers are not optimized by default so you need to supply the
relevant flags.
Major problems:
--------------
1) inline function in src/extra/bzip2
The function BZ2_indexIntoF is declared inline in bzlib.c and extern in
bzlib_private.h. The linker claims that the symbol is undefined.
This can be solved by removing the R_INLINE keyword. I can't see
another solution, and reading these guidelines on inlining
( http://www.greenend.org.uk/rjk/2003/03/inline.html ) leaves me no
wiser.
2) IEEE arithmetic
The standalone math library fails to compile, as the compiler chokes on
the definition of ML_POSINF, ML_NEGINF and ML_NAN, e.g.
> cc-1195 cc: ERROR File = mlutils.c, Line = 130
> The indicated floating-point operation result is out of range.
>
> double NA_REAL = ML_NAN;
where ML_NAN is defined as (0.0 / 0.0) in nmath.h. The compiler flag
-OPT:IEEE_NaN_inf=ON is supposed to enforce IEEE arithmetic but
apparently isn't enough.
Minor problems
--------------
3) Make
IRIX make does not like continuation lines followed only by a comment.
So, for example, these lines from src/appl/Makefile.in
OBJECTS = $(SOURCES_C:.c=.o) $(SOURCES_F:.f=.o)\
@USE_EXTERNAL_BLAS_FALSE@ blas.o @COMPILE_DOUBLE_COMPLEX_FALSE@ zgemm.o
which become
OBJECTS = $(SOURCES_C:.c=.o) $(SOURCES_F:.f=.o) \
# blas.o zgemm.o
in the Makefile, cause an error. I have worked around this by joining
the two lines, but the problem recurs several times in the tests
directory. I shall probably fall back on gmake.
4) Building in a setgid directory
This isn't an IRIX-specific problem. The administrators provide some
"scratch" space for temporary files in a setgid directory and I
started
building R here. All files have the group "sys" of which ordinary
users are not members. This causes some difficulty with the
installation of files in src/library/<libname>/inst/po. I can't give
the exact error message as I have accidentally deleted the file in which
I was making notes, but it's an ownership problem.
5) strptime
The problem with strptime documented in the R-admin manual is still
present on this system (release 6.5.27), although it is supposed to have
been solved in release 6.5.22m. Briefly, is.na fails to recognize a
valid POSIX time:
> strptime("1910/1/1", "%Y/%m/%d")
[1] "1910-01-01"> is.na(strptime("1910/1/1", "%Y/%m/%d"))
[1] TRUE
I have not tried the suggested work-around yet.