Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rust without sse2
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
skiwarz
Apprentice
Apprentice


Joined: 23 Feb 2014
Posts: 263

PostPosted: Sat Mar 26, 2022 10:43 pm    Post subject: rust without sse2 Reply with quote

Hello everyone,
I have an athlon XP 3200+ cpu (2004-era) on which I'm trying to get X working. The issue I'm having is that when I try to emerge xorg-server, I get a chain of dependency errors resulting in needing the USE flag "cpu_flags_x86_sse2". My cpu does not have sse2...

The whole chain of dependencies is:

  • xorg-server requires elogind (due to my USE flags)
  • elogind requires polkit
  • polkit requires spidermonkey
  • spidermonkey requires rust
  • rust requires USE="cpu_flags_x86_sse2"


I can make it install by excluding polkit, but as far as I know this is required in order to use the "shutdown" buttons in KDE/xfce/etc... so it would be nice to have.

Why does polkit require spidermonkey and therefore rust? Spidermonkey belongs with firefox, right?
Or, more importantly, why can I not install rust without the sse2 instruction set? I'm compiling from source, so I SHOULD be able to just tell the compiler not to use it, right?
I'm tempted to modify the ebuild to just ignore that use flag, but It'll probably take me a good 24 hours to compile, so I'm trying to make as good a guess as I can beforehand.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat Mar 26, 2022 10:51 pm    Post subject: Reply with quote

You could try polkit-0.120_p20220221 with USE flag duktape. It will pull in duktape instead of spidermonkey. :)
Code:
DEPEND="
    ...
    duktape? ( dev-lang/duktape:= )
    !duktape? ( dev-lang/spidermonkey:91[-debug] )
    ...
"
Back to top
View user's profile Send private message
skiwarz
Apprentice
Apprentice


Joined: 23 Feb 2014
Posts: 263

PostPosted: Sat Mar 26, 2022 11:14 pm    Post subject: Reply with quote

mike155 wrote:
You could try polkit-0.120_p20220221 with USE flag duktape. It will pull in duktape instead of spidermonkey. :)
Code:
DEPEND="
    ...
    duktape? ( dev-lang/duktape:= )
    !duktape? ( dev-lang/spidermonkey:91[-debug] )
    ...
"

Thanks for this, I didn't see that. I may give it a shot if I can't find another solution.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21714

PostPosted: Sat Mar 26, 2022 11:20 pm    Post subject: Re: rust without sse2 Reply with quote

skiwarz wrote:
Spidermonkey belongs with firefox, right?
The package description states that Spidermonkey is derived from Mozilla's JavaScript engine, so in a sense, yes.
skiwarz wrote:
Or, more importantly, why can I not install rust without the sse2 instruction set?
Rust upstream has decided that all x86-based systems shall have SSE2 or shall not be supported. There have been several threads over the years from people who were unable to use otherwise serviceable hardware due to this.
skiwarz wrote:
I'm compiling from source, so I SHOULD be able to just tell the compiler not to use it, right?
Yes. The problem is that in order to build Rust, you need a working Rust compiler. The prebuilt Rust compiler provided by upstream assumes you have SSE2 support, and will crash if you don't have it. So you need to use an SSE2-enabled system to run the prebuilt Rust compiler to generate a custom no-SSE2 Rust compiler. I vaguely recall that the Rust standard library may also use SSE2 instructions. I think this can be avoided with the right flags, but I don't recall what those flags are.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Sat Mar 26, 2022 11:58 pm    Post subject: Reply with quote

Just as a word of warning if you're trying to set up a DE, next thing you may run into is that librsvg also requires rust - and using an old version by masking new versions is the way to get around it (other than disabling svg graphics). It's a dependency of gtk+ ...

And as an answer to the first question, polkit writes its config files in javascript
spidermonkey is a javascript interpreter
spidermonkey (and nodejs and webkit-gtk and qtwebengine) all have hardcoded SSE2 instructions for speed (and spidermonkey is written in rust, but that's another issue)
therefore, spidermonkey will not run on an athlonXP or P3 or other old CPUs.
duktape is the slowest interpreter of all the javascript interpreters, but it's the cost that has to be paid to run on older machines. Note that this is NOT a reduction of speed in interpreting javascript, rather, old machines do not gain the benefit of new interpreters.
_________________
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
skiwarz
Apprentice
Apprentice


Joined: 23 Feb 2014
Posts: 263

PostPosted: Sun Mar 27, 2022 12:26 am    Post subject: Reply with quote

jeez...
thanks for the advice guys. I masked the newer librsvg and disabled policykit (for now) and xorg and fluxbox are building. It sounds like I'm going with:
1. Duktape for javascript
2. Build my own rust without sse2 (I have to set up crossdev anyways, might as well start with this).
3. Possibly disable svg, or mask gtk entirely (will be interesting to see how that turns out), as I assume eventually librsvg-2.40.21 will drop out of the portage tree.

I had no idea old hardware was this hard to deal with. Good learning experience though lol.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Sun Mar 27, 2022 12:34 am    Post subject: Reply with quote

Based on the fact that non-x86 architectures also need svg support, the old version of librsvg probably will stay around for a while when things like m68k, ia64, alpha, and hppa may never get a rust port...
_________________
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
crististm
n00b
n00b


Joined: 24 Nov 2011
Posts: 7

PostPosted: Mon Apr 04, 2022 11:58 am    Post subject: rust without sse2 Reply with quote

I've posted build instructions for rust without sse2 here https://forums.gentoo.org/viewtopic-p-8696734.html#8696734

If you have a working rust in /usr/local it is enough for you to build seamonkey and other packages that depend on rust.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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