[R] R with Sun Studio Fortran 95 compiler

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Nov 11 08:32:30 CET 2004

On Wed, 10 Nov 2004, Bizuet Cabrera Fernando wrote:

> I am trying to compile R 1.9.1 and 2.0.0 on Solaris 2.8 with Sun Studio
> Fortran 95 compiler but I have obtained some errors which I enclose. I
> have compiled R with g77 GNU compiler and it was OK.

Please do read the final line of your excerpt and do as it says ....

> Does anyone know if R 2.0.0 has been successfully built on Solaris 2.8
> with Sun Studio Fortran 95 compiler? or at least, How could I achieve
> this? The R installation manual does not have any reference.

What is `Sun Studio'?  The R-admin manual does have references to what I
think is the same compiler, `Sun ONE Studio 7 Compiler Suite' (aka Forte
7) (possibly not the same version).  Forte 9 has also been used 
successfully, if -xopenmp=stubs was added to LDFLAGS (and that is in the 
R-admin manual for the imminent R 2.0.1).

> I want Sun Fortran in order to use the Sun performance library
> libsunperf since I noticed that R on Windows XP is twice faster than R
> on Sun Solaris 2.8 without library libsunperf.

Yes, well, not at the same clock speed.  Please do read the experience in 
the R-admin manual that you deny exists.

Either you are talking about a different product with a very similar name 
or you have missed a lot of useful information.

> Thanks in advance.
> $ ./configure --enable-R-shlib
> checking for a BSD-compatible install... tools/install-sh -c
> checking whether build environment is sane... yes
> checking whether make sets $(MAKE)... yes
> ... Skip
> checking build system type... sparc-sun-solaris2.8
> checking host system type... sparc-sun-solaris2.8
> loading site script './config.site'
> ...skip
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables... 
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking how to run the C preprocessor... gcc -E
> checking whether gcc needs -traditional... no
> checking how to run the C preprocessor... gcc -E
> defining F77 to be f95
> checking whether we are using the GNU Fortran 77 compiler... no
> checking whether f95 accepts -g... yes
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> ... skip
> checking for f95 option to produce PIC... -fPIC
> checking if f95 PIC flag -fPIC works... no
> checking if f95 supports -c -o file.o... yes
> checking whether the f95 linker (/usr/ccs/bin/ld) supports shared
> libraries... yes
> checking dynamic linker characteristics... f95: Warning: Option
> -print-search-dirs passed to ld, if ld is invoked, ignored otherwise
> Usage: f95 [ options ] files.  Use 'f95 -flags' for details
> solaris2.8 ld.so
> checking how to hardcode library paths into programs... immediate
> ...skip
> checking how to get verbose linking output from f95... -v
> checking for Fortran libraries of f95...  -L/usr/local/lib
> -R/opt/SUNWspro/lib/v8plus:/opt/SUNWspro/lib -L/opt/SUNWspro/lib/v8plus
> -L/opt/SUNWspro/prod/lib/v8plus -L/opt/SUNWspro/lib
> -L/opt/SUNWspro/prod/lib -L/usr/ccs/lib -L/lib -L/usr/lib -lompstubs
> -lfui -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai
> -lfmaxvai -lfsu -lsunmath -lm
> checking for dummy main to link with Fortran libraries... unknown
> configure: error: linking to Fortran libraries from C fails
> See `config.log' for more details.
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list