Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 1999 22:03:24 -0800
From:      Jamie Norwood <mistwolf@mushhaven.net>
To:        freebsd-stable@freebsd.org
Subject:   Re: ldconfig finding libraries, but ld is not.
Message-ID:  <19991110220324.A72518@mushhaven.net>
In-Reply-To: <199911110601.BAA45854@cc942873-a.ewndsr1.nj.home.com>
References:  <Pine.LNX.4.10.9911102101470.12184-100000@sinai.dhs.org> <199911110601.BAA45854@cc942873-a.ewndsr1.nj.home.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991110220324.A72518>