Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Rust and package.provided
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
skiwarz
Apprentice
Apprentice


Joined: 23 Feb 2014
Posts: 279

PostPosted: Tue Apr 15, 2025 10:13 pm    Post subject: Rust and package.provided Reply with quote

I currently have dev-lang/rust-1.81.0 installed on a machine. Due to not updating in quite a while, this is no longer in the portage tree. The closest is 1.81.0-r101. When I attempt to "emerge -aqv rust", portage fails to see my currently-installed rust and keeps trying to pull in earlier versions to satisfy dependencies that can't be satisfied.
So, to fix this, I tried putting "dev-lang/rust-1.81.0" into /etc/portage/profile/package.provided.
This had absolutely no effect. Reading the wiki, this should cause portage to think that I have this package installed (which I do). This should then allow me to install rust-1.82.0 or even rust-1.81.0-r101. What am I doing wrong with respect to package.provided?
I've also tried adding "dev-lang/rust-1.81.0-r101" and "dev-lang/rust-1.81.0:1.81.0" on a whim, with identical results.

The reason I can't bootstrap with rust-bin is because this is an athlon xp machine, which has issues with the x86 version and sse2 instructions. So I have a whole slew of package.env settings to compensate, forcing me to use dev-lang/rust.
Back to top
View user's profile Send private message
skiwarz
Apprentice
Apprentice


Joined: 23 Feb 2014
Posts: 279

PostPosted: Tue Apr 15, 2025 10:29 pm    Post subject: Reply with quote

I think the dependency in this case lies in the rust eclass, if that matters. If I run
Code:
ebuild rust-1.82.0-r102.ebuild merge
I get the following:
Code:
* ERROR: dev-lang/rust-1.82.0-r102 failed (setup phase):
 *   No Rust matching requirements (<= 1.82.0 >= 1.81.0) found installed!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23498

PostPosted: Tue Apr 15, 2025 11:07 pm    Post subject: Reply with quote

package.provided assures Portage that the named package, or a drop-in replacement for it, is installed. There is no need to use it to remind Portage of a package that is actually installed. I suspect your problem is that the specific version of dev-lang/rust that you have installed is not an acceptable solution to the DEPEND requirement. For =dev-lang/rust-1.82.0-r102, you need one of: dev-lang/rust-bin:1.82.0 dev-lang/rust:1.82.0 dev-lang/rust-bin:1.81.0 dev-lang/rust:1.81.0. Do you have any of those installed? As I read the ebuild for 1.81.0 (which has since been removed), the answer would be no. Its SLOT appears to have been stable/${ABI_VER}, which is not equal to the string 1.81.0, regardless of the text of ABI_VER.

If you want to bypass the dependency check, you will need to arrange for your pre-slot Rust to provide the right commands for the eclass's test to succeed.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2353

PostPosted: Tue Apr 15, 2025 11:07 pm    Post subject: Reply with quote

Seeing the full output would help us. It's possible you need several such package.provided entries.
Back to top
View user's profile Send private message
skiwarz
Apprentice
Apprentice


Joined: 23 Feb 2014
Posts: 279

PostPosted: Tue Apr 15, 2025 11:59 pm    Post subject: Reply with quote

Hu wrote:
package.provided assures Portage that the named package, or a drop-in replacement for it, is installed. There is no need to use it to remind Portage of a package that is actually installed. I suspect your problem is that the specific version of dev-lang/rust that you have installed is not an acceptable solution to the DEPEND requirement. For =dev-lang/rust-1.82.0-r102, you need one of: dev-lang/rust-bin:1.82.0 dev-lang/rust:1.82.0 dev-lang/rust-bin:1.81.0 dev-lang/rust:1.81.0. Do you have any of those installed? As I read the ebuild for 1.81.0 (which has since been removed), the answer would be no. Its SLOT appears to have been stable/${ABI_VER}, which is not equal to the string 1.81.0, regardless of the text of ABI_VER.

If you want to bypass the dependency check, you will need to arrange for your pre-slot Rust to provide the right commands for the eclass's test to succeed.

This is probably the case. My slot is stable/${ABI_VER} for the currently 1.81.0 version.

Also, for some reason portage just started noticing my package.provided. With that line there, it just tells me "a requested package will not be merged because it is listed in package.provided." So maybe package.provided isn't going to be useful here.
I'll delete that for the output below.

Anywho, here's what I get when I try "emerge -aqv rust": https://pastebin.com/raw/1a1eXcEc
Output of "emerge -aqv =dev-lang/rust-1.81.0-r101":
Code:
[ebuild  NS   ] dev-lang/rust-1.81.0-r101 [1.81.0] USE="(-big-endian) -clippy -debug -dist -doc (-llvm-libunwind) (-lto) (-miri) -nightly (-parallel-compiler) -rust-analyzer -rust-src -rustfmt -system-llvm -test -verify-sig -wasm (-profiler%) (-system-bootstrap%*)" CPU_FLAGS_X86="-sse2" LLVM_SLOT="(18%*)" 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"

Output of "ebuild rust-1.82.0-r102.ebuild merge": https://pastebin.com/raw/HHsZ62Ka

The only difference between the ebuilds in my overlay and the ::gentoo ones are that I deleted the line
Code:
    x86? ( cpu_flags_x86_sse2 )

to allow compilation on this machine. Here's rust-1.82.0-r102.ebuild for reference: https://pastebin.com/raw/s0TNkadp
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