[Pkg-octave-devel] fw: gfortran transition release goal proposal

Adam C Powell IV hazelsct at debian.org
Mon Jul 23 23:16:29 UTC 2007


On Mon, 2007-07-23 at 13:49 -0700, Kevin B. McCarty wrote:
> Adam C Powell IV wrote:
> 
> > So it seems getarg, which is needed for mpich, is missing from gfortran,
> > as are other variants used by other fortran compilers.  Is there a
> > gfortran equivalent?
> > 
> > Thanks,
> > -Adam
> 
> I've been using this hack for getarg, building it into the base Cernlib
> library "libkernlib" only in the case of compiling with gfortran:
> 
> ***** Begin getarg.F
> *     Wrapper GETARG routine for gfortran,
> *     originally written by Harald Vogt <hvogt (at) ifh (dot) de>
> *
>       SUBROUTINE GETARG (JARG, CHARG)
> *     The following stuff is required to use gfortrans inline routine
> *     It is required to avoid the calling GETARG here which conflicts
> *     to the Fortran rules
>       CHARACTER    CHARG*(*)
>       CALL MYGETARG (JARG, CHARG)
>       END
> 
>       SUBROUTINE MYGETARG (JARG, CHARG)
>       CHARACTER    CHARG*(*)
> *     gfortran translates the following line to a call
> *     to its library routine _gfortran_getarg_i4
> *     therefore it will not clash in the linking step
>       CALL GETARG (JARG, CHARG)
>       END
> ***** End getarg.F
> 
> Note, I haven't checked that this still works with gfortran-4.2.

Wow, impressive and elegant little hack!

> Of course, this won't help your configure script not to fail.  Also, in
> the long run this is not a good solution, since there could be problems
> if this object code appears in several different linked libraries
> (especially if there are different versions).  Would be better if the
> missing getarg_ symbol could be put into libgfortran.
> 
> N.B. I want to emphasize that since I haven't uploaded a version of
> Cernlib compiled against gfortran yet, this hack doesn't exist in any
> object code already in Debian (to the best of my knowledge).

Well I can always shoehorn it into the configure file.  But if it's this
simple, it seems like a trivial patch for someone who knows gfortran
well...

Thanks!
-Adam
-- 
GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Welcome to the best software in the world today cafe!
http://www.take6.com/albums/greatesthits.html




More information about the Pkg-octave-devel mailing list