jart / blink

tiniest x86-64-linux emulator
ISC License
6.89k stars 217 forks source link

Can't run wine? #134

Closed spiral009 closed 1 year ago

spiral009 commented 1 year ago
root@localhost:~# wine mom/Setup.exe
it looks like wine32 is missing, you should install it.
multiarch needs to be enabled first.  as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32:i386"
epoll_ctl: Invalid argument

^C
root@localhost:~# ./GE-Proton8-3/files/bin/wine64  mom/Setup.exe
wineserver: using server-side synchronization.
epoll_ctl: Invalid argument
wineserver: file_set_error() can't map error: Function not implemented
E2023-05-17T17:24:19.631071:blink/blink.c:158:4752 terminating due to SIGSEGV (rip=0x423a0a code=1 faultaddr=0)
E2023-05-17T17:24:19.654254:blink/blink.c:142:4752 additional information
         PC 423a0a mov (%rdi),%eax 8b 07 85 c0 0f 84 82 00
         AX 0000000000000000  CX 0000000000000000  DX 0000000000000003  BX 0000454000039920
         SP 00004ffffffff3c0  BP 00004ffffffff3d0  SI 00000000ffffffff  DI 0000000000000000
         R8 00004540000375b7  R9 000022ccd719e580 R10 0000000000000000 R11 0000000000000000
        R12 0000454000039800 R13 00004540000396e0 R14 0000454000039520 R15 0000454000038430
         FS 000022ccd7217740  GS 0000000000000000 OPS 142284           FLG ..Z...
        /root/GE-Proton8-3/files/bin/wineserver
        4ffffffff3d0 000000423a0a release_object+0xa 16 bytes
        4ffffffff440 000000410bf4 init_directories+0x3a4 112 bytes
        4ffffffff4a0 000000403b02 main+0x1c2 96 bytes
        000000000001 22ccd7035a90 UNKNOWN [STRAY] [MISALIGN] [CORRUPT FRAME POINTER]
000000400000-000000402fff   12k r   /root/GE-Proton8-3/files/bin/wineserver
000000403000-000000463fff  388k rx  /root/GE-Proton8-3/files/bin/wineserver
000000464000-00000048cfff  164k r   /root/GE-Proton8-3/files/bin/wineserver
00000048d000-00000048efff  8192 rw  /root/GE-Proton8-3/files/bin/wineserver
22ccd7006000-22ccd7006fff  4096 r   /lib/x86_64-linux-gnu/librt.so.1
22ccd7007000-22ccd7007fff  4096 rx  /lib/x86_64-linux-gnu/librt.so.1
22ccd7008000-22ccd7009fff  8192 r   /lib/x86_64-linux-gnu/librt.so.1
22ccd700a000-22ccd700afff  4096 rw  /lib/x86_64-linux-gnu/librt.so.1
22ccd700b000-22ccd700cfff  8192 rw
22ccd700d000-22ccd700dfff  4096 r   /lib/x86_64-linux-gnu/libdl.so.2
22ccd700e000-22ccd700efff  4096 rx  /lib/x86_64-linux-gnu/libdl.so.2
22ccd700f000-22ccd7010fff  8192 r   /lib/x86_64-linux-gnu/libdl.so.2
22ccd7011000-22ccd7011fff  4096 rw  /lib/x86_64-linux-gnu/libdl.so.2
22ccd7012000-22ccd7033fff  136k r   /lib/x86_64-linux-gnu/libc.so.6
22ccd7034000-22ccd71abfff 1504k rx  /lib/x86_64-linux-gnu/libc.so.6
22ccd71ac000-22ccd7207fff  368k r   /lib/x86_64-linux-gnu/libc.so.6
22ccd7208000-22ccd7209fff  8192 rw  /lib/x86_64-linux-gnu/libc.so.6
22ccd720a000-22ccd7219fff   64k rw
454000000000-454000000fff  4096 r   /lib64/ld-linux-x86-64.so.2
454000001000-454000028fff  160k rx  /lib64/ld-linux-x86-64.so.2
454000029000-454000034fff   48k r   /lib64/ld-linux-x86-64.so.2
454000035000-454000057fff  140k rw  /lib64/ld-linux-x86-64.so.2
4fffff800000-4fffffffffff 8192k rw  [stack]
blink backtrace
        b1e2dcb8997c TerminateSignal+320
        b1e2dcbc25ec DeliverSignalToUser+184
        b1e2dcb9aad8 HandleFatalSystemSignal+84
        b1e2dcb9ab78 Blink+148
        b1e2dcb8973c Exec+452
        b1e2dcbb41f8 SysExecve+692
        b1e2dcbbe230 OpSyscall+17048
        b1e2dcb9a894 ExecuteInstruction+644
        b1e2dcb9aa60 Actor+84
        b1e2dcb9ab24 Blink+64
        b1e2dcb8973c Exec+452
        b1e2dcbb41f8 SysExecve+692
        b1e2dcbbe230 OpSyscall+17048
        b1e2dcb9a894 ExecuteInstruction+644
        b1e2dcb9aa60 Actor+84
        b1e2dcb9ab24 Blink+64
        b1e2dcb8973c Exec+452
        b1e2dcbb41f8 SysExecve+692
        b1e2dcbbe230 OpSyscall+17048
        b1e2dcb9a894 ExecuteInstruction+644
        b1e2dcb9aa60 Actor+84
        b1e2dcb9ab24 Blink+64
        b1e2dcb8973c Exec+452
        b1e2dcb89058 main+688
        f7f3791b7780 __libc_init_first+128
        f7f3791b7858 __libc_start_main+152
        b1e2dcb89330 _start+48
wine client error:0: recvmsg: Connection reset by peer
root@localhost:~#
aidanhs commented 1 year ago

I tried running wine under blink and decided it was going to be an uphill battle. I fixed one issue (https://github.com/jart/blink/pull/118) and then came across the issue you're seeing as well as a few others (e.g. https://github.com/jart/blink/issues/73#issuecomment-1525468726). I have some local hacked-in patches for some of them, but it's still a long way from working.

The thing is, this is really early into the wine boot process. It fails when starting wineserver, which is an internal component of wine. It hasn't even started executing your Windows program or trying to draw it to screen (mom/Setup.exe sounds like a graphical program).

My recommendation from here depends on what you're trying to do. You could:

  1. try the qemu userspace emulator
  2. try a full system emulator (qemu, vmware)
  3. try patching blink to make it work

If you go for option 3 I can share my hacks. I'd also recommend starting with trying to get console output from a program, e.g. xcopy /?, before diving into graphical programs.

jart commented 1 year ago

The release notes say that blink is great for running simple command line programs, because the goal is to be a simple emulator. For example, you can run coreutils, gcc, git, python, ruby, lua, etc. Wine is an entire platform for simulating Windows, and doing things like running World of Warcraft on Linux. Emulating platforms is difficult, because Blink is a platform, and platforms usually need to control the memory and system resources, and they both can't control it at once and have things go fast. Therefore using Blink to virtualize WINE isn't a good expectation to have at this stage of the project. Perhaps it'll happen in the future.