Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2002 18:25:44 -0700
From:      Peter Wemm <peter@wemm.org>
To:        "Greg 'groggy' Lehey" <grog@FreeBSD.ORG>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: Why don't we search /usr/local/lib and /usr/local/include by default? 
Message-ID:  <20020529012544.14816380A@overcee.wemm.org>
In-Reply-To: <20020529093009.C31668@wantadilla.lemis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
"Greg 'groggy' Lehey" wrote:
> On Tuesday, 28 May 2002 at  8:42:48 -0700, David O'Brien wrote:
> > On Tue, May 28, 2002 at 02:34:44PM +0930, Greg 'groggy' Lehey wrote:
> >> I've just had a question from some friends in the Linux space about
> >> why we install additional libraries in /usr/local/lib and their header
> >> files in /usr/local/include, but gcc by default only searches
> >> /usr/local/libexec and /usr/local/lib for libraries and /usr/include
> >
> > The system GCC searching any part of /usr/local is a bug.  It is not
> > [ports] PREFIX clean.
> 
> So how would you recommend we solve the issue?

Err, what issue?  gcc does not search /usr/local anywhere.

peter@daintree[6:22pm]/tmp-106> ls -l /usr/local/include/jerror.h 
-r--r--r--  1 root  wheel  13936 May 28 16:52 /usr/local/include/jerror.h
peter@daintree[6:22pm]/tmp-107> cc -c foo.c
foo.c:1:20: jerror.h: No such file or directory
peter@daintree[6:22pm]/tmp-108> grep jerror foo.c
#include <jerror.h>

and

eter@daintree[6:23pm]/tmp-113> ls -l /usr/local/lib | grep libxml
-rw-r--r--  1 root  wheel   523838 Apr 17 04:23 libxml.a
lrwxr-xr-x  1 root  wheel       11 May 21 19:08 libxml.so@ -> libxml.so.5
-rwxr-xr-x  1 root  wheel   495202 Apr 17 04:23 libxml.so.5*
peter@daintree[6:23pm]/tmp-114> cc -o foo foo.c -lxml
/usr/libexec/elf/ld: cannot find -lxml

Yes, /usr/local/lib is on my ldconfig path.

peter@daintree[6:24pm]/tmp-120> ldconfig -r | head -2
/var/run/ld-elf.so.hints:
        search directories: /usr/lib:/usr/lib/compat:/usr/X11R6/lib:/usr/local/lib

This is working exactly as designed.  Your email suggests you found a bug
in the implementation of this..  Or are you complaining about the design
itself?

> > (you have typos above about /usr/local/libexec don't you?)
> 
> Yes, sorry.
> 
> Greg

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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