From owner-freebsd-arch Tue May 28 18:25:53 2002 Delivered-To: freebsd-arch@freebsd.org Received: from evilpete.dyndns.org (12-232-26-46.client.attbi.com [12.232.26.46]) by hub.freebsd.org (Postfix) with ESMTP id B660A37B40A; Tue, 28 May 2002 18:25:49 -0700 (PDT) Received: from overcee.wemm.org ([10.0.0.3]) by evilpete.dyndns.org (8.11.6/8.11.6) with ESMTP id g4T1Pn161613; Tue, 28 May 2002 18:25:49 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 14816380A; Tue, 28 May 2002 18:25:44 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: "Greg 'groggy' Lehey" Cc: freebsd-arch@FreeBSD.ORG Subject: Re: Why don't we search /usr/local/lib and /usr/local/include by default? In-Reply-To: <20020529093009.C31668@wantadilla.lemis.com> Date: Tue, 28 May 2002 18:25:44 -0700 From: Peter Wemm Message-Id: <20020529012544.14816380A@overcee.wemm.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "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 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