Prof Brian Ripley
1998-Aug-18 17:28 UTC
Problem in "configure" for Solaris (cc) -- solved (partly) --
> 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA
1998-Aug-18 19:39 UTC
Problem in "configure" for Solaris (cc) -- solved (partly) --
Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:> $ 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...> > Note, no details of the compiler failure appear ....Hmmm. Yes. Easily reproduced on other systems by using: CC=/bin/false ./configure The basic problem here is that this part of configure.in is handwritten, and doesn't use the "autoconf conventions" (which are probably as well-documented as certain aspects of R...) of sending the compile commands and in the case of failure also the program contents to file descriptor 5. I.e. what yields all the constructions of the type if { (eval echo configure:1475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi There must be a relevant macro for this somewhere? -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._