Date: Sat, 12 Oct 2002 11:47:30 -0700 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Peter Wemm <peter@wemm.org> Cc: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>, freebsd-current@FreeBSD.ORG Subject: Re: Rev. 1.48 of stdio.h breaks 3rd part software Message-ID: <20021012184730.GA97974@troutmask.apl.washington.edu> In-Reply-To: <20021012183424.7B7A22A88D@canning.wemm.org> References: <200210121729.g9CHTAxN097669@troutmask.apl.washington.edu> <20021012183424.7B7A22A88D@canning.wemm.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021012184730.GA97974>