[R] R-0.64.1 make problem: Solaris 2.4

Prof Brian D Ripley ripley at stats.ox.ac.uk
Mon Jun 28 08:54:50 CEST 1999


On Sun, 27 Jun 1999, Dennis Murphy wrote:

> Greetings,
> 
> I'm attempting to install R-0.64.1 on a Sun Sparc 20 running Solaris 2.4 with
> gcc-2.7.2.2, g77-0.5.20 and Gnu make 3.76-1.
> 
> On several occasions, the make process aborted when trying to build the shared object
> file for the modreg package (its first attempt at such a beast).  In all attempts, the error
> message is as follows:
> 
> ../../../../bin/R SHLIB -o modreg.so bsplvd.o bvalue.o bvalus.o ksmooth.o loessc.o 
> loessf.o ppr.o qsbart.o sbart.o sgram.o sinerp.o sslvrg.o stxwx.o
> make: Fatal error: Unknown option `-w'
> gmake[4]: *** [modreg.so] Error 1
> gmake[4]: Leaving directory `/tmp/R-0.64.1/src/library/modreg/src'

This is calling make not gmake, so you have not told the configure
process you will be using gmake. Try (under csh)

env MAKE=gmake ./configure

Alternatively, add

MAKE=gmake

to config.site.

Final alternative: use Sun's make.

> In addition, I got the following error messages in this directory on the latest attempt:
> 
> g77 -O2 -PIC -c loessf.f -o loessf.o
> gcc: unrecognized option `-PIC'
> g77 -O2 -PIC -c ppr.f -o ppr.o
> gcc: unrecognized option `-PIC'
> ...
> 
> In config.site, I specifically requested the option FPICFLAGS=-fPIC, consistent with
> CPICFLAGS.  I also set SHLIBLDFLAGS=-G in config.site. Furthermore, no errors
> or warnings about setting these flags in ./configure were encountered, since it
> (finally) found xmkmf.
> 
> >From the man page,  -w is a legitimate option for Gnu make (gmake on this system),

but not for Sun's make.

> so I'm at a loss how to proceed at this point.  I don't understand why g77 is using the
> option -PIC  when it was set to -fPIC in config.site.

It looks to me as if the configure script will override those settings, as
it has


CPICFLAGS=${CPICFLAGS-${cpicflags}}
FPICFLAGS=${FPICFLAGS-${CPICFLAGS}}
SHLIBLDFLAGS=${SHLIBLDFLAGS-${shlibldflags}}
...
  *solaris*)
    SHLIBLDFLAGS="-G"
    if ${cc_is_gcc}; then
      CPICFLAGS=-fPIC
    else
      CPICFLAGS=-KPIC
    fi
    if ${f77_is_g77}; then
      FPICFLAGS=-fPIC
    else
      FPICFLAGS=-PIC
    fi

It seems likely that it is failing to detect that your g77 (which is
rather old) is actually g77. 

The solution is to run

rm config.cache
env MAKE=gmake ./configure
edit Makeconf to set FPICFLAGS
gmake

Brian

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