[R] R-0.64.1 make problem, Solaris 2.4: Solution

Dennis Murphy dmurphy at fisher01.stats.umanitoba.ca
Mon Jun 28 13:07:57 CEST 1999

Hello again!

Thanks to Dr. Brian Ripley, the make problem I reported earlier has been
solved, and R-0.64.1 is now successfully installed and tested.

There were two essential problems with the stock configuration:

  (i) the Fortran option -fPIC was not being propagated to certain Makefiles
      further down the tree;
  (ii) gmake was not being recognized when the library files were being
       compiled (it was using Sun make instead).

The solution to this problem is to do the following:
  (a) insert a line MAKE = gmake in config.site; alternatively, set
        # env MAKE=gmake ./configure 
      at the shell prompt (or setenv ... from the C shell).
  (b) in Makeconf.in, change FPICFLAGS = @FPICFLAGS@ to FPICFLAGS = @CPICFLAGS@,
      so that both FPICFLAGS and CPICFLAGS are the same
  (c) make the same change in etc/Makeconf.in

If installing as su, you also need to make sure that /usr/openwin/bin is on
the SUPATH; if not, you need to edit /etc/default/su as superuser. Otherwise,
the configure script will not be able to find xmkmf on Solaris.

Original message:

I'm attempting to install R-0.64.1 on a Sun Sparc 20 running Solaris 2.4 with
gcc-, g77-0.5.20 and Gnu make 3.76-1.

On several occasions, the make process aborted when trying to build the shared
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
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'

In addition, I got the following error messages in this directory on the latest

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'
g77 -O2 -PIC -c ppr.f -o ppr.o
gcc: unrecognized option `-PIC'

In config.site, I specifically requested the option FPICFLAGS=-fPIC, consistent
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
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 seems clear that the problem is not with the modreg code, but rather
something with the make process on this platform. 

Suggestions gratefully accepted...

I would also like to acknowledge the response from Christoph Friedrich, and
hope that he finds this workaround useful. 
Dennis Murphy
U. of Manitoba
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