patched wine32 for i486 won't start

Questions about Wine on Linux
Locked
pc2005
Newbie
Newbie
Posts: 1
Joined: Sun Nov 12, 2023 8:50 am

patched wine32 for i486 won't start

Post by pc2005 »

I was playing with really old hardware and I was wondering if it would be possible to compile wine for that.

Sadly it is not possible to use vanilla wine on 486 as MinGW seems to not implement __sync_val_compare_and_swap_8 (and similar atomic 64bit functions). However when I've changed them to stdatomic functions instead (__atomic_compare_exchange_n()) the project compiled even for march=i486. I've had to disable save_fpux() call, which tries to use P6 (?) level instruction (fxsave).

The problem is the resulting instalation doesn't work well. It installs libraries to local wineprefix but it fails to start winecfg. When I tried to chroot the distribution and run it on building machine (ryzen) it worked. Running on 486 fails with:

Code: Select all

# export DISPLAY=:0 
# export WINEARCH='win32'
# winecfg
008c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:err:sync:RtlpWaitForCriticalSection section 7BC72440 "dlls/ntdll/loader.c: loader_section" wait timed out in thread 0084, blocked by 008c, retrying (60 sec)
003c:err:service:process_send_command receiving command result timed out
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"winebus" failed to start: 1053
003c:err:service:process_send_command service protocol error - failed to write pipe!
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"PlugPlay" failed to start: 1053
008c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
008c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
008c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
005c:err:ole:start_rpcss Failed to start RpcSs service
010c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
010c:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
It seems the problem is with starting the graphics context (opening the window)?
Does somebody know where to start digging for bugs?

The config.log header is:

Code: Select all

  $ ./configure --host=i486-buildroot-linux-gnu --enable-archs=i386 --disable-tests --enable-tools --enable-win16 --disable-win64 --without-wine64 --without-alsa --without-capi --without-coreaudio --without-cups --without-dbus --
without-gphoto --without-krb5 --without-gstreamer --with-mingw --without-netapi --without-opencl --without-oss --without-pcap --without-pulse --without-sane --without-usb --without-v4l2 --without-vulkan --with-x
I've also had to disable check for __sync_* in configure.ac and I've had to add

Code: Select all

-latomic -lpthread -lkernel32 -lcrtdll
for the __atomic_* call to the linker flags.

P.S. I cannot upload complete config.log (it has 700kB, which is above limit, also above limit of pastebin).
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: patched wine32 for i486 won't start

Post by spoon0042 »

at a guess it may be a graphics problem or those earlier messages may indicate other problems, you are able to run native linux programs with this graphics setup i assume?

either way you can get more verbose debug output by setting WINEDEBUG for example:

# WINEDEBUG=warn+all winecfg

to start with and see if anything more useful comes up, there are other options to try but it's hard to guess without much to go on
Locked