Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Does rust dependency stop Gentoo buildng on non-sse2 CPUs?
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
fredbear5150
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2003
Posts: 87

PostPosted: Thu Sep 17, 2020 7:45 pm    Post subject: Does rust dependency stop Gentoo buildng on non-sse2 CPUs? Reply with quote

I've been maintaining a Gentoo build on a really old IBM Thinkpad X30 with a Pentium III CPU with no sse2 CPU flag support:

Code:
┌─╼ root ╺─╸ yed [~]
└╼ cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family   : 6
model      : 11
model name   : Mobile Intel(R) Pentium(R) III CPU - M  1200MHz
stepping   : 4
microcode   : 0x2
cpu MHz      : 1200.000
cache size   : 512 KB
fdiv_bug   : no
f00f_bug   : no
coma_bug   : no
fpu      : yes
fpu_exception   : yes
cpuid level   : 2
wp      : yes
flags      : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pse36 mmx fxsr sse cpuid
bugs      : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips   : 2392.01
clflush size   : 32
cache_alignment   : 32
address sizes   : 36 bits physical, 32 bits virtual
power management:


rust and rust-bin both have an sse2 dependency:

Code:
┌─╼ root ╺─╸ yed [~]
└────╼ emerge -pvuDN world

These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! The ebuild selected to satisfy "~dev-lang/rust-bin-1.45.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,
abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_riscv_ilp32d(-)?,
abi_riscv_ilp32(-)?,abi_s390_32(-)?,abi_s390_64(-)?]" has unmet requirements.
- dev-lang/rust-bin-1.45.2::gentoo USE="-clippy -doc -rls -rustfmt" CPU_FLAGS_X86="-sse2"

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

(dependency required by "virtual/rust-1.45.2::gentoo" [ebuild])
(dependency required by "gnome-base/librsvg-2.48.8::gentoo" [ebuild])
(dependency required by "app-text/djvu-3.5.27-r2::gentoo" [ebuild])
(dependency required by "media-gfx/imagemagick-7.0.10.28::gentoo[djvu]" [ebuild])
(dependency required by "xfce-extra/xfce4-windowck-plugin-0.4.6-r3::gentoo" [ebuild])
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])

 * IMPORTANT: 17 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


librsvg has a dependency on rust, and lots of packages depend on librsvg:

Code:
┌─╼ root ╺─╸ yed [~]
└╼ equery d librsvg
 * These packages depend on librsvg:
app-cdr/gcdemu-3.2.3 (gnome-base/librsvg:2)
app-text/djvu-3.5.27-r1 (gnome-base/librsvg)
dev-ml/lablgtk-2.18.5 (svg ? >=gnome-base/librsvg-2.2:2)
media-gfx/gimp-2.10.14-r1 (>=gnome-base/librsvg-2.40.6:2)
media-gfx/imagemagick-7.0.9.8 (gnome-base/librsvg)
media-libs/gegl-0.3.34 (>=gnome-base/librsvg-2.40.6:2)
media-libs/gegl-0.4.18 (>=gnome-base/librsvg-2.40.6:2)
media-video/ffmpeg-4.2.1 (gnome-base/librsvg:2/2[abi_x86_32(-)])
x11-libs/gtk+-2.24.32-r1 (gnome-base/librsvg[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,
abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_riscv_ilp32d(-)?,
abi_riscv_ilp32(-)?,abi_s390_32(-)?,abi_s390_64(-)?])
x11-libs/gtk+-3.24.10 (gnome-base/librsvg[abi_x86_32(-)])
x11-misc/nitrogen-1.6.1 (>=gnome-base/librsvg-2.20:2)
x11-misc/rofi-1.5.2 (gnome-base/librsvg:2)
x11-themes/adwaita-icon-theme-3.32.0 (gnome-base/librsvg:2)
xfce-base/xfce4-meta-4.14-r2 (svg ? gnome-base/librsvg)
xfce-extra/xfce4-xkb-plugin-0.8.1 (gnome-base/librsvg)


So is this essentially the end of being able to build a useful Gentoo installation on non-sse2 CPUs?

Just curious if anyone else is still using Gentoo on old machines like this and how they work with this kind of limitation.

[Moderator edit: broke long whitespace-free lines in code tags to fix thread layout. -Hu]
Back to top
View user's profile Send private message
Ionen
Veteran
Veteran


Joined: 06 Dec 2018
Posts: 1251

PostPosted: Thu Sep 17, 2020 7:51 pm    Post subject: Reply with quote

