Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Rust w/ Pentium III (Possible Work-around)
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
Vorlon
Apprentice
Apprentice


Joined: 16 May 2003
Posts: 233
Location: West Grove, PA

PostPosted: Mon Aug 31, 2020 11:55 am    Post subject: Rust w/ Pentium III (Possible Work-around) Reply with quote

Because I enjoy pain, I am trying to install Gentoo on an old Pentium III machine. Unfortunately, Rust is now a requirement for a stable desktop environment, and Rust requires an sse2 instruction. Unfortunately, my old P3 does not support sse2.

Anybody have any suggestions on how to build Gentoo without needing Rust, or an sse2 instruction set?

TIA
_________________
Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation


Last edited by Vorlon on Mon Aug 31, 2020 5:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Guru
Guru


Joined: 23 Mar 2019
Posts: 550

PostPosted: Mon Aug 31, 2020 1:06 pm    Post subject: Reply with quote

Is this cpu instruction also necessary if you are using rust-bin?
If not please take a look at this thread:
https://forums.gentoo.org/viewtopic-t-1117094-highlight-.html
:D
Back to top
View user's profile Send private message
Vorlon
Apprentice
Apprentice


Joined: 16 May 2003
Posts: 233
Location: West Grove, PA

PostPosted: Mon Aug 31, 2020 1:18 pm    Post subject: Reply with quote

Good idea, but rust-bin has the same dependency on the sse2 instruction. <sigh>
_________________
Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation
Back to top
View user's profile Send private message
Vorlon
Apprentice
Apprentice


Joined: 16 May 2003
Posts: 233
Location: West Grove, PA

PostPosted: Mon Aug 31, 2020 1:40 pm    Post subject: Reply with quote

I've done some more digging. The Rust gang defines a "i686" as a Pentium 4 or better, while I had assumed a P3 was an i686. (Apparently, I'm not the only one who feels that way, but the Rustafarians are not going to change their definitions or their need for the sse2.)

See https://github.com/rust-lang/rustup/issues/1196

Changing my CHOST from "i686-pc-linux-gnu" to "i586-pc-linux-gnu" did not help.

I think my only hope is to remove Rust as a dependency somehow, but that is definitely swimming against the tide.
_________________
Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46279
Location: 56N 3W

PostPosted: Mon Aug 31, 2020 1:46 pm    Post subject: Reply with quote

Vorlon,

What needs rust and when?
If rust is only a build time dependency, build the things that need it elsewhere.

If its a run time dependency, it will only be a problem if you actually try to execute an sse2 instruction.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
alamahant
Guru
Guru


Joined: 23 Mar 2019
Posts: 550

PostPosted: Mon Aug 31, 2020 1:46 pm    Post subject: Reply with quote

Maybe I am saying foolish things but have you tried to emerge rust-bin just for the fun of it and see what happens?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46279
Location: 56N 3W

PostPosted: Mon Aug 31, 2020 1:48 pm    Post subject: Reply with quote

alamahant,

I was hinting at that, and possibly disabling the ebuild check :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1783

PostPosted: Mon Aug 31, 2020 1:59 pm    Post subject: Reply with quote

Technically, Rust has "Tier 2" support for x86 without SSE:
Code:
i586-unknown-linux-gnu   ✓      32-bit Linux w/o SSE (kernel 4.4, glibc 2.23)

I think the problem is that Gentoo defaults to i686, even, even when your CHOST is i586:
rust-toolchain.eclass:
rust_abi() {
        local CTARGET=${1:-${CHOST}}
        case ${CTARGET%%*-} in
                ...
                i?86*)            echo i686-unknown-linux-gnu;;
                ...
  esac
}
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46279
Location: 56N 3W

PostPosted: Mon Aug 31, 2020 2:12 pm    Post subject: Reply with quote

From the rust ebuild

Code:
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
        miri? ( nightly )
        parallel-compiler? ( nightly )
        wasm? ( llvm_targets_WebAssembly )
        x86? ( cpu_flags_x86_sse2 )
"
That enables hand optimised sse2 code segments.
That is not the same as requiring sse2.

The way thats written is a bit naughty. It should respect your CPU_FLAGS_X86, not enable it because you are are on x86.

That does not mean that sse2 is optional, just that there are some optional parts that require it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Vorlon
Apprentice
Apprentice


Joined: 16 May 2003
Posts: 233
Location: West Grove, PA

PostPosted: Mon Aug 31, 2020 5:05 pm    Post subject: Reply with quote

I may have a work-around.

Firstly, a Pentium III _IS_ a 586 (I was wrong), so I gotta set CHOST to "i586-pc-linux-gnu".
Secondly, if I leave the "profile" to "Default/Linux/x86/17.0 (stable)" and NOT set it to "desktop", then Rust will not be pulled in.

I can still (apparently) emerge X11 and LXQT desktop without needing rust. I'm not sure about desktop applications, but I'll drive off that bridge when I come to it.

On my 1-lung P3, this will take several days to test, but I'm gonna give it a start. (Of course, first I gotta wipe the i686 installation I started and begin from zero again <sigh>)

Thanks to all for the advice and comments!
_________________
Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46279
Location: 56N 3W

PostPosted: Mon Aug 31, 2020 5:09 pm    Post subject: Reply with quote

Vorlon,

The PentimPro was the first i686 system, followed by the Pentium II.
The Pentium III in a real i686 CPU.

Do not fiddle with your CHOST. It will break your toolchain.

There is no need to wipe anything.

Try distcc or buiding for a P3 in a chroot on a more capable system, the install the binaries on the P3.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6714

PostPosted: Tue Sep 01, 2020 8:09 am    Post subject: Reply with quote

Technically Pentium 4 is "i786" because it's a distinct microarchitecture to the PIII line, but nobody uses that term nowadays.

Maybe it should be brought back though if it results in problems like this... claiming "i686" when it has the same minimum requirements as x86-64 minus long mode is just pure laziness.
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