From owner-freebsd-stable Wed Nov 10 22: 4: 9 1999 Delivered-To: freebsd-stable@freebsd.org Received: from diarmadhi.mushhaven.net (diarmadhi.mushhaven.net [63.75.111.197]) by hub.freebsd.org (Postfix) with ESMTP id 03AE414F3D for ; Wed, 10 Nov 1999 22:04:07 -0800 (PST) (envelope-from mistwolf@diarmadhi.mushhaven.net) Received: (from mistwolf@localhost) by diarmadhi.mushhaven.net (8.9.3/8.9.3) id WAA72545 for freebsd-stable@freebsd.org; Wed, 10 Nov 1999 22:03:24 -0800 (PST) (envelope-from mistwolf) Date: Wed, 10 Nov 1999 22:03:24 -0800 From: Jamie Norwood To: freebsd-stable@freebsd.org Subject: Re: ldconfig finding libraries, but ld is not. Message-ID: <19991110220324.A72518@mushhaven.net> References: <199911110601.BAA45854@cc942873-a.ewndsr1.nj.home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <199911110601.BAA45854@cc942873-a.ewndsr1.nj.home.com> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Nov 11, 1999 at 01:01:57AM -0500, Crist J. Clark wrote: > > > > I've installed some libs on my machine (3.3-STABLE 11-09-1999) in > > > > /usr/local/lib, via ports and some tarballs. I have let ldconfig_path in > > > > rc.conf. When I do a ldconfig -r -v -elf | grep libname, it finds the > > > > correct library. but when I try to link, the linker can't find the > > > > libraries. Any ideas? I'm a bit frustrated. I would prefer to not set > > > > LD_LIBRARY_PATH if at all possible. > > Did you try using the '-L' option on the compile command line? And you > are using the '-l' option too? For example, you are trying to include > /usr/local/libweird.a in your executable, you would need to have > '-L/usr/local/lib -lweird' on the compile command line (if you are > using default Makefile rules, just add the quoted portion to the > LDCONFIG variable). > > IIRC, both ldconfig(8) and LD_LIBRARY_PATH are for the _runtime_ > shared library linker and have nothing to do compiling programs. I actually have/had a PR open on this, as it is non-intuitive and non-standard to both not include /usr/local/lib and LD_LIBRARY_PATH in the search path when compiling; I even on one machine went so far as to install everything in /usr/lib just so things compile sanely for my less than FreeBSD-savvy users, and am currently looking into migrating to Linux to fully cure the problem. Jamie > -- > Crist J. Clark cjclark@home.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-stable" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message