Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sse2 instruction not supported by cpu [SOLVED]
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
double_star
n00b
n00b


Joined: 08 Jan 2020
Posts: 9
Location: Canada

PostPosted: Thu Feb 20, 2020 12:22 am    Post subject: sse2 instruction not supported by cpu [SOLVED] Reply with quote

I'm trying to install firefox on a 32bit machine.

The processor is a Intel Core 2 Duo E6300 (2007)

Portage gives me this error message, then quits:

Code:
ERROR: net-libs/nodejs-12.14.0::gentoo failed (pretend phase):
  Your CPU doesn't support the required SSE2 instruction.


However, cat /proc/cpuinfo shows sse2 listed under flags, so my cpu does have that instruction.

I would assume that gentoo gets all/some of the cpu information from /proc/cpuinfo but I decided to set CPU_FLAGS_X86 in my make.conf to the flag values in /proc/cpuinfo to see if that would change anything and portage now gives me the following:

Code:
The following REQUIRED_USE flag constraints are unsatisfied:
  cpu_flags_x86_ssse3? (cput_flags_x86_sse3) cpu_flags_x86_sse? (cpu_flags_x86_mmxext)


If I understand this correctly it's saying if I want to use ssse3 I also need sse3. And, if I want to use sse then I need mmxext.

Under /proc/cpuinfo sse3 and mmxext are not listed under flags. So I removed ssse3 and sse and got the following:

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


I put ssse3 and sse back in and also added sse3 and mmxext to CPU_FLAGS_X86 in make.conf and it seems to be working fine. It's currently building and installing 37 packages. However, I do have some follow up questions.

1.) Why did I get an error message saying my cpu doesn't support sse2 when it does and is listed in /proc/cpuinfo?
2.) Since I don't have sse3 and mmxext how come adding those flags seemed to solve the problem?
3.) Looking at the required use flag constraints message how could it be that I have ssse3 and it requires sse3 which apparently I don't have because it's not listed under /proc/cpuinfo. So if ssse3 requires sse3 to work shouldn't my cpu also have sse3?

I would greatly appreciate if anyone could help clarify this for me :)

[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]


Last edited by double_star on Thu Feb 20, 2020 4:24 am; edited 2 times in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Thu Feb 20, 2020 12:50 am    Post subject: Reply with quote

You really shouldn't do 32 bit installs nowadays unless you really are under 2 GB of RAM, even then it would make more sense to add RAM and go 64 bit.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
double_star
n00b
n00b


Joined: 08 Jan 2020
Posts: 9
Location: Canada

PostPosted: Thu Feb 20, 2020 12:58 am    Post subject: Reply with quote

Jaglover wrote:
You really shouldn't do 32 bit installs nowadays unless you really are under 2 GB of RAM, even then it would make more sense to add RAM and go 64 bit.


I wasn't aware of this. Why shouldn't we do 32-bit installs anymore?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Thu Feb 20, 2020 1:05 am    Post subject: Reply with quote

There are embedded systems where 32-bit is OK, for generic use support is fading. Proprietary software like Skype and some others are 64-bit only. In Gentoo 32-bit is less tested because the userbase has shrunk.

BTW, your subject line is incorrect, Core 2 CPU's are 64-bit.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
double_star
n00b
n00b


Joined: 08 Jan 2020
Posts: 9
Location: Canada

PostPosted: Thu Feb 20, 2020 1:58 am    Post subject: Reply with quote

Jaglover wrote:
There are embedded systems where 32-bit is OK, for generic use support is fading. Proprietary software like Skype and some others are 64-bit only. In Gentoo 32-bit is less tested because the userbase has shrunk.

BTW, your subject line is incorrect, Core 2 CPU's are 64-bit.


Thanks, I made the correction.

So the problems I was having can be attributed to 32-bit being less tested (perhaps buggy) ?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23359

PostPosted: Thu Feb 20, 2020 4:04 am    Post subject: Re: sse2 instruction not supported by cpu Reply with quote

double_star wrote:
I'm trying to install firefox on a 32bit machine.
For this post, you're trying to install net-libs/nodejs. That might be because you need it for Firefox, but the problem is with Nodejs, not with Firefox.
double_star wrote:
Code:
ERROR: net-libs/nodejs-12.14.0::gentoo failed (pretend phase):
  Your CPU doesn't support the required SSE2 instruction.
1.) Why did I get an error message saying my cpu doesn't support sse2 when it does and is listed in /proc/cpuinfo?
The ebuild told it to:
net-libs/nodejs/nodejs-12.14.0.ebuild:
    (use x86 && ! use cpu_flags_x86_sse2) && \
        die "Your CPU doesn't support the required SSE2 instruction."
It didn't test anything. It just assumed that since you didn't set sse2, then your CPU must be incapable. To me, this is a bug in the ebuild. If the ebuild isn't testing the capabilities of the CPU, then the message should not sound like it is. I think this test should be removed and replaced with a new REQUIRED_USE clause:
Code:
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
If for some reason the ebuild needs to give a particular message, then the die should be reworded to make clear that this is purely a configuration test, and no inspection of CPU capabilities was done.
double_star wrote:
Code:
The following REQUIRED_USE flag constraints are unsatisfied:
  cpu_flags_x86_ssse3? (cput_flags_x86_sse3) cpu_flags_x86_sse? (cpu_flags_x86_mmxext)
