_gfortran_pow_r4_i4 library calls
Tobias Burnus
burnus@net-b.de
Tue Apr 1 15:21:00 GMT 2008
Dennis Wassel wrote:
> I have compiled Lapack with gfortran 4.2.2 and am now trying to link
> against that library with gfortran 4.3.0.
> This results in my linker whining:
> slamch.f:(.text+0xaf): undefined reference to `_gfortran_pow_r4_i4'
>
> Checking this I found that the 3.0.0 Fortranlib does supply
> "_gfortran_pow_r4_i8" but not "_gfortran_pow_r4_i4", as the 2.0.0
> still does. Is this a bug or a feature? :-)
>
Feature. Gfortran now uses in this case the __builtin_powif, which can
be optimized further by the middle end of GCC.
Between 4.1 and 4.2 and 4.3 we did/do not guarantee that the library
interface remains stable; within a stable branch it does. However,
starting from 4.3.0 we use versioned symbols, i.e. on system where this
is supported, all 4.3-compiled programs/libraries should work with
libgfortran of later gfortran versions. (Which means that we will
continue to carry stuff around which is unused using newer compilers.)
I have never experimented with it, but it might work to link to both
libraries; assume you put libgfortran of 4.2.0 into a different
directory, then linking with "-lgfortran -L<path to 4.2> -lgfortran"
might work. However, even if it seems to work, this can cause some
unexpected problems in some special cases.
Thus the safest way is indeed to recompile Lapack with gfortran 4.3.
(Hoping that the [sd]lartg do not appear). If you don't have last years
3.1.1. there would be even another good reason for it ;-)
Tobias
More information about the Fortran
mailing list