Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Nov 1999 19:47:57 -0600 (CST)
From:      Gene Harris <zeus@tetron03.tetronsoftware.com>
To:        cjclark@home.com
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: FORTRAN Error Question
Message-ID:  <Pine.BSF.4.10.9911091938060.19192-100000@tetron03.tetronsoftware.com>
In-Reply-To: <199911092218.RAA41863@cc942873-a.ewndsr1.nj.home.com>

next in thread | previous in thread | raw e-mail | index | archive | help

_BLNK__ is emitted as a character array (!) whenever you are
using common blocks.

The linkage error you are receiving indicates that you have
several named common blocks with different variable types
contained in them.  Or you have equivalence statements
referencing integer types which were i*2 and are now i*4 in 
g77.

This is particularly possible if you are porting from a
mainframe environment to a micro environment, where data
type alignments are crucial.  Try using -I2 when you compile
your code.

Gene

On Tue, 9 Nov 1999, Crist J. Clark wrote:

>  I am getting an error during the compile of some FORTRAN code that I
>  cannot quite diagnose. All of my files get through a 'f77 -c'
>  compilation fine (well, warnings about unused local variables aside),
>  but the final, linking step dies,
>  
>  f77 -g -L/usr/local/lib -lU77 -lm cdbcmp.o cdflam.o cdfmix.o cdftrb.o cdpcmp.o drag.o  enthal.o fnbll.o fnblt.o fnffl.o fnfft.o fnfme.o     fnfp.o fnfre.o fnrgh.o fsp.o interp.o lp.o quad.o    rbbody.o rbheat.o rbout.o rbrad.o rbwall.o rexbdy.o  rsc.o rvbbp.o rvbcof.o rvbint.o rvbitp.o rvdlnt.o    rvshok.o setpt.o sp.o tonset.o trptid.o trpttj.o -o ../rsc
>  rvshok.o: In function `rvshok_':
>  /usr3/mada/cjc/rsc/src/rvshok.f(.data+0x0): multiple definition of `_BLNK__'
>  rvbint.o(.data+0x0):/usr3/mada/cjc/rsc/src/rvbint.f: first defined here
>  *** Error code 1
>  
>  Stop.
>  
>  The symbol '_BLNK__' or 'BLNK' never appears in any FORTRAN source
>  file, but it is all over the object (.o) files (not just the ones
>  giving the error).
>  
>  I thought this might be some byproduct of the f2c process, but when I
>  compile with our IRIX SGI MIPSPro F77, I get,
>  
>          f77 -g -L/usr/local/lib -lU77 -lm cdbcmp.o cdflam.o cdfmix.o cdftrb.o cdpcmp.o drag.o  enthal.o fnbll.o fnblt.o fnffl.o fnfft.o fnfme.o     fnfp.o fnfre.o fnrgh.o fsp.o interp.o lp.o quad.o    rbbody.o rbheat.o rbout.o rbrad.o rbwall.o rexbdy.o  rsc.o rvbbp.o rvbcof.o rvbint.o rvbitp.o rvdlnt.o    rvshok.o setpt.o sp.o tonset.o trptid.o trpttj.o -o ../rsc
>  ld:
>  Warning: rvshok.o: _BLNK__: multiply defined
>          previous (used) definition from 'rvbint.o';
>          new (ignored) definition from 'rvshok.o'
>  
>  So this seems to be something that occurs across platforms.
>  
>  What is causing something like this? How can I fix it, can it be
>  fixed, at the source level? Can I coax the FreeBSD f77 to ignore the
>  problem and build code anyway? Or will this likely result in broken
>  code (and therefore is my IRIX executable probably untrustworthy)? 
>  
>  I am by no means a FORTRAN guru (them is a scary bunch), so any hints
>  would be appreciated. Thanks.
>  -- 
>  Crist J. Clark                           cjclark@home.com
>  
>  
>  To Unsubscribe: send mail to majordomo@FreeBSD.org
>  with "unsubscribe freebsd-questions" in the body of the message
>  



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9911091938060.19192-100000>