Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2002 22:59:37 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        "Greg 'groggy' Lehey" <grog@FreeBSD.ORG>
Cc:        Peter Wemm <peter@wemm.org>, freebsd-arch@FreeBSD.ORG
Subject:   Re: Why don't we search /usr/local/lib and /usr/local/include by default?
Message-ID:  <20020529055937.GB306@dhcp01.pn.xcllnt.net>
In-Reply-To: <20020529122327.C82424@wantadilla.lemis.com>
References:  <20020529093009.C31668@wantadilla.lemis.com> <20020529012544.14816380A@overcee.wemm.org> <20020529122327.C82424@wantadilla.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 29, 2002 at 12:23:27PM +0930, Greg 'groggy' Lehey wrote:
> 
> I'm complaining about the implementation.  Since the Ports Collection
> installs by default in /usr/local, it seems reasonable to at least put
> these directories at the end of the search paths for header files and
> libraries.

Putting /usr/local at the end of the search path by default does not
yield the same result as putting -I/usr/include on the command line
when there's a conflict (db.h and/or ndbm.h come to mind), because
-I is search before the default (system) search path.

On the other hand, putting /usr/include up front by default is probably
just broken by design.

I think adding /usr/include to the default search path is based on
the optimistic assumption that there's no conflict. This may cause
unexpected random failures when there is a conflict that the user
can subsequently blame on the compiler, because the user didn't do
anything. Not searching searching /usr/include is then based on the
pessimistic assumption that there can be a conflict and it's better
to have the user be explicit all the time so it's always his fault.
What applies to conflict also applies to headers not found.

If one likes:
	s/optimistic/rose-colored/g
	s/pessimistic/realistic/g

I don't see an inconsistency. Just differing point of views.

-- 
 Marcel Moolenaar	  USPA: A-39004		 marcel@xcllnt.net

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?20020529055937.GB306>