Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jul 2021 10:11:41 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        me@cameronkatri.com
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: PATH: /usr/local before or after /usr ?
Message-ID:  <CAOtMX2goig40oef3XEcM=Pu5-9tF4iwDVbTxA=FvYVaaFk0L3A@mail.gmail.com>
In-Reply-To: <20210716155004.d2qiciqkipmegs3j@FreeBSDY540>
References:  <CAOtMX2g3G0nFCXGoWo14d1iwOisBUBAom6=v_gTHfJOoT3mJdw@mail.gmail.com> <20210716155004.d2qiciqkipmegs3j@FreeBSDY540>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000007a0e3805c73fd860
Content-Type: text/plain; charset="UTF-8"

On Fri, Jul 16, 2021 at 9:54 AM Cameron Katri via freebsd-current <
freebsd-current@freebsd.org> wrote:

> On Fri, Jul 16, 2021 at 09:01:49AM -0600, Alan Somers wrote:
> > FreeBSD has always placed /usr/local/X after /usr/X in the default PATH.
> > AFAICT that convention began with SVN revision 37 "Initial import of
> 386BSD
> > 0.1 othersrc/etc".  Why is that?  It would make sense to me that
> > /usr/local/X should come first.  That way programs installed from ports
> can
> > override FreeBSD's defaults.  Is there a good reason for this convention,
> > or is it just inertia?
>
> The biggest example I can think of this being a problem is having
> binutils installed, it will cause any calls to elftoolchain or
> llvm-binutils to go to GNU binutils which is platform specific, so cross
> compiling, or LTO could be broken because of using GNU binutils which
> don't support cross compiling or LTO.
>
> - Cameron Katri
>
> > -Alan
>

Ugh, that's a good example.  I was thinking more about interactive
programs, like say /usr/bin/vi vs editors/vim.  Hypothetically how would
one solve the conflict if /usr/local/bin came before /usr/bin ?  Install
binutils's binaries to /usr/local/libexec/binutils/ ?  But a lot of ports
depend on binutils.  That would be a ton of ports to update.

BTW my motivation for this thread is a new replacement for gstat that I'm
working on.  I would like to name it "gstat", but if /usr/sbin must come
before /usr/local/sbin, then that won't be a very helpful name.
-Alan

--0000000000007a0e3805c73fd860--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2goig40oef3XEcM=Pu5-9tF4iwDVbTxA=FvYVaaFk0L3A>