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

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

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 changing
> its options there's no functional difference between building it locally
> 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 builder,
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 Bridge)
processor features by default.

It does not make sense for most users to build compilers from source all
the time, because most of them don't make any changes that would affect the
toolchain, which takes hours for them to build, even with beefy machines
and with parallelism and caching enabled.  For these users, it's just a
waste of time and also increases their carbon footprint for nothing good.

Cheers,

--0000000000003e6c2d05efbcff39
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace,monospace"><br></div></div><br><div class=3D"gmail_quote=
"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Dec 13, 2022 at 7:55 AM Mel=
 Pilgrim &lt;<a href=3D"mailto:list_freebsd@bluerosetech.com">list_freebsd@=
bluerosetech.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" =
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa=
dding-left:1ex">On 2022-12-12 11:27, Pat Maddox wrote:<br>
&gt; Using poudriere, lang/rust is at 2 hours and counting on my 10-core i9=
<br>
&gt; w/ 128 gigs of RAM.<br>
&gt; <br>
&gt; Does that sound right? It seems extremely slow to me, but this is my<b=
r>
&gt; first time building it.<br>
<br>
That sounds typical.=C2=A0 You can use ccache and tmpfs to speed it up a <b=
r>
little bit, but both rust and llvm are computationally massive.<br>
<br>
Even worse, poudriere doesn&#39;t need to build it.=C2=A0 If you aren&#39;t=
 changing <br>
its options there&#39;s no functional difference between building it locall=
y <br>
and installing from the public pkg repo.=C2=A0 Poudriere does have the <br>
ability to install from pkgs, but there is a 2-year-old bug that <br>
prevents that feature from working correctly.<br>
<br>
I recommend everyone comment on issue #822 on the freebsd/poudriere <br>
github[1] and explain how much of a pain it is that poudriere doesn&#39;t <=
br>
have sane behaviour wrt dependencies.=C2=A0 Maybe if enough people comment =
it <br>
will spur a fix.<br>
<br>
1: <a href=3D"https://github.com/freebsd/poudriere/issues/822" rel=3D"noref=
errer" target=3D"_blank">https://github.com/freebsd/poudriere/issues/822</a=
></blockquote><div><br></div><div class=3D"gmail_default" style=3D"font-fam=
ily:monospace,monospace">IMHO the ports collection should provide and use p=
rebuilt packages of compilers (LLVM, GCC, Rust, etc.) built from the FreeBS=
D packages builder, and ports framework (possibly also the base system) sho=
uld be changed to use prebuilt packages by default, unless a) user requeste=
d to build everything from source, or b) no binary package is available for=
 the platform combination, like a Tier-2 platform.=C2=A0 The source ports f=
or compilers should have all optimizations (like PGO, LTO, etc.) enabled by=
 default, and require reasonably modern (perhaps newer than Sandy Bridge) p=
rocessor features by default.</div><div class=3D"gmail_default" style=3D"fo=
nt-family:monospace,monospace"><br></div><div class=3D"gmail_default" style=
=3D"font-family:monospace,monospace">It does not make sense for most users =
to build compilers from source all the time, because most of them don&#39;t=
 make any changes that would affect the toolchain, which takes hours for th=
em to build, even with beefy machines and with parallelism and caching enab=
led.=C2=A0 For these users, it&#39;s just a waste of time and also increase=
s their carbon footprint for nothing good.</div><div class=3D"gmail_default=
" style=3D"font-family:monospace,monospace"><br></div><div class=3D"gmail_d=
efault" style=3D"font-family:monospace,monospace">Cheers,</div></div></div>

--0000000000003e6c2d05efbcff39--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGMYy3shq_Jdgd7-GppOJsGKup=RpUk-p%2B=OBbOs5107b1aWhw>