Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wine installation "succeeds" but running wine segfaults #400

Closed
dimag0g opened this issue Feb 27, 2021 · 7 comments
Closed

Wine installation "succeeds" but running wine segfaults #400

dimag0g opened this issue Feb 27, 2021 · 7 comments

Comments

@dimag0g
Copy link

dimag0g commented Feb 27, 2021

Installing Wine on my system goes through (the installation log is here), but one can see a segfault near the end of the log. Subsequent calls to wine also result in a segfault:

pi@raspberrypi:~ $ winecfg
/usr/local/bin/wine: line 2: 15171 Segmentation fault      setarch linux32 -L /home/pi/wine/bin/wine "$@"
pi@raspberrypi:~ $ wine explorer
/usr/local/bin/wine: line 2: 15174 Segmentation fault      setarch linux32 -L /home/pi/wine/bin/wine "$@"

Details about the files implementing the wine command:

pi@raspberrypi:~ $ cat /usr/local/bin/wine
#!/bin/bash
setarch linux32 -L /home/pi/wine/bin/wine "$@"
pi@raspberrypi:~ $ shasum /home/pi/wine/bin/wine
6e65d7b1a96f09a765e36bb9c7c08abd3f140ca3  /home/pi/wine/bin/wine
pi@raspberrypi:~ $ shasum /usr/local/bin/box86 
65755489b723a3747c1d10a3eac3111e2d7e859d  /usr/local/bin/box86
@Itai-Nelken
Copy link
Contributor

maybe try to compile box86? a lot of people that had problems with wine solved them by reinstalling or recompiling box86.

@dimag0g
Copy link
Author

dimag0g commented Feb 27, 2021

@Itai-Nelken Box86 is working as far as I can tell, at least, I can run cpuid inside an old Debian i386 image:

pi@raspberrypi:/opt/exagear/images/debian-8/usr $ BOX86_LD_LIBRARY_PATH=lib/i386-linux-gnu/ box86 cpuid | head -n 10
Box86 with Dynarec v0.2.1 db176ad3 built on Feb 15 2021 00:05:11
CPU 0:
   vendor_id = "GenuineIntel"
   version information (1/eax):
      processor type  = primary processor (0)
      family          = Intel Pentium Pro/II/III/Celeron/Core/Core 2/Atom, AMD Athlon/Duron, Cyrix M2, VIA C3 (6)
      model           = 0x0 (0)
      stepping id     = 0x1 (1)
      extended family = 0x0 (0)
      extended model  = 0x0 (0)

I tried reinstalling both Wine and Box86, rebooting, and wiping the ~/.wine folder before installation, but the problem is still there.

@Itai-Nelken
Copy link
Contributor

did you try compiling box86? or you are sing the pi-apps install script (for box86)?

@dimag0g
Copy link
Author

dimag0g commented Feb 27, 2021

@Itai-Nelken I installed box86 from pi-apps.

@Itai-Nelken
Copy link
Contributor

Itai-Nelken commented Feb 27, 2021

@Itai-Nelken I installed box86 from pi-apps.

@dimag0g try compiling box86, instructions are here: https://github.com/ptitSeb/box86/blob/master/docs/COMPILE.md

@Botspot
Copy link
Owner

Botspot commented Feb 28, 2021

but the problem is still there.

This is very perplexing.

It works fine for me on a fresh 32-bit RPiOS install, but when it fails on other's systems, it can be very challenging to determine what's going wrong. (And especially hard when you throw in emulation and Wine together. So many places where something could be broken)

@dimag0g
Copy link
Author

dimag0g commented Mar 4, 2021

I finally found the problem. There were two emulators active on my system at the same time, and box86 wasn't the default choice:

pi@raspberrypi:/etc $ ls /proc/sys/fs/binfmt_misc/
jar                    python2.7  register  x86
llvm-7-runtime.binfmt  python3.7  status    x86_guest
pi@raspberrypi:/etc $ cat /proc/sys/fs/binfmt_misc/x86
enabled
interpreter /usr/local/bin/box86
flags:
offset 0
magic 7f454c4601010100000000000000000002000300
mask ffffffffffffff00fffffffffffffffffeffffff
pi@raspberrypi:/etc $ cat /proc/sys/fs/binfmt_misc/x86_guest
enabled
interpreter /opt/exagear/bin/ubt_wrapper_suid
flags: POC
offset 0
magic 7f454c4601010100000000000000000002000300
mask fffffffffffffffcfffffffffffffffffcffffff

Removing x86_guest with update-binfmts allowed wine to run OK.

I don't see a way to catch such issues automatically, short of checking binfmt entries one by one. So I suppose we can close this.

PS. As an off-topic: wine + box86 have amazing performance, faster than Exagear. Unfortunately, they seem to be not as stable, for instance, I can't get HoMM3 game running, whereas it runs fine under Exagear. Still, it's clearly a way to the future, since Exagear is commercial and essentially abandoned, so it will likely stop working in a couple of years.

@dimag0g dimag0g closed this as completed Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants