From owner-freebsd-questions Tue Nov 9 17:46:15 1999 Delivered-To: freebsd-questions@freebsd.org Received: from tetron03.tetronsoftware.com (tetron03.tetronsoftware.com [208.236.46.108]) by hub.freebsd.org (Postfix) with ESMTP id B0C8F1516A for ; Tue, 9 Nov 1999 17:46:09 -0800 (PST) (envelope-from zeus@tetron03.tetronsoftware.com) Received: from tetron03.tetronsoftware.com (tetron03.tetronsoftware.com [208.236.46.108]) by tetron03.tetronsoftware.com (8.9.3/8.9.3) with ESMTP id TAA26987; Tue, 9 Nov 1999 19:47:57 -0600 (CST) (envelope-from zeus@tetron03.tetronsoftware.com) Date: Tue, 9 Nov 1999 19:47:57 -0600 (CST) From: Gene Harris To: cjclark@home.com Cc: FreeBSD Questions Subject: Re: FORTRAN Error Question In-Reply-To: <199911092218.RAA41863@cc942873-a.ewndsr1.nj.home.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG _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