Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to switch from rust to rust-bin?
Date: Sun, 06 Sep 2020 08:23:24
Message-Id: cef047cd-982e-99f5-06f9-f4b373b01dc8@gmail.com
In Reply to: [gentoo-user] How to switch from rust to rust-bin? by Walter Dnes
1 Walter Dnes wrote:
2 > When updating my refurbished Lenovo notebook, I saw that "rust" was
3 > being pulled in as a dependency by system-bootstrap. My initial
4 > reaction was WTF? I'm sure the kernel devs will say "because we said
5 > so... neener... neener". I don't want to fight that argument.
6 >
7 > Just like Mozilla's other product, rust is an unbelievably bloated
8 > monstrosity. My 3-gig RAM notebook, with a core2 cpu forced to max
9 > (2.534 ghz) took 3 hours 51 minutes to build rust-1.45.2... ouch! This
10 > compares to 2 hours 10 minutes for gcc-9.3, and 13 minutes for x265-3.4.
11 >
12 > I notice that there is a "rust-bin" ebuild present. If nothing else,
13 > I'd like to switch over to that to save the notebook from unnecessary
14 > grinding when rust updates. What's the procedure for selecting it?
15 > I've already tried the obvious...
16 >
17 > [thimk][root][~] eselect rust list
18 > Available Rust versions:
19 > [1] rust-1.45.2 *
20 >
21 >
22 > "emerge -pv rust-bin" gives...
23 >
24 > [ebuild N ] dev-lang/rust-bin-1.45.2:stable::gentoo USE="-clippy -doc -rls -rustfmt" CPU_FLAGS_X86="sse2" 115,367 KiB
25 >
26 > I *HOPE* that it's as simple as emerging rust-bin, and eselect-ing
27 > it, but I want to check here before I risk breaking my system with
28 > wild guesses.
29 >
30
31
32 It seems rust has a virtual package.  This is from eix:
33
34
35 [I] virtual/rust
36      Available versions:  1.44.1{tbz2} ~1.45.2 ~1.46.0 {ABI_MIPS="n32
37 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 64 x32"}
38      Installed versions:  1.44.1{tbz2}(11:53:29 PM
39 08/30/2020)(ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d"
40 ABI_S390="-32 -64" ABI_X86="32 64 -x32")
41      Description:         Virtual for Rust language compiler
42
43
44 According to the ebuild for the virtual, either the compile local
45 version or the -bin version satisfies the requirement.  From the virtual
46 ebuild.
47
48
49 RDEPEND="|| ( ~dev-lang/rust-${PV}[${MULTILIB_USEDEP}]
50 ~dev-lang/rust-bin-${PV}[${MULTILIB_USEDEP}] )"
51
52
53 I'd think it would be as simple as unemerging the local compile version
54 and emerging the -bin version.  If unsure, quickpkg the version you have
55 installed now and save it in case you need it.  You may want to check
56 the ebuild for the package that is pulling it in and make sure it
57 depends on the virtual instead of the actual rust package itself.  It
58 could be it requires a locally compiled version and using a -bin version
59 isn't allowed for some reason.  I don't recall seeing a case like that
60 before but one never knows.  If it fails tho, you can just emerge your
61 saved binary using -k and not have to compile it again. 
62
63 Hope that gives you something to check into and helps. 
64
65 Dale
66
67 :-)  :-)