Problem in "configure" for Solaris (cc) -- solved (partly) --

Prof Brian Ripley Prof Brian Ripley <ripley@stats.ox.ac.uk>
Tue, 18 Aug 1998 18:28:50 +0100 (BST)


> From: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk>
> 
> Martin Maechler <maechler@stat.math.ethz.ch> writes:
> 
> > Reading the long output of  ``cc -flags'',
> > I see that more than average optimization is done using
> > 	cc -xO[1-4]
> > 	    #

And -O is -xO2. If you do want higher speed, you need to use
other flags too, and -fast is a good start.

> > Still very funny that "-O2" leads to such bad results with ./configure.
> > Maybe configure could become smarter here...
> 
> This is a generic problem with autoconf: It goes looking for X, the
> compile doesn't work because of Y, and it reports that X is missing.
> Of course, one should always check config.log when something goes
> wrong, it contains the details of the compiler failure and the failed
> programs. 

Not this time. See below.

> Our configure starts off with a compiler sanity check, but apparently
> it isn't enough?

No, as it is not invoked if the compiler is specified via CC. In
Martin's configuration, config.log gives

$ CC=cc CFLAGS=-O2 ./configure
$ cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:708: checking for a BSD compatible install
configure:758: checking whether ln -s works
configure:781: checking for ranlib
configure:812: checking for bison
configure:845: checking for ar
configure:873: checking for ratfor
configure:902: checking for latex
configure:934: checking for dvips
configure:974: checking for perl
configure:1004: checking whether perl is perl 5
configure:1200: checking for cc
configure:1261: checking for ranlib
configure:1325: checking for f77
configure:1402: checking for underscore after Fortran symbols

Note, no details of the compiler failure appear ....


As for speed comparisons:

A piece of the ch14 script from V&R2 (highly C-dependent), Solaris 2.6, 
Sparc 20 (about 4 years old)

library(MASS)
library(tree)
data(fgl)
unix.time({
fgl.tr <- tree(type ~ ., fgl)
fgl.cv <- cv.tree(fgl.tr,, prune.misclass)
for(i in 2:5)  fgl.cv$dev <- fgl.cv$dev + 
     cv.tree(fgl.tr,, prune.misclass)$dev
fgl.cv$dev <- fgl.cv$dev/5})

gcc2.8.1 60.26secs
cc SC4.0 60.35secs

(the close agreement is fortuitous: I had to tune each to get about
10% improvement in speed).

Brian

-- 
Brian D. Ripley,                  ripley@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-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._