Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ebuild selected require cpu_flags_x86_sse2 [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
yookoala
n00b
n00b


Joined: 23 Oct 2024
Posts: 6

PostPosted: Wed Oct 23, 2024 5:05 am    Post subject: ebuild selected require cpu_flags_x86_sse2 [SOLVED] Reply with quote

I'm trying to install Gentoo on an old laptop.

I have arrived at the step to run grub-install and it failed. Turns out the grub installation was not successful. Through out the installation process, I think I missed several signs that some previous step has failed.

If I read the error correctly, it says something like "because some of my selected package requires rust, and rust needs my CPU to support SSE2, the installation fails."

So my questions are:

  • How do I unselect packages that cause the installation problem(s)?
  • I can do my installation without GNOME. Is there a way I can install a systemd-boot setup without rust?
  • If I cannot use systemd, then how do I revert my installation enough for a sysinitv installation without redo all my installation procedures?


Contexts:

If I now run:
Code:

emerge --ask --verbose @world


I will get these error messages:
Code:

!!!  The ebuild selected to satisfy "~dev-lang/rust-bin-1.80.1[profiler?,rustfmt?abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?]" has unmet requirements.
- dev-lang/rust-bin-1.80.1:gentoo USE="(-big-endian) -clippy -doc (-prefix) -profiler) -rust-analyzer -rust-src -rustfmt -verify-sig" CPU_FLAGS_X86="-sse2"

  The following REQUIRED_USE flag constraints are unsatisfied:
    x86? ( cpu_flags_x86_sse2 )

(dependency required by "virtual/rust-1.80.1::gentoo" [ebuild])
(dependency required by "gnome-base/librsvg-2.57.3::gentoo" [ebuild])
(dependency required by "x11-themes/adwaita-icon-themes-45.0::gentoo" [ebuild])
(dependency required by "x11-libs/gtk+-3.24.41-r1::gentoo" [ebuild])
(dependency required by "gnome-extra/polkit-gnome-0.105-r2::gentoo" [ebuild])
(dependency required by "sys-auth/polkit-124-r1::gentoo[gtk]" [ebuild])
(dependency required by "sys-apps/systemd-25.11::gentoo[policykit]" [ebuild])


Last edited by yookoala on Fri Oct 25, 2024 10:43 am; edited 2 times in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31292
Location: here

PostPosted: Wed Oct 23, 2024 5:32 am    Post subject: Reply with quote

I think it is the gnome-base/librsvg package that requires rust to compile, but there are other packages that may require rust.
You can install the precompiled dev-lang/rust-bin instead of dev-lang/rust.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22768

PostPosted: Wed Oct 23, 2024 1:50 pm    Post subject: Reply with quote

Welcome to the forums.

Unfortunately, even rust-bin requires SSE2. This is a known issue upstream, which the Rust project refuses to fix. They only provide rust compilers that require SSE2. I think some users (possibly eccerr0r?) have managed to get a no-SSE2 Rust to build, but it requires some special work. Avoiding Rust entirely on no-SSE2 systems is probably the path of less frustration. A quick search for rust sse2 x86 leads me to https://docs.rs/safe_arch which claims:
https://docs.rs/safe_arch wrote:
you'd need a super old x86 CPU for it to not support at least sse and sse2 , so they're a safe bet for the language to enable all the time.
I leave it to the reader whether that is really a safe bet. The second hit is https://wiki.gentoo.org/wiki/Rust_x86_without_SSE2, which looks promising, though I have never tried it.

Before embarking on any of that, OP, are you sure your CPU doesn't support SSE2? The Portage message only says you did not tell Portage that it can use SSE2. You might (or might not) be able to grant it that permission and have everything work. If unsure, please tell us exactly what CPU you have. The output of cat /proc/cpuinfo (limited to the first block) should suffice.
Back to top
View user's profile Send private message
yookoala
n00b
n00b


Joined: 23 Oct 2024
Posts: 6

PostPosted: Thu Oct 24, 2024 8:35 am    Post subject: Reply with quote

Thank you both for replying.

Hu wrote:
Welcome to the forums.

Unfortunately, even rust-bin requires SSE2. This is a known issue upstream, which the Rust project refuses to fix. They only provide rust compilers that require SSE2. I think some users (possibly eccerr0r?) have managed to get a no-SSE2 Rust to build, but it requires some special work. Avoiding Rust entirely on no-SSE2 systems is probably the path of less frustration. A quick search for rust sse2 x86 leads me to https://docs.rs/safe_arch which claims:
https://docs.rs/safe_arch wrote:
you'd need a super old x86 CPU for it to not support at least sse and sse2 , so they're a safe bet for the language to enable all the time.
I leave it to the reader whether that is really a safe bet. The second hit is https://wiki.gentoo.org/wiki/Rust_x86_without_SSE2, which looks promising, though I have never tried it.

Before embarking on any of that, OP, are you sure your CPU doesn't support SSE2? The Portage message only says you did not tell Portage that it can use SSE2. You might (or might not) be able to grant it that permission and have everything work. If unsure, please tell us exactly what CPU you have. The output of cat /proc/cpuinfo (limited to the first block) should suffice.



Thanks for the advice about checking the CPU.

I've run the
Code:
cat /proc/cpuinfo
and I do see "sse", "sse2", "ssse3", "sse4_1" and even "sse4_2" support. So this is probably not the real blocker here. What do you suggest to check next? Please advice.
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 501

PostPosted: Thu Oct 24, 2024 9:02 am    Post subject: Reply with quote

Please show
Code:
emerge --info
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31292
Location: here

PostPosted: Thu Oct 24, 2024 11:35 am    Post subject: Reply with quote

yookoala wrote:
I've run the
Code:
cat /proc/cpuinfo
and I do see "sse", "sse2", "ssse3", "sse4_1" and even "sse4_2" support. So this is probably not the real blocker here. What do you suggest to check next? Please advice.

If your cpu support sse2 you should enable these use flag using app-portage/cpuid2cpuflags.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
yookoala
n00b
n00b


Joined: 23 Oct 2024
Posts: 6

PostPosted: Fri Oct 25, 2024 10:39 am    Post subject: Reply with quote

fedeliallalinea wrote:

If your cpu support sse2 you should enable these use flag using app-portage/cpuid2cpuflags.


I end up grep the /proc/cpuinfo "flag" line's content into /etc/portage/package.use/my-cpu-flags behind "*/* cpu_flags_x86: ".

Then the installation proceeds.

Thank you all for the help.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22768

PostPosted: Fri Oct 25, 2024 11:44 am    Post subject: Reply with quote

I think that is the wrong solution. It may solve this particular problem, but in general there is no guarantee that the kernel names shown in /proc/cpuinfo are all CPU_FLAGS_X86 values. Why did you do that instead of using the tool that was suggested to you?
Back to top
View user's profile Send private message
yookoala
n00b
n00b


Joined: 23 Oct 2024
Posts: 6

PostPosted: Sat Oct 26, 2024 9:48 am    Post subject: Reply with quote

Hu wrote:
I think that is the wrong solution. It may solve this particular problem, but in general there is no guarantee that the kernel names shown in /proc/cpuinfo are all CPU_FLAGS_X86 values. Why did you do that instead of using the tool that was suggested to you?


Because the problem blocks any and all emerge commands. So, ironically, I cannot install the tool you mentioned before I fix the problem :(

I will fix this before installing other applications.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22768

PostPosted: Sat Oct 26, 2024 2:15 pm    Post subject: Reply with quote

I don't think that's correct, either. The recommended package has minimal dependencies, and should have been possible to install without sse2 support. What errors did you get when you tried to install it?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9835
Location: almost Mile High in the USA

PostPosted: Sat Oct 26, 2024 4:16 pm    Post subject: Reply with quote

I think the main reason why the rust upstream devs don't want to supply a non-SSE2 bootstrapping binary is because that would mean they would have to maintain the non-SSE2 output stream...which they don't want to do and want other people to submit patches, in hopes the code stream would eventually get deleted due to "but nobody uses it..." which they can't say if the bootstrap code uses the stream! :\

Anyway AFAIK all 64-bit capable CPUs support SSE2. The only 32-bit only CPUs that support SSE2 are:

Pentium 4 Northwood (meaning, all P4's support SSE2)
Atom Bonnell (meaning all Atoms support SSE2)
Pentium M
Core Solo/Core Duo (Meaning all of Core, Core 2, Core i- xyz support SSE2)

I was able to build a mostly working rust compiler at some point long ago that worked enough to build librsvg but would not build rust to run on an Athlon XP. I have since given up on that path as I no longer have any worthwhile 32-bit machines/cpus that can run SMP and can't run 64-bit as the Athlon XP is unreliable due to defective northbridge/motherboard.

Known CPUs to not have SSE2:
Athlon XP (including Barton) and older
Pentium III (including Tualatin) and older

If you need librsvg for gnome, the preferred path if you have one of these old cpus is use an old version of librsvg which is written in C. Mask all versions of librsvg over 2.42 I believe is the best way, IIRC it was around then that they switched to rust.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
yookoala
n00b
n00b


Joined: 23 Oct 2024
Posts: 6

PostPosted: Thu Oct 31, 2024 2:07 am    Post subject: Reply with quote

Hu wrote:
I don't think that's correct, either. The recommended package has minimal dependencies, and should have been possible to install without sse2 support. What errors did you get when you tried to install it?


I have already eselected packages to install. I don't remember what exactly but the same error (as shown on the original post above) comes up everytime I emerge anything. And I don't yet know how to find out and deselect the specific package with problem. So the easiest thing for me was to fix the sse2 error first.

I'm sure there are better ways, but I'm not familiar with Gentoo enough for that.

Please advice what I might do instead should me or any other person encounter the same situation. Much appreciated.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2737
Location: Here and Away Again

PostPosted: Thu Oct 31, 2024 11:22 am    Post subject: Reply with quote

yookoala wrote:
Hu wrote:
I don't think that's correct, either. The recommended package has minimal dependencies, and should have been possible to install without sse2 support. What errors did you get when you tried to install it?


I have already eselected packages to install. I don't remember what exactly but the same error (as shown on the original post above) comes up everytime I emerge anything. And I don't yet know how to find out and deselect the specific package with problem. So the easiest thing for me was to fix the sse2 error first.

I'm sure there are better ways, but I'm not familiar with Gentoo enough for that.

Please advice what I might do instead should me or any other person encounter the same situation. Much appreciated.

What exactly do you mean by "eselected packages to install"?

Also by "the same error comes up everytime" do you mean that something like

Code:
emerge --ask app-portage/cpuid2cpuflags

would also be unsuccessful?
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
yookoala
n00b
n00b


Joined: 23 Oct 2024
Posts: 6

PostPosted: Fri Nov 01, 2024 1:00 pm    Post subject: Reply with quote

Chiitoo wrote:
yookoala wrote:
Hu wrote:
I don't think that's correct, either. The recommended package has minimal dependencies, and should have been possible to install without sse2 support. What errors did you get when you tried to install it?


I have already eselected packages to install. I don't remember what exactly but the same error (as shown on the original post above) comes up everytime I emerge anything. And I don't yet know how to find out and deselect the specific package with problem. So the easiest thing for me was to fix the sse2 error first.

I'm sure there are better ways, but I'm not familiar with Gentoo enough for that.

Please advice what I might do instead should me or any other person encounter the same situation. Much appreciated.

What exactly do you mean by "eselected packages to install"?

Also by "the same error comes up everytime" do you mean that something like

Code:
emerge --ask app-portage/cpuid2cpuflags

would also be unsuccessful?


I have since fixed the flag issue so I can't really test right now.

But even this will show the same error:
Code:

emerge app-editors/vim
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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