This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Problem with duplicate symbols when using gfortran 4.6 that are not present when using gfortran 4.5
- From: Arjen Markus <arjen dot markus895 at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Date: Fri, 11 Nov 2011 12:19:38 +0100
- Subject: Problem with duplicate symbols when using gfortran 4.6 that are not present when using gfortran 4.5
Hello,
the problem I am confronted with is a trifle complicated. It occurs in
the PLplot project (http://plplot.sf.net).
The thing is this:
- The Fortran 95 examples in that project can be built without a
problem, when using gfortran 4.5, but
when using gfortran 4.6, the linker complains about duplicate
symbols, such as __gfortran_getarg_i4.
- The FORTRAN 77 examples that are compiled and linked with either
compiler version pose no such
problem.
- Examining the various libraries and object files that are produced,
it turns out that these symbol names
are present in one static and one dynamic library, thus causing the
problem. (They are _not_
present in the object files that make that dynamic library, only in
the one for the static library, as that
use iargc() and getarg (*))
- The problem disappears when I use the option
-Wl,--allow-multiple-define (the symbol names even disappear
from the DLL, if I am not mistaken)
I will try and concoct a small example, if there should be a need for
that. My main goal is to be able
to compile and link these examples _without_ any special options. I
hope my decription is clear enough.
Regards,
Arjen
(*) To be replaced soon by the F2003 standard routines.