[R] Installation help

Tim Hoar thoar at cgd.ucar.edu
Thu Jul 26 16:55:21 CEST 2001


Leslea,

Turns out I did this just last week ...

It is imperative that your LD_LIBRARY_PATH environment variable have
the Sun compilers. I have attached my config.site file -- which has
the optimization levels turned up pretty high (4 out of 5) for both
the cc and f90 compilers. For whatever reason, I left the c++ optimization
at 2 ...

We have a lot of the GNU libraries (readline -- which is necessary for
the command-line editing/history to be operational, and makeinfo -- which
is necessary to create the manuals in both "info" and .html ... ) as well
as some of the other necessary libraries (netCDF)  in a separate area
called    /contrib/[lib,include]   , so the config.site file reflects this.
For us, this is also where I installed R ... /contrib/R-1.3.0/bin/R    is
slinked to /contrib/bin/R   and /contrib/bin is in everyones PATH.

The exact sequence I used was:

./configure --prefix=/contrib/R-1.3.0 --enable-R-profiling --with-readline --with-x --cache-file=/dev/null
make
make install
make install-dvi
make install-pdf

because our version of makeinfo is out-of-date, I did not make the info versions
of the manuals, nor the html version. The problem is, the html versions are featured
prominently in the help.start() widget.

By specifying cache-file=/dev/null  you are guaranteed to actually use the current
config.site, not the config.cache version ...

Good luck,

Tim

> Date: Wed, 25 Jul 2001 12:36:02 -0600
> From: Leslea J. Lehoucq <ljlehou at sandia.gov>
> To: R-help at hypatia.math.ethz.ch
> Cc: ljlehou at sandia.gov
> Subject: [R] Installation help
>
> Hello,
>
> I am trying to compile R using the Sun WorkShop 6.0 (Forte) compilers.
> I don't think I am having a problem with the compilers, but instead with
>
> figuring out how to modify the R configuration to use non-Gnu compilers.
>
> I found in your documentation that one should modify the config.site
> file
> to change compilers, compiler flags, library paths, etc.  I made
> modifications
> in this file, but the configure script still seems to be relying on the
> Gnu
> compilers rather than the compilers I've specified.  It picks up my
> changes
> to the fortran compiler (using f77 instead of g77), but ignores my
> specification
> of the cc compiler rather than gcc.  Since I couldn't use config.site to
> fix
> my problem, I configured with whatever the configure script was giving
> me,
> and then went into the Makeconf file to change compiler, library paths,
> and
> other flags.  I have made some progress in compiling (i.e. when I run
> gmake I am getting the right compilers, paths, and flags), but my build
> is
> failing at a certain point.
>
> Do you know of anyone who has compiled R with the Solaris WorkShop 6.0
> (Forte) compilers?  Pointers would be greatly appreciated.
>
> I am attaching my config.site file, and the output from running
> configure
> (config.out). Additionally, I am attaching the output from running gmake
>
> (make.out).
>
> Thanks,
>
>     Leslea J. Lehoucq
>     Sandia National Labs
>     Organization 8950
>     Computational Sciences and Mathematics Research
>     Phone: (505) 844-1972
>     Fax:     (505) 845-7442
>
>
>

## Tim Hoar, Associate Scientist              email: thoar at ucar.edu     ##
## Geophysical Statistics Project             phone: 303-497-1708       ##
## National Center for Atmospheric Research   FAX  : 303-497-1333       ##
## Boulder, CO  80307                    http://www.cgd.ucar.edu/~thoar ##

-------------- next part --------------
#! /bin/sh

### This file is part of R.
###
### R is free software; you can redistribute it and/or modify it under
### the terms of the GNU General Public License as published by the Free
### Software Foundation; either version 2 of the License, or (at your
### option) any later version.
###
### R is distributed in the hope that it will be useful, but WITHOUT ANY
### WARRANTY; without even the implied warranty of MERCHANTABILITY or
### FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
### License for more details.
###
### You should have received a copy of the GNU General Public License
### along with R; if not, you can obtain it via the World Wide Web at
### `http://www.gnu.org/copyleft/gpl.html', or by writing to the Free
### Software Foundation, 59 Temple Place -- Suite 330, Boston, MA
### 02111-3307, USE.

# By means of this file you can (also) provide default values for the
# configuration process.  To set variables, uncomment the VAR=DEFAULT
# lines and set DEFAULT according to your needs.

# The command used to spool PostScript files to the printer.
# If unspecified, the system will look for either "lpr" or "lp"
# R_PRINTCMD=lpr

# The paper size for the local (PostScript) printer.
# It must either be left blank or set to one of "a4" or "letter".
# If left blank the system will use "a4".
  R_PAPERSIZE=letter

# The default behavior of R if it encounters EOF in batch mode.
# Set this to one of "--save" or "--no-save" depending whether you
# want automatic saving of `.RData' or not.
# R_BATCHSAVE=

