Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Package compiles rust despite rust-bin installed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
mahi
n00b
n00b


Joined: 18 Mar 2004
Posts: 34

PostPosted: Fri Apr 12, 2024 11:51 am    Post subject: [SOLVED] Package compiles rust despite rust-bin installed Reply with quote

I'm trying to install vaultwarden in Gentoo (native, without docker from the slonko overlay). One of the dependencies of vaultwarden is rust. Rust, however, takes a huge amount of time, RAM and diskspace to compile and I'd like to avoid that by using dev-lang/rust-bin instead. But for some reason, I can't get it to work and I'm not sure whether I am doing something wrong or there's a problem with the ebuild...

Here's the initial situation with a fully up-to-date Gentoo installation (no rust installed):

Code:
# emerge -pv app-admin/vaultwarden

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 1.58 s (backtrack: 0/20).

[ebuild  N     ] acct-group/vaultwarden-0::localrepo  0 KiB
[ebuild  N    ~] app-admin/vaultwarden-web-vault-2024.3.1::localrepo  0 KiB
[ebuild  N     ] acct-user/vaultwarden-0::localrepo  0 KiB
[ebuild  N     ] app-eselect/eselect-rust-20210703::gentoo  5 KiB
[ebuild  N     ] sys-apps/lsb-release-3.3::gentoo  16 KiB
[ebuild  N     ] dev-lang/rust-1.75.0-r1:stable/1.75::gentoo  USE="lto (-big-endian) -clippy -debug -dist -doc (-llvm-libunwind) (-miri) (-nightly) (-parallel-compiler) -profiler -rust-analyzer -rust-src -rustfmt (-system-bootstrap) (-system-llvm) -test -verify-sig -wasm" CPU_FLAGS_X86="sse2" LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARC -ARM -AVR -BPF -CSKY -DirectX -Hexagon -Lanai -LoongArch -M68k -MSP430 -Mips -NVPTX -PowerPC -RISCV -SPIRV -Sparc -SystemZ -VE -WebAssembly -XCore -Xtensa" 308,150 KiB
[ebuild  N     ] virtual/rust-1.75.0-r1:0/llvm-17::gentoo  USE="-profiler -rustfmt" 0 KiB
[ebuild  N    ~] app-admin/vaultwarden-1.30.5::localrepo  USE="sqlite web -debug -mysql -postgres -system-sqlite" 0 KiB

Total: 8 packages (8 new), Size of downloads: 308,170 KiB

It wants to pull in dev-lang/rust, so I emerge dev-lang/rust-bin:

Code:
emerge -v --oneshot virtual/rust dev-lang/rust-bin

Rust-bin was installed successfully:

Code:
# eselect rust show
Current Rust implementation:
  rust-bin-1.75.0

# rustc --version
rustc 1.75.0 (82e1608df 2023-12-21)

Now I try to re-emerge vaultwarden, but it still insists on building dev-lang/rust:

Code:
# emerge -pv app-admin/vaultwarden

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 0.87 s (backtrack: 0/20).

[ebuild  N     ] acct-group/vaultwarden-0::localrepo  0 KiB
[ebuild  N    ~] app-admin/vaultwarden-web-vault-2024.3.1::localrepo  0 KiB
[ebuild  N     ] dev-lang/rust-1.75.0-r1:stable/1.75::gentoo  USE="lto (-big-endian) -clippy -debug -dist -doc (-llvm-libunwind) (-miri) (-nightly) (-parallel-compiler) -profiler -rust-analyzer -rust-src -rustfmt (-system-bootstrap) (-system-llvm) -test -verify-sig -wasm" CPU_FLAGS_X86="sse2" LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARC -ARM -AVR -BPF -CSKY -DirectX -Hexagon -Lanai -LoongArch -M68k -MSP430 -Mips -NVPTX -PowerPC -RISCV -SPIRV -Sparc -SystemZ -VE -WebAssembly -XCore -Xtensa" 308,150 KiB
[ebuild  N     ] acct-user/vaultwarden-0::localrepo  0 KiB
[ebuild  N    ~] app-admin/vaultwarden-1.30.5::localrepo  USE="sqlite web -debug -mysql -postgres -system-sqlite" 0 KiB

Total: 5 packages (5 new), Size of downloads: 308,150 KiB

Why is that? I tried adding --exclude=dev-lang/rust and even masking dev-lang/rust, but that breaks the installation:

Code:
# emerge -pv app-admin/vaultwarden --exclude=dev-lang/rust

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 0.93 s (backtrack: 2/20).


!!! All ebuilds that could satisfy ">=dev-lang/rust-1.74.0" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/rust-1.77.1::gentoo (masked by: ~amd64 keyword)
- dev-lang/rust-1.76.0-r1::gentoo (masked by: ~amd64 keyword)
- dev-lang/rust-1.75.0-r1::gentoo (masked by: exclude option)
- dev-lang/rust-1.74.1::gentoo (masked by: exclude option)

(dependency required by "app-admin/vaultwarden-1.30.5::localrepo" [ebuild])
(dependency required by "vaultwarden" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

When checking the vaultwarden-1.30.5.ebuild I see that it explicitly depends on dev-lang/rust:

Code:
DEPEND="
   ${ACCT_DEPEND}
   >=dev-lang/rust-1.74.0
   dev-libs/openssl:0=
   sqlite? ( system-sqlite? ( >=dev-db/sqlite-3.44.0:3 ) )
   web? ( >=app-admin/vaultwarden-web-vault-2024.1.2 )
"

Is that correct? Shouldn't it depend on virtual/rust instead of dev-lang/rust?

When I change the ebuild to use virtual/rust, I am able to install vaultwarden successfully without compiling rust...

Is my reasoning correct? I'm not the ebuild maintainer, but I can let the maintainer know so that it can be fixed in a future version.


Last edited by mahi on Fri Apr 12, 2024 12:40 pm; edited 2 times in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30975
Location: here

PostPosted: Fri Apr 12, 2024 12:11 pm    Post subject: Re: Package wants to compile rust despite rust-bin installed Reply with quote

mahi wrote:
When I change the ebuild to use virtual/rust, I am able to install vaultwarden successfully without compiling rust...

Is my reasoning correct? I'm not the ebuild maintainer, but I can let the maintainer know so that it can be fixed in a future version.

If rust not need some special use flag, as would seem to be the case, your assumption is correct.
In fact by doing cargo inherit the dependency on virtual/rust is automatically pushed so you could eliminate it.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
mahi
n00b
n00b


Joined: 18 Mar 2004
Posts: 34

PostPosted: Fri Apr 12, 2024 12:38 pm    Post subject: Re: Package wants to compile rust despite rust-bin installed Reply with quote

Thank you, fedeliallalinea!

Update: I contacted the ebuild maintainer and the ebuild is already updated! 8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum