From owner-freebsd-questions Tue May 9 5: 8:18 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ntua.gr (achilles.noc.ntua.gr [147.102.222.210]) by hub.freebsd.org (Postfix) with ESMTP id 0A66537B959 for ; Tue, 9 May 2000 05:08:14 -0700 (PDT) (envelope-from past@netmode.ece.ntua.gr) Received: from netmode.ece.ntua.gr (dolly.netmode.ece.ntua.gr [147.102.13.10]) by ntua.gr (8.9.3/8.9.3) with ESMTP id PAA25165 for ; Tue, 9 May 2000 15:08:07 +0300 (EET DST) Received: by netmode.ece.ntua.gr (Postfix, from userid 410) id DF4A485C3; Tue, 9 May 2000 14:58:13 +0300 (EET DST) Date: Tue, 9 May 2000 14:58:13 +0300 From: Panagiotis Astithas To: questions@freebsd.org Subject: f77 linking error Message-ID: <20000509145813.A11108@netmode.ece.ntua.gr> Reply-To: past@netmode.ntua.gr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i X-Organizational-Unit: Network Management and Optimal Design Laboratory X-Organization: National Technical University of Athens, GREECE X-Work-Phone: +30-1-772-1-450 X-Work-FAX: +30-1-772-1-452 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, I have a small Fortran program that I'm trying to run and it produces an error during the linking phase: laptop$ f77 marina.f -lg2c -lm -lc /usr/lib/libg2c.so: warning: tempnam() possibly used unsafely; consider using mkstemp() /tmp/ccrOW248.o: In function `f.0': /tmp/ccrOW248.o(.text+0x19): undefined reference to `expf_' /tmp/ccrOW248.o(.text+0x41): undefined reference to `sinf_' /tmp/ccrOW248.o: In function `MAIN__': /tmp/ccrOW248.o(.text+0x2a7): undefined reference to `absf_' I'm using the gcc provided wiht FreeBSD 4-STABLE, and I tried to provide explicitly any necessary library on the command line. Has anyone come across this before? Is it excpected behavior? FWIW I tried to locate the symbols (expf_ etc.) using 'strings' in libm.so.4, etc. to no avail. Should I get & build gcc under /usr/local in case something in the stock version is missing? Thanks in advance for any help. Cheers, -past P.S.: This is the program in case it matters: F(X) = EXPF(-X) - SINF(3.1415926*X/2.) READ 100, X1, X2, TOL 100 FORMAT (2F10.0, E10.0) FX1 = F(X1) FX2 = F(X2) IF (FX1*FX2) 1, 2, 3 3 PRINT 200 200 FORMAT (80H FUNCTION VALUES WITH INITIAL X VALUES ARE NOT OF OPPOS 1ITE SIGNS. CHANGE INPUTS. ) CALL EXIT 2 IF (FX1) 4, 5, 4 5 PRINT 201, X1 201 FORMAT (22H THE INPUT VALUE, X = ,F6.3, 27H IS A ROOT OF THE EQUAT 1ION. ) 4 IF (FX2) 6, 7, 6 7 PRINT 201, X2 CALL EXIT 6 PRINT 202 202 FORMAT (55H ERROR. FX1 AND FX2 NOT ZERO THOUGH PRODUCT TESTS ZERO. 1 ) CALL EXIT 1 DO 30 I = 1, 25 X = (X1 + X2)/2 FX = F(X) PRINT 206, X, FX 206 FORMAT (8H AT X = , F10.7, 8H F(X) = ,F10.6) IF (ABSF(X) - TOL) 8, 8, 9 9 IF (FX*FX1) 10, 11, 12 10 X2 = X GO TO 30 12 X1 = X FX1 = FX 30 CONTINUE PRINT 204 204 FORMAT (33H NON-CONVERGENT IN 25 ITERATIONS. ) CALL EXIT 11 PRINT 205 205 FORMAT (7H ERROR. ) CALL EXIT 8 PRINT 203, X, 1 203 FORMAT (16H THE VALUE, X = ,F10.7, 12H IS A ROOT. , I3, 27H ITERA 1TIONS WERE REQUIRED. ) CALL EXIT END To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message