There's the recently opened bug #741708 that's looking into this. I was originally under the impression could just make a binpkg for librsvg with right RUSTFLAGS but it may be more complicated as things are right now (I already do this for my weaker machine but it's more modern, my last non-sse2 box is dead).

Edit: meanwhile can still stick to old non-rust =librsvg-2.40.21 that's being kept for any archs where rust is a problem, but it apparently has compatibility issues though :(


Last edited by Ionen on Tue Sep 22, 2020 4:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
fredbear5150
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2003
Posts: 87

PostPosted: Thu Sep 17, 2020 8:54 pm    Post subject: Reply with quote

Thanks, that's all useful to know. I think I will start by sticking to the older librsvg.
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 906

PostPosted: Fri Sep 18, 2020 7:33 am    Post subject: Reply with quote

It may be worth worth following http://archlinux32.org/. AFAIR they have versions that don't need SSE2, so their PKGBUILDs should show some solutions. (I used it for a while on an old netbook and an even older Pentium IV box, but I finally gave up as they were just too slow; but Arch 32 kept them going OK.)[/url]
_________________
Greybeard
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15972

PostPosted: Fri Sep 18, 2020 4:28 pm    Post subject: Reply with quote

The ebuild for Rust enforces that flag due to a known bug in the upstream-supplied Rust compiler. Upstream supplies an "i686" compiler that doesn't actually work on i686 CPUs that lack SSE2. This is reported, among other places, in SSE2 instructions in i686 binaries. There is also at least one other Github issue about this that, while somewhat more detailed, became very confrontational.

Since you need to use upstream's prebuilt compiler to compile Rust for your system, you can only compile Rust if you have SSE2 support. Supposedly, if you build your own Rust compiler, you can build it without use of SSE2, at which point it should work on older hardware. I am not aware of any publicly available upstream or Gentoo downloads of rustc that were built without use of SSE2, so you would need to install Rust on a more recent CPU, then build your own compiler. Additionally, since Gentoo's ebuilds all enforce this flag combination, you would need to fork the ebuild to track your custom no-SSE2 rustc.
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 651
Location: San Diego, CA

PostPosted: Tue Sep 22, 2020 4:13 am    Post subject: Reply with quote

Sticking to the older version (i.e. "librsvg-2.40.21") at least let me update the rest of the system, but I doubt it's a long-term solution. I'm sure I'd be dejected if I have to give up my old, yet functional, machine. I don't mind getting rid of X, so would that be an option?
__
sol
Back to top
View user's profile Send private message
Ionen
Veteran
Veteran


Joined: 06 Dec 2018
Posts: 1251

PostPosted: Tue Sep 22, 2020 11:39 am    Post subject: Reply with quote

solamour wrote:
Sticking to the older version (i.e. "librsvg-2.40.21") at least let me update the rest of the system, but I doubt it's a long-term solution. I'm sure I'd be dejected if I have to give up my old, yet functional, machine. I don't mind getting rid of X, so would that be an option?
Well, you can keep X if you want. librsvg is mostly needed by GTK stuff, if you went back to what was more used on those older machines (old toolkits, xterm, twm, etc... should be some decent modern options too but I haven't looked much) then you wouldn't need librsvg. Also I "think" majority of QT won't pull librsvg, not that I know how well modern QT would work out on a old non-sse2 machine.

Although as rust usage is getting more popular, librsvg may not be the only problem forever. If luck has it maintainers may find some solution to deal with those on non-sse2 before old librsvg is removed (currently it is intentionally being kept because of arches where rust is unusable or hard to use in gentoo, so probably not getting removed soon, there's always the possibly that someone will fork + pickup development of the old non-rust branch too).
Back to top
View user's profile Send private message
sdauth
Apprentice
Apprentice


Joined: 19 Sep 2018
Posts: 194
Location: Ásgarðr

PostPosted: Tue Sep 22, 2020 12:05 pm    Post subject: Reply with quote

Ionen wrote:
(...) there's always the possibly that someone will fork + pickup development of the old non-rust branch too).


Maybe this https://github.com/oaken-source/librsvg-og
Back to top
View user's profile Send private message
Ionen
Veteran
Veteran


Joined: 06 Dec 2018
Posts: 1251

PostPosted: Tue Sep 22, 2020 12:14 pm    Post subject: Reply with quote

sdauth wrote:
Maybe this https://github.com/oaken-source/librsvg-og
Doesn't seem to have received much work yet but is getting known security fixes at least (which were already fixed in 2.40.21 despite upstream claiming 2.40.20 would be the "last release" of the branch). If it keeps up compatibility with rust librsvg it could be interesting (gentoo "could" eventually create a virtual/librsvg to allow both, but maybe too early to consider it).
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