From owner-freebsd-current Sat Nov 2 12: 6:47 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41CDC37B401 for ; Sat, 2 Nov 2002 12:06:46 -0800 (PST) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BE6C43E88 for ; Sat, 2 Nov 2002 12:06:38 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 3F3F62A88D; Sat, 2 Nov 2002 12:06:38 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Steve Kargl Cc: Mark Murray , freebsd-current@FreeBSD.ORG Subject: Re: __sF In-Reply-To: <20021102192432.GC28971@troutmask.apl.washington.edu> Date: Sat, 02 Nov 2002 12:06:38 -0800 From: Peter Wemm Message-Id: <20021102200638.3F3F62A88D@canning.wemm.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Steve Kargl wrote: > On Sat, Nov 02, 2002 at 07:06:47PM +0000, Mark Murray wrote: > > > I seriously doubt that NAG will support both a > > > 4.x and 5.x version of their compiler. > > > > This shouldn't be a problem. The commercial software Should Not Be(tm) > > supporting something as variable as CURRENT, and with the STABLE libraries > > around in COMPAT mode, the compiler Will Just Work(tm) (or should with > > not much effort). > > > > By the time __sF is mainstream, I guess the vendor will have adapted > > their product to match. Win, win. > > > > No, it does not just work. The NAG f95 compiler generates a > C file. The C file is compiled by gcc. > > f95 -o a a.f90 > > is equivalent to > > f95 -c -o a.c a.f90 > gcc -o a a.c -lf96 -lm -lc > > libf96.so is linked against libc.so, which is a symlink > to libc.so.4 on a 4.x system. libm.so and libc.so are > symlinks that point to libm.so.2 and libc.so.5 on 5.x. > You pick up the wrong libc.so in the above line. This is also solveable by setting a strategic symlink from libc.so -> /usr/lib/compat/libc.so.4 in the f95 backend's search path. Does it do a "gcc -o a a.c -L /usr/local/lib/f95 -lf96 -lm -lc" or something like that? If so, you can put the libc.so symlink in there. I assume that the generated code doesn't contain #includes... If it does you'll also need to do something about that so that you get the right #includes. libf96.so is a 4.x binary. Even if it wasn't for __sF, you should be compiling with 4.x libraries and (if needed) 4.x headers, because you have parts of the 4.x stdio.h embedded in libf96.so. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message