If I understand this correctly it's saying if I want to use ssse3 I also need sse3. And, if I want to use sse then I need mmxext.
Yes.
double_star wrote:
2.) Since I don't have sse3 and mmxext how come adding those flags seemed to solve the problem?
You told Portage to use the flags, so now it is happy. If the ebuild actually uses those features, and your CPU doesn't support them, you will get a crash when you try to execute those instructions.
double_star wrote:
3.) Looking at the required use flag constraints message how could it be that I have ssse3 and it requires sse3 which apparently I don't have because it's not listed under /proc/cpuinfo. So if ssse3 requires sse3 to work shouldn't my cpu also have sse3?
CPU manufacturers are not known for reason in this area. Witness the use of features named sse, sse2, sse3, and ssse3. Better names would have been nice.
Back to top
View user's profile Send private message
double_star
n00b
n00b


Joined: 08 Jan 2020
Posts: 9
Location: Canada

PostPosted: Thu Feb 20, 2020 4:23 am    Post subject: Re: sse2 instruction not supported by cpu Reply with quote

Hu wrote:
double_star wrote:
I'm trying to install firefox on a 32bit machine.
For this post, you're trying to install net-libs/nodejs. That might be because you need it for Firefox, but the problem is with Nodejs, not with Firefox.
double_star wrote:
Code:
ERROR: net-libs/nodejs-12.14.0::gentoo failed (pretend phase):
  Your CPU doesn't support the required SSE2 instruction.
1.) Why did I get an error message saying my cpu doesn't support sse2 when it does and is listed in /proc/cpuinfo?
The ebuild told it to:
net-libs/nodejs/nodejs-12.14.0.ebuild:
    (use x86 && ! use cpu_flags_x86_sse2) && \
        die "Your CPU doesn't support the required SSE2 instruction."
It didn't test anything. It just assumed that since you didn't set sse2, then your CPU must be incapable. To me, this is a bug in the ebuild. If the ebuild isn't testing the capabilities of the CPU, then the message should not sound like it is. I think this test should be removed and replaced with a new REQUIRED_USE clause:
Code:
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
If for some reason the ebuild needs to give a particular message, then the die should be reworded to make clear that this is purely a configuration test, and no inspection of CPU capabilities was done.
double_star wrote:
Code:
The following REQUIRED_USE flag constraints are unsatisfied:
  cpu_flags_x86_ssse3? (cput_flags_x86_sse3) cpu_flags_x86_sse? (cpu_flags_x86_mmxext)
If I understand this correctly it's saying if I want to use ssse3 I also need sse3. And, if I want to use sse then I need mmxext.
Yes.
double_star wrote:
2.) Since I don't have sse3 and mmxext how come adding those flags seemed to solve the problem?
You told Portage to use the flags, so now it is happy. If the ebuild actually uses those features, and your CPU doesn't support them, you will get a crash when you try to execute those instructions.
double_star wrote:
3.) Looking at the required use flag constraints message how could it be that I have ssse3 and it requires sse3 which apparently I don't have because it's not listed under /proc/cpuinfo. So if ssse3 requires sse3 to work shouldn't my cpu also have sse3?
CPU manufacturers are not known for reason in this area. Witness the use of features named sse, sse2, sse3, and ssse3. Better names would have been nice.


Thank you for your reply, Hu :D Things are much clearer now.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7471

PostPosted: Thu Feb 20, 2020 10:05 am    Post subject: Re: sse2 instruction not supported by cpu [SOLVED] Reply with quote

double_star wrote:

2.) Since I don't have sse3 and mmxext how come adding those flags seemed to solve the problem?
3.) Looking at the required use flag constraints message how could it be that I have ssse3 and it requires sse3 which apparently I don't have because it's not listed under /proc/cpuinfo. So if ssse3 requires sse3 to work shouldn't my cpu also have sse3?

2) because you don't need a cpu capable of running the code to produce the code, that's why we can do cross compilation, you can see it by yourself, try building a program with an instruction your cpu doesn't handle: gcc -m3dnow test.c -o test -> if the result is using 3dnow code, you will have an illegal instruction error, if the result doesn't use 3dnow code, the code will run without error ; but in both case, your cpu has been able to build that
3) because you assume you should see sse3 and mmxext in /proc/cpu, but sse3 is named "pni" in /proc/cpu (same for mmxext but i forget its name) ; instead of looking at /proc/cpu, run the helper program, that will look at them and tell you what x86_flags you should use -> app-portage/cpuid2cpuflags
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Thu Feb 20, 2020 10:09 am    Post subject: Reply with quote

I recall SSE2 contains all MMXEXT instructions. Thus, if you have SSE2 then you also have MMXEXT.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
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