Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Apr 2026 20:31:50 -0700
From:      Bakul Shah <bakul@iitbombay.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: What is the recommended setup for crossbuilding kernel+world?
Message-ID:  <9BF3C88D-F1EF-471C-BA80-5C2C2018125B@iitbombay.org>
In-Reply-To: <CANCZdfquSh6c%2BkEC-=qnceydgG5Jy0eLzFyFVi4kSY0f5KpVgw@mail.gmail.com>
References:  <84F07872-FCAD-4410-ACE3-2F58E602E1D1@iitbombay.org> <CANCZdfquSh6c%2BkEC-=qnceydgG5Jy0eLzFyFVi4kSY0f5KpVgw@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

On Apr 8, 2026, at 4:08 PM, Warner Losh <imp@bsdimp.com> wrote:
> 
> 
> 
> On Wed, Apr 8, 2026, 5:00 PM Bakul Shah <bakul@iitbombay.org> wrote:
> Recently crossbuilding -current arm64 world on an 15-stable
> amd64 machine took out host's /lib/libsys.so.7 which broke
> most everything! I tried rebuilding after removing its
> /usr/obj/.../current/arm64.aarch64/ tree and that replaced
> many .o files in /usr/lib! Rather than fixup my old setup,
> I'd like to know what is recommended.
> 
> Is it possible to build as a normal user (so that build can't
> mistakenly blow away host's system files)?
> 
> I do this all the time. I set MAKEOBJDIRPREFIX to ~/obj.

Thanks! I should've realized this! [Though this doesn't
explain why files in /lib /usr/lib were overwritten.]

I just did a chmod -R /usr/obj (& will probably create a
separate user just for builds).

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9BF3C88D-F1EF-471C-BA80-5C2C2018125B>