[Rd] help compiling package with g77
Ben Bolker
bolker at zoo.ufl.edu
Tue Jun 6 18:00:58 CEST 2006
I have a package with some embedded legacy FORTRAN code
(for computing complex Bessel functions, written in 2003
by C. Bond to implement the algorithms of Zhang and Jin 1996).
It worked well until recently [despite warnings about deprecated
headers "includes at least one deprecated or antiquated header" --
when I tried to fix these the code stopped working, so I left
them alone]. Now an upgrade of my Debian system has apparently
got R switched over from using g77 to gfortran. The old code
has EQUIVALENCE functions in it that gfortran doesn't like ...
(I know, the right thing would be to go back and understand all
the code and rewrite it, but I'm not sure I can bear it.)
My first attempt was to hack things by replacing /usr/bin/gfortran
(a link to /usr/bin/gfortran-4.0) with a link to g77; this helped
things get farther but got me to an unresolved call to do_lio.
Based on information in the archives from BDR, I commented out
unnecessary PRINT commands in the FORTRAN code, but this just
led to another unresolved symbol (e_wfse ???) -- I suspect that
this is a symptom of R still using gfortran libraries instead
of g77 libraries.
Now I'm trying to figure out what I can do in the Makevars
file in the package directory to force use of g77 *and* the
appropriate libraries ... putting
F77=/usr/bin/g77
in [pkgname]/src/Makevars doesn't seem to have any effect.
Even if I force the use of g77, I'm not sure whether it will
get the right libraries or not ... perhaps I should recompile
R with F77=/usr/bin/g77 all the way?
I have poked around in The Fine Manuals quite a bit ... if anyone
has pointers I would be grateful. This'll teach me to upgrade.
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
More information about the R-devel
mailing list