OK: despite Dirk's very kind help, I decided that trying to deal with R configuration and Debian configuration simultaneously was too difficult. I did manage to solve my problem by reconfiguring/making/ installing all of 2.3.1 from source: ./configure F77=/usr/bin/g77 make make install A few questions inspired by this experience: (1) it seems a bit odd that R sets F77=gfortran by default, since the system has both g77 and gfortran compilers on it, and given that there is a separate variable (FC) for the Fortran 90/95 compiler -- does it make any sense to switch the search order in configure so that g77 comes up first if present? (2) I couldn't figure out a way to set the F77 variable on a per-package basis: adding a src/Makevars file or a configure file to the package didn't seem to help, but perhaps I didn't put it in the right place/get it exactly right. Any clues? cheers Ben Bolker -- 620B Bartram Hall bolker at zoo.ufl.edu Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker Box 118525 (ph) 352-392-5697 Gainesville, FL 32611-8525 (fax) 352-392-3704
On 7 June 2006 at 11:44, Ben Bolker wrote: | OK: despite Dirk's very kind help, I decided that Yeah, kind but still not useful to you. No cigar yet :) | trying to deal with R configuration and Debian configuration | simultaneously was too difficult. [ I'd still like to learn from useRs what I could do to make the Debian package more appealing. Local rebuilds seems natural to me; I do that eg on the Ubuntu boxen at work to combine 'stability' ('frozen' outer system) with 'current' apps where I need and what them. By keeping those within the package management framework, I feel I combine the best of two worlds. YMMV. ] | I did manage to solve my problem by reconfiguring/making/ | installing all of 2.3.1 from source: | | ./configure F77=/usr/bin/g77 | make | make install | | A few questions inspired by this experience: | | (1) it seems a bit odd that R sets F77=gfortran | by default, since the system has both g77 and gfortran | compilers on it, and given that there is a separate | variable (FC) for the Fortran 90/95 compiler -- | does it make any sense to switch | the search order in configure so that g77 comes up first if present? | | (2) I couldn't figure out a way to set the F77 variable | on a per-package basis: adding a src/Makevars file or a configure | file to the package didn't seem to help, but perhaps I didn't | put it in the right place/get it exactly right. Any clues? That came up recently: a) ~/.Makevars (as I recall) b) on a per invocation basis: MAKEFLAGS="FFLAGS=-O1" R CMD INSTALL ... is something that worked for me. That said, I personally still dislike that I cannot 'undo' the settings the R's global Makeconf. I'd love to turn debugging, optimisation, ... on/off on demand. Dirk -- Hell, there are no rules here - we're trying to accomplish something. -- Thomas A. Edison
On Wed, 7 Jun 2006, Ben Bolker wrote:> > OK: despite Dirk's very kind help, I decided that > trying to deal with R configuration and Debian configuration > simultaneously was too difficult. > > I did manage to solve my problem by reconfiguring/making/ > installing all of 2.3.1 from source: > > ./configure F77=/usr/bin/g77 > make > make install > > A few questions inspired by this experience: > > (1) it seems a bit odd that R sets F77=gfortran > by default, since the system has both g77 and gfortran > compilers on it, and given that there is a separate > variable (FC) for the Fortran 90/95 compiler -- > does it make any sense to switch > the search order in configure so that g77 comes up first if present?That's not what is happening, I believe. If the C compiler is gcc4, it preferentially picks gfortran, as gcc4 and g77 are not compatible on structures such as double complex on at least some architectures. From the R.m4 file ## * If the C compiler is gcc, we try looking for a matching GCC Fortran ## compiler (gfortran for 4.x, g77 for 3.x) first. This should handle ## problems if GCC 4.x and 3.x suites are installed and, depending on ## the gcc default, the "wrong" GCC Fortran compiler is picked up (as We used to pick a F77 compiler first, but note that all legal F77 code is legal F95 code so there was no actual advantage is doing so. The issue here is that your code is not legal F77, and g77 (which implements 'GNU Fortran') is letting it through.> (2) I couldn't figure out a way to set the F77 variable > on a per-package basis: adding a src/Makevars file or a configure > file to the package didn't seem to help, but perhaps I didn't > put it in the right place/get it exactly right. Any clues?You cannot override either F77 or the default .f.o rule, as etc/Makeconf wins. However, you set up a specific rule in Makevars, and also need an all: target. See fastICA/src/Makevars for the sort of thing. -- 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