Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!mips!dimacs.rutgers.edu!aramis.rutgers.edu!paul.rutgers.edu!njin!princeton!grendel.Princeton.EDU From: rhl@grendel.Princeton.EDU (Robert Lupton (the Good)) Newsgroups: comp.lang.fortran Subject: Problem with multiple definitions of (e.g.) unpack_double Message-ID: <10716@idunno.Princeton.EDU> Date: 13 Jun 91 15:09:44 GMT Sender: news@idunno.Princeton.EDU Organization: Princeton University Lines: 57 Nntp-Posting-Host: grendel.princeton.edu (On a sparc 1 running f77 1.3.1 with the 16kby-write bug fix installed) One of our users has discovered that the programme read(5,*) r end if compiled and then linked -Bstatic generates doubly defined externals, with a conflict between /lib/libc.a and /usr/lanf/SC0.0/cg87/libm.a. A workaround is to link with -Bstatic -L/usr/lib /usr/lang/SC0.0/cg87/libm.a but I am unhappy. Any Ideas? Robert (The -v -V compilation trace follows: f77 -c -g -V tst.f version-id of "/usr/lang/SC0.0/f77pass1": SC0.0 f77 1.3.1 FCS 90/06/25 /usr/lang/SC0.0/f77pass1 -g "-P -cg87" tst.f /tmp/f77pass1.14713.s.0.s \ /tmp/f77pass1.14713.i.1.s /tmp/f77pass1.14713.d.b2.s tst.f: MAIN: version-id of "/usr/lang/SC0.0/as": SC0.0 90/02/12 /usr/lang/SC0.0/as -o tst.o -Q -cg87 /tmp/f77pass1.14713.s.0.s \ /tmp/f77pass1.14713.i.1.s /tmp/f77pass1.14713.d.2.s rm /tmp/f77pass1.14713.s.0.s rm /tmp/f77pass1.14713.i.1.s rm /tmp/f77pass1.14713.d.2.s f77 -v -y__unpack_double -o tst tst.o -Bstatic /bin/ld -y__unpack_double -dc -dp -e start -u _MAIN_ -X -o tst \ /usr/lang/SC0.0/crt0.o /usr/lang/SC0.0/cg87/_crt1.o \ -L/usr/lang/SC0.0/cg87 -L/usr/lang/SC0.0 tst.o -Bstatic -lF77 -lm -lc /usr/lang/SC0.0/cg87/libm.a(pack_float.o): reference to external undefined \ __unpack_double /usr/lang/SC0.0/cg87/libm.a(_unpack_dble.o): definition of external text \ __unpack_double /lib/libc.a(double_decim.o): reference to external undefined __unpack_double ld: /lib/libc.a(_unpack_dble.o): __class_quadruple: multiply defined /lib/libc.a(_unpack_dble.o): __class_double: multiply defined /lib/libc.a(_unpack_dble.o): __fp_normalize: multiply defined /lib/libc.a(_unpack_dble.o): __fp_leftshift: multiply defined /lib/libc.a(_unpack_dble.o): __fp_set_exception: multiply defined /lib/libc.a(_unpack_dble.o): definition of external text __unpack_double /lib/libc.a(_unpack_dble.o): __unpack_double: multiply defined *** Error code 2 make: Fatal error: Command failed for target `Tst' ) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Robert Lupton rhl@astro.princeton.edu