From cbond@twistedcircus.org  Sun Jan 20 21:51:42 2002
Return-Path: <cbond@twistedcircus.org>
Received: from twistedcircus.org (h24-77-238-89.vf.shawcable.net [24.77.238.89])
	by hub.freebsd.org (Postfix) with ESMTP id 062C037B41A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 Jan 2002 21:51:42 -0800 (PST)
Received: (from cbond@localhost)
	by twistedcircus.org (8.11.6/8.11.6) id g0L5rdC87494;
	Sun, 20 Jan 2002 21:53:39 -0800 (PST)
	(envelope-from cbond)
Message-Id: <200201210553.g0L5rdC87494@twistedcircus.org>
Date: Sun, 20 Jan 2002 21:53:39 -0800 (PST)
From: "Chris L. Bond" <cbond@twistedcircus.org>
Reply-To: "Chris L. Bond" <cbond@twistedcircus.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Linker doesn't search /usr/local/lib
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34102
>Category:       gnu
>Synopsis:       Linker doesn't search /usr/local/lib
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    obrien
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 20 22:00:01 PST 2002
>Closed-Date:    Thu Jan 31 07:21:23 PST 2002
>Last-Modified:  Thu Jan 31 07:23:09 PST 2002
>Originator:     Chris L. Bond
>Release:        FreeBSD 4.5-PRERELEASE i386
>Organization:
None
>Environment:
System: FreeBSD muscle.twistedcircus.org 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #5: Tue Dec 25 19:46:40 PST 2001 cbond@muscle.twistedcircus.org:/usr/obj/usr/src/sys/MUSCLE i386

>Description:
When linking executables with ld(1), /usr/local/lib -- the seemingly `standard' location for 3rd-party libraries -- isn't searched.  This means that it must be explicitly included in the list with -L/usr/local/lib.

The odd thing is that it seems to have been removed from FreeBSD's version of binutils, but existed in the original distribution.

>How-To-Repeat:
Link a program against a library in /usr/local/lib.

>Fix:
Include `:/usr/local/lib' in the _${ARCH}_path variables from the Makefiles in /usr/src/gnu/usr.bin/binutils/ld/.

Or just keep the original genscripts.sh.
>Release-Note:
>Audit-Trail:

From: Bill Fumerola <billf@mu.org>
To: "Chris L. Bond" <cbond@twistedcircus.org>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: gnu/34102: Linker doesn't search /usr/local/lib
Date: Sun, 20 Jan 2002 22:08:21 -0800

 On Sun, Jan 20, 2002 at 09:53:39PM -0800, Chris L. Bond wrote:
 
 > >Synopsis:       Linker doesn't search /usr/local/lib
 
 ''man ldconfig''
 
 -- 
 - bill fumerola / fumerola@yahoo-inc.com / billf@FreeBSD.org / billf@mu.org
 - my anger management counselor can beat up your self-affirmation therapist
 
 

From: "Chris L. Bond" <cbond@twistedcircus.org>
To: billf@mu.org, cbond@twistedcircus.org
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: gnu/34102: Linker doesn't search /usr/local/lib
Date: Sun, 20 Jan 2002 22:21:10 -0800 (PST)

 That would be fantastic if adding the path to ldconfig worked.  (It doesn't.)  That will allow programs linked against libraries in /usr/local/lib to run, but you'll still have to include the directory with -L when you invoke ld.
 
 As an aside, ``man ldconfig'' seems a bit condescending, as if to suggest I hadn't even read the necessary documentation before submitting the report, which is obviously not the case.  (I'm not familiar with these lists, though, so I'm likely just misunderstanding.)
 
 Anyway, ``ldconfig -r'' clearly reports that the directory has been included in the hints file, so unless there's something I'm missing, I still think the bug report is valid.
 
   -- Chris

From: Bill Fumerola <billf@mu.org>
To: "Chris L. Bond" <cbond@twistedcircus.org>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: gnu/34102: Linker doesn't search /usr/local/lib
Date: Sun, 20 Jan 2002 22:52:35 -0800

 On Sun, Jan 20, 2002 at 10:21:10PM -0800, Chris L. Bond wrote:
 
 > I still think the bug report is valid.
 
 should we add /usr/X11R6/lib too?
 which has a higher priority (in the case of ambiguity)?
 
 you're welcome to try and convince others but i think the current
 behavior is fine.
 
 -- 
 - bill fumerola / fumerola@yahoo-inc.com / billf@FreeBSD.org / billf@mu.org
 - my anger management counselor can beat up your self-affirmation therapist
 
 
Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Thu Jan 31 07:04:39 PST 2002 
Responsible-Changed-Why:  
This decision lies with the binutils maintainer. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34102 
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Thu Jan 31 07:21:23 PST 2002 
State-Changed-Why:  
This is by design.  As you mantion "seemingly `standard'" location. 
I know people that use /usr/pkg or /pkg rather than /usr/local. 

The other issue, is sometimes ports will install libs that have the same 
names as ones in /usr/lib.  Therefore, I feel it should be a concious 
decission to link with sush libs. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34102 
>Unformatted:
