From owner-freebsd-current Sat Oct 12 11:47:34 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 7ED3637B401 for ; Sat, 12 Oct 2002 11:47:32 -0700 (PDT) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13AB243EB2 for ; Sat, 12 Oct 2002 11:47:32 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.12.6/8.12.5) with ESMTP id g9CIlV4G098058; Sat, 12 Oct 2002 11:47:31 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.12.6/8.12.6/Submit) id g9CIlUKg098057; Sat, 12 Oct 2002 11:47:30 -0700 (PDT) Date: Sat, 12 Oct 2002 11:47:30 -0700 From: Steve Kargl To: Peter Wemm Cc: "Steven G. Kargl" , freebsd-current@FreeBSD.ORG Subject: Re: Rev. 1.48 of stdio.h breaks 3rd part software Message-ID: <20021012184730.GA97974@troutmask.apl.washington.edu> References: <200210121729.g9CHTAxN097669@troutmask.apl.washington.edu> <20021012183424.7B7A22A88D@canning.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021012183424.7B7A22A88D@canning.wemm.org> User-Agent: Mutt/1.4i 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 On Sat, Oct 12, 2002 at 11:34:24AM -0700, Peter Wemm wrote: > "Steven G. Kargl" wrote: >> >> In particular, NAG's Fortran 95 compiler on longer works. > > The problem is that you're trying to mix 4.x binaries with 5.x > components. This really needs to be linked against the 4.x libraries. > More below.. Yes, I thought of that after the linking failed. The NAG web page stated that gcc 2.95.2 was the FreeBSD compiler. This of course led me to try the -Wc and -Wl flags. > > kargl[203] make > > f95 -O -C=all -o testchkder chkdrv.f90 -L. -lminpack > > /usr/local/lib/NAGWare/libf96.so: undefined reference to `__sF' > > collect2: ld returned 1 exit status > > *** Error code 1 > > The reason why this is not working is because ld looks at .a and .so files > only. It will not link with libc.so.4, only libc.so. We only provide > /usr/lib/compat/libc.so.4 for runtime compatability, not compile time > compatability. > > Here's something to try: > mkdir /somewhere/lib > cd /somewhere/lib > ln -s /usr/lib/compat/libc.so.4 ./libc.so > ... repeat ... > > And in your flags, try -nostdlib, -L/somewhere/lib. Hopefully you can > cause the search order to find /somewhere/lib/libc.so and hence link against > /usr/lib/compat/libc.so.4. It will record a dependency against libc.so.4 > in the resulting binary so you only need these gymnastics for compile time. > At runtime, ld.so knows to find libc.so.4 in /usr/lib/compat. Do I need to run ldconfig to record the location of /somewhere/lib? > > Note at the very end of these messages the references to "/usr/lib/libc.so".. > That is the problem. > > The crt*.o files should probably be taken care of too, but in this case it > should be ok. > > We probably need a package or something to build a proper 4.x compile > environment. Includes, library links etc, everything. > I think your right. The C++ changes will probably force this issue. -- Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message