From nobody Wed Dec 14 02:02:54 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NWzDb43X8z4kRbm; Wed, 14 Dec 2022 02:03:43 +0000 (UTC) (envelope-from pat@patmaddox.com) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4NWzDb1jVGz4DDq; Wed, 14 Dec 2022 02:03:43 +0000 (UTC) (envelope-from pat@patmaddox.com) Authentication-Results: mx1.freebsd.org; none Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 184315C0003; Tue, 13 Dec 2022 21:03:42 -0500 (EST) Received: from imap41 ([10.202.2.91]) by compute2.internal (MEProxy); Tue, 13 Dec 2022 21:03:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=patmaddox.com; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1670983422; x= 1671069822; bh=dN4K5hpCnHmg3ilvoy0eu2VQoOTEd/vFacG+ooCvd7g=; b=z sCRlE2AoSRW5zs5HxYVF2hLFW1kbjZcJUiy+8JMn8a8CIb6pgaZdrHDtXKAB4R2W fVDVeb6t2FeGNdOI9YF7LMJlnz65tXnBC7vDiMtH1QuHPKpB+KTnmCS8XcOdp1YP doHpj0ZfbubIgNuGcG/SCQbqZuMozL53IDI8qhJXJL0nZvw+DcHIVTk7EvMZCD/K uW6SvdugO6HFajOY0wFcVqu7+Qklki/BE/1bSI4GDQfc3f1Nh0e6TOkzm6NrIN3T yt4XCc6EyVlXn3G2up8+1dy3ARXnZRq9Bl6EZeL5C5J9BGcJ9zHLolEPSD+z4YWs sbCMbx4C5TkPqcRkSKqpA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1670983422; x= 1671069822; bh=dN4K5hpCnHmg3ilvoy0eu2VQoOTEd/vFacG+ooCvd7g=; b=T COsBD32yhz1RUS7bFPDl0ucQrADGdSalJRHj1vw/hV0AvL1fWcGHyvOhId79XlwU VVeFvXdA3AVOzMv7GVMmMiaMbTuT8CBEIjcXkTlqD9eKCGr1SCejLLAqdGIPInQl iynzrkeH0i7xz5f+nrB+r7Vls3EJff2sS7lbPsRP018brCFo5lAhIsKjvgLAHczf t+HuvPpj2dg3pQKaYUNoX15bi95v2xx+fPSNx4kr4+DPGg6ddm3qmlHlIfoKC0xw DgcRUjjxNlyEcoVvUWCBOg+t5Y/gQZYjUygkm0hWl4nGHuV4qUHYEmS8tsVg67gI EGHvuJ3BfOWLrQ8TN+64w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedvgdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedfrfgr thcuofgrugguohigfdcuoehprghtsehprghtmhgrugguohigrdgtohhmqeenucggtffrrg htthgvrhhnpeffheettefgffetveeifffffeehfeejhfeileeikeehvdfhieeiiedvtedv gfevudenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgrthesphgrthhmrgguughogidrtgho mh X-ME-Proxy: Feedback-ID: i8b6c40f9:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id C4F6A234007B; Tue, 13 Dec 2022 21:03:41 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Message-Id: <65fae6d8-bc24-4cac-b5d6-9272c25c5ce3@app.fastmail.com> In-Reply-To: References: Date: Tue, 13 Dec 2022 18:02:54 -0800 From: "Pat Maddox" To: "Xin LI" , "Mel Pilgrim" Cc: "User Questions" , freebsd-ports@freebsd.org Subject: Re: lang/rust is super slow to build Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4NWzDb1jVGz4DDq X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, Dec 13, 2022, at 2:18 PM, Xin LI wrote: > On Tue, Dec 13, 2022 at 7:55 AM Mel Pilgrim > 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