# The command which runs the C compiler.
# If unspecified, a search is made for gcc and cc (in that order).
# To override this choice, specify the name of the command which runs
# the compiler here, for example `c89'.
  CC=/opt/SUNWspro/bin/cc

# Debugging and optimization options for the C compiler.
# Use this to specify CFLAGS for the version of the C compiler specified
# above.  If unspecified, defaults to "-g -O2" for gcc, and "-g" in all
# other cases.
  CFLAGS="-g -xO4"

# The following additional CFLAGS to be used only in the main compilation
# and only in building shared libraries respectively. For example,
# on some systems one needs MAIN_CFLAGS=-pg when profiling.
# MAIN_CFLAGS=
# SHLIB_CFLAGS=

# Header file search directory (`-IDIR') and any other miscellaneous
# options for the C preprocessor and compiler.
# If unset defaults to `-I/usr/local/include'.
  CPPFLAGS=-I/contrib/include

# The command which runs the the FORTRAN compiler.
# If unspecified, a search is made for g77, f77, xlf, cf77, cft77,
# pgf77, fl32, af77, fort77, f90, xlf90, pgf90, epcf90, f95, xlf95,
# lf95, g95, and fc (in that order).  If none of these is found, f2c is
# used if found; otherwise, R cannot be compiled.  The search mechanism
# can be changed using the `--with-g77', `--with-f77', and `--with-f2c'
# command line options to configure.
  FC=/opt/SUNWspro/bin/f90

# Options for the FORTRAN compiler.
# Use this to specify FFLAGS for the version of the compiler specified
# above.  If unspecified, defaults to "-O2" for g77, and "" otherwise.
  FFLAGS="-g -O4"

# The following additional FFLAGS to be used only in the main compilation
# and only in building shared libraries respectively. For example,
# on some systems one needs MAIN_FFLAGS=-pg when profiling.
# MAIN_FFLAGS=
# SHLIB_FFLAGS=

# The command to be used to load the main R binary.
# This is usually the FORTRAN or C compiler, but the automatic choice
# can be overriden by means of this variable.
# MAIN_LD=

# The flags which are necessary for loading main program which will load
# DLLs at runtime.  HP-UX and Linux-elf are examples of platforms which
# use this.  These platforms are already taken care of by configure,
# and anything set here will be in addition unless MAIN_LD is given.
# For example, one can set flags for profiling here.
# MAIN_LDFLAGS=-L/home/thoar/lib/readline

# Any special flags which must be used when compiling C code to be
# turned into a shared library.  This is typically something like -fpic
# or -fPIC.  If this variable is left unspecified an attempt is made to
# automatically detect the correct value by configure.
# CPICFLAGS=

# The following variable can be used to provide any PIC flags for the
# FORTRAN compiler (if you are using one).  If not specified, the value
# of CPICFLAGS above is used.
# FPICFLAGS=

# The command to be used to load shared libraries which contain object
# files from a C or Fortran compiler only.  This is usually the C
# compiler or `ld', but the automatic choice can be overridden by means
# of this variable.
# SHLIB_LD=

# Any special flags which are required by the linker when creating
# shared libraries containing object files from a C or Fortran
# compiler only.  This is usually automatically detected by configure,
# and anything set here will be in addition unless SHLIB_LD is given.
# SHLIB_LDFLAGS=

# For `-l' and `-L' options to pass to the linker.
# `-L' options set here will be prepended to LD_LIBRARY_PATH at run time
# If unset defaults to `-L/usr/local/lib'.
# LIBS=-L/home/thoar/lib/readline -lreadline

# The command which runs the C++ compiler.  It not specified, configure
# uses the values of the environment variables `CXX' or `CCC' if set,
# and then looks under the names `c++', `g++', `gcc', `CC', `cxx', and
# `cc++' (in that order).
# CXX=/opt/SUNWspro/bin/cc did not work -- TJH

# Options for the C++ compiler.
# CXXFLAGS=

# Any special flags which must be used when compiling C++ code to be
# turned into a shared library.  If this variable is left unspecified
# an attempt is made to automatically detect the correct value by
# configure.
# CXXPICFLAGS=


# The command to be used to load shared libraries which contain object
# files from a C++ compiler.  This is usually the C++ compiler/linker,
# but the automatic choice can be overridden by means of this variable.
# SHLIB_CXXLD=

# Any special flags which are required when creating shared libraries
# containing object files from a C++ compiler.  This is usually
# automatically detected by configure, and anything set here will be in
# addition unless SHLIB_CXXLD is given.
# SHLIB_CXXLDFLAGS=

# Tcl/Tk settings.
# Use TCLTK_LIBS for all ALL `-L' and `-l' options needed for linking
# against the Tcl and Tk library.
# TCLTK_LIBS=
# Use TCLTK_CPPFLAGS for all `-I' options needed for finding the tcl.h
# and tk.h headers.
# TCLTK_CPPFLAGS=

# make name.
# Set this if you want to use a make by another name, for example 
# if your GNU make is called `gmake', use MAKE=gmake.
# MAKE=


More information about the R-help mailing list