Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2022 18:02:54 -0800
From:      "Pat Maddox" <pat@patmaddox.com>
To:        "Xin LI" <delphij@gmail.com>, "Mel Pilgrim" <list_freebsd@bluerosetech.com>
Cc:        "User Questions" <freebsd-questions@freebsd.org>, freebsd-ports@freebsd.org
Subject:   Re: lang/rust is super slow to build
Message-ID:  <65fae6d8-bc24-4cac-b5d6-9272c25c5ce3@app.fastmail.com>
In-Reply-To:  <CAGMYy3shq_Jdgd7-GppOJsGKup=RpUk-p%2B=OBbOs5107b1aWhw@mail.gmail.com>
References:  <EDE0639D-04CE-44C6-922D-159F45576296@patmaddox.com> <c2c55e9a-3af7-19b9-a9f4-060cd4e1f584@bluerosetech.com> <CAGMYy3shq_Jdgd7-GppOJsGKup=RpUk-p%2B=OBbOs5107b1aWhw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 13, 2022, at 2:18 PM, Xin LI wrote:
> On Tue, Dec 13, 2022 at 7:55 AM Mel Pilgrim <list_freebsd@bluerosetech=
.com>
> wrote:
>
>> On 2022-12-12 11:27, Pat Maddox wrote:
>> > Using poudriere, lang/rust is at 2 hours and counting on my 10-core=
 i9
>> > w/ 128 gigs of RAM.
>> >
>> > Does that sound right? It seems extremely slow to me, but this is my
>> > first time building it.
>>
>> That sounds typical.  You can use ccache and tmpfs to speed it up a
>> little bit, but both rust and llvm are computationally massive.
>>
>> Even worse, poudriere doesn't need to build it.  If you aren't changi=
ng
>> its options there's no functional difference between building it loca=
lly
>> and installing from the public pkg repo.  Poudriere does have the
>> ability to install from pkgs, but there is a 2-year-old bug that
>> prevents that feature from working correctly.
>>
>> I recommend everyone comment on issue #822 on the freebsd/poudriere
>> github[1] and explain how much of a pain it is that poudriere doesn't
>> have sane behaviour wrt dependencies.  Maybe if enough people comment=
 it
>> will spur a fix.
>>
>> 1: https://github.com/freebsd/poudriere/issues/822
>
>
> IMHO the ports collection should provide and use prebuilt packages of
> compilers (LLVM, GCC, Rust, etc.) built from the FreeBSD packages buil=
der,
> and ports framework (possibly also the base system) should be changed =
to
> use prebuilt packages by default, unless a) user requested to build
> everything from source, or b) no binary package is available for the
> platform combination, like a Tier-2 platform.  The source ports for
> compilers should have all optimizations (like PGO, LTO, etc.) enabled =
by
> default, and require reasonably modern (perhaps newer than Sandy Bridg=
e)
> processor features by default.
>
> It does not make sense for most users to build compilers from source a=
ll
> the time, because most of them don't make any changes that would affec=
t the
> toolchain, which takes hours for them to build, even with beefy machin=
es
> and with parallelism and caching enabled.  For these users, it's just a
> waste of time and also increases their carbon footprint for nothing go=
od.
>
> Cheers,

Perhaps poudriere needs (or even already has?) a more fine-grained way t=
o declare whether to fetch package dependencies. -b works - but will do =
that for every dependency, whereas I may only want it to fetch llvm and =
other expensive ports.

The value to me in building from ports is that I know the state of my pa=
ckages matches my ports tree. I=E2=80=99m not installing a package that =
was built a week ago.

For expensive ports though, I=E2=80=99ll take the trade off of saving ti=
me in exchange for a bit of staleness.

btw vanilla ports does have a mechanism for installing package dependenc=
ies, it=E2=80=99s `make install-missing-packages`.

Pat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?65fae6d8-bc24-4cac-b5d6-9272c25c5ce3>