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

Request to wrap wine-i386 sxs.so #567

Closed
WheezyE opened this issue Feb 5, 2022 · 13 comments
Closed

Request to wrap wine-i386 sxs.so #567

WheezyE opened this issue Feb 5, 2022 · 13 comments

Comments

@WheezyE
Copy link
Contributor

WheezyE commented Feb 5, 2022

Hello. I'm trying to get someone's hardware power relay (DRA-70's "PTT" switch) working in box86 with a program called soundmodem and I believe we might be running into a roadblock with hid.so not being wrapped yet. WheezyE/Winelink#10

mkdir soundmodem && cd soundmodem
wget http://uz7.ho.ua/modem_beta/ptt-dll.zip 
wget http://uz7.ho.ua/modem_beta/soundmodem114.zip #EDIT: Updated link
7z x soundmodem114.zip
7z x ptt-dll.zip
BOX86_NOBANNER=1 winetricks -q vb6run # wine-mono / dotnet are not required
wine soundmodem.exe

I suspect that PTT.DLL might be the component that calls hid.dll. If that's the case, we might also be able to fix VARA HF/FM (Winlink) compatability with the DRA-70 with hid.so wrapping.

Here's a box86_log1 of soundmodem with PTT.DLL
  • Note: I took out all of wine's X11 warnings to make the log easier to read
  • Box86 with Dynarec v0.2.5 ed8e01e built on Dec 10 2021 23:45:16 (this version works best with VARA HF/FM for TCP - I'll post another issue later when I find which commit breaks VARA's TCP)
  • Wine-devel-7.1
pi@raspberrypi:~/soundmodem $ BOX86_LOG=1 wine soundmodem.exe 2>&1 | tee log1.txt

Debug level is 1
Dynarec for ARM, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA PageSize:4096
Box86 with Dynarec v0.2.5 ed8e01ea built on Dec 10 2021 23:45:16
BOX86: Wine detected, WINEPRELOADRESERVE=""
Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/
Using default BOX86_PATH: ./:bin/
Counted 46 Env var
Looking for /home/pi/wine/bin/wine
argv[1]="soundmodem.exe"
Using native(wrapped) libpthread.so.0
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) librt.so.1
Using emulated /home/pi/wine/bin/../lib/wine/i386-unix/ntdll.so
Debug level is 1
Dynarec for ARM, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA PageSize:4096
Box86 with Dynarec v0.2.5 ed8e01ea built on Dec 10 2021 23:45:16
BOX86: Wine detected, WINEPRELOADRESERVE=""
Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/
Using default BOX86_PATH: ./:bin/
Counted 47 Env var
Looking for /home/pi/wine/bin/wine
argv[1]="soundmodem.exe"
Using native(wrapped) libpthread.so.0
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) librt.so.1
Using emulated /home/pi/wine/bin/../lib/wine/i386-unix/ntdll.so
Debug level is 1
Dynarec for ARM, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA PageSize:4096
Box86 with Dynarec v0.2.5 ed8e01ea built on Dec 10 2021 23:45:16
Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/
Using default BOX86_PATH: ./:bin/
Counted 47 Env var
Looking for /home/pi/wine/bin/wineserver
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using emulated /home/pi/wine/lib/wine/i386-unix/libwine.so.1

Error loading needed lib /home/pi/wine/lib/wine/i386-unix/kernel32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/kernel32.so"/0x63840b47, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/kernelbase.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/kernelbase.so"/0x63848657, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/user32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/user32.so"/0x63851347, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/advapi32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/advapi32.so"/0x638522ff, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/msvcrt.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/msvcrt.so"/0x63852aef, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/sechost.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/sechost.so"/0x638525a7, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/ucrtbase.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/ucrtbase.so"/0x63850f8f, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/gdi32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/gdi32.so"/0x6385368f, 2)
Using emulated /home/pi/wine/lib/wine/i386-unix/win32u.so
Using native(wrapped) libm.so.6
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/setupapi.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/setupapi.so"/0x63861b47, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/rpcrt4.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/rpcrt4.so"/0x63853407, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/version.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/version.so"/0x6386261f, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/oleaut32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/oleaut32.so"/0x638626ff, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/ole32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/ole32.so"/0x63861cbf, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/combase.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/combase.so"/0x63864327, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/comctl32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/comctl32.so"/0x63864347, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/imm32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/imm32.so"/0x63864257, 2)
Using emulated /home/pi/wine/lib/wine/i386-unix/winspool.so
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/shell32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/shell32.so"/0x6386976f, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/shlwapi.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/shlwapi.so"/0x6386bf37, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/shcore.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/shcore.so"/0x6386976f, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/comdlg32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/comdlg32.so"/0x638698ef, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/winmm.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/winmm.so"/0x63866687, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/msacm32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/msacm32.so"/0x63866b6f, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/wsock32.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/wsock32.so"/0x63866b8f, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/iphlpapi.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/iphlpapi.so"/0x63866c1f, 2)
Using emulated /home/pi/wine/lib/wine/i386-unix/dnsapi.so
Using native(wrapped) libresolv.so.2
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/nsi.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/nsi.so"/0x638654df, 2)
Using emulated /home/pi/wine/lib/wine/i386-unix/ws2_32.so
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/oledlg.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/oledlg.so"/0x63877ab7, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/tzres.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/tzres.so"/0x63899437, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/tzres.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/tzres.so"/0x6389de07, 2)

Using native(wrapped) libfreetype.so.6
Using native(wrapped) libfontconfig.so.1
Using emulated /home/pi/wine/lib/wine/i386-unix/winex11.drv.so
Using native(wrapped) libXext.so.6
Using native(wrapped) libX11.so.6
Using native(wrapped) libxcb.so.1
Using native(wrapped) libXau.so.6
Using native(wrapped) libXdmcp.so.6
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/winex11.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/winex11.so"/0x63973d2f, 2)
Using native(wrapped) libXinerama.so.1
Using native(wrapped) libXxf86vm.so.1
Using native(wrapped) libXrender.so.1
Using native(wrapped) libXrandr.so.2
Using native(wrapped) libXcomposite.so.1
Using native(wrapped) libXi.so.6
Using native(wrapped) libXcursor.so.1

Error loading needed lib /home/pi/wine/lib/wine/i386-unix/uxtheme.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/uxtheme.so"/0x63a31eff, 2)

Using native(wrapped) libcups.so.2

Error loading needed lib /home/pi/wine/lib/wine/i386-unix/riched20.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/riched20.so"/0x63b953af, 2)
Error loading needed lib /home/pi/wine/lib/wine/i386-unix/usp10.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/usp10.so"/0x63b9a7bf, 2)

Error loading needed lib /home/pi/wine/lib/wine/i386-unix/uxtheme.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/uxtheme.so"/0x476f144f, 2)

0048:fixme:imm:ImeSetActiveContext (0x6c6f40, 0): stub
0048:fixme:imm:ImmReleaseContext (00010020, 006C6F40): stub


0024:fixme:richedit:editor_handle_message EM_SETLANGOPTIONS: stub
0024:fixme:richedit:IRichEditOle_fnSetHostNames stub 002689F0 soundmodem soundmodem

0024:fixme:imm:ImeSetActiveContext (0x26a550, 1): stub
0024:fixme:imm:ImmReleaseContext (00010072, 0026A550): stub

Error loading needed lib /home/pi/wine/lib/wine/i386-unix/sxs.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/sxs.so"/0x485a635f, 2)

Error loading needed lib /home/pi/wine/lib/wine/i386-unix/hid.so
Warning: Cannot dlopen("/home/pi/wine/lib/wine/i386-unix/hid.so"/0x63bb7a2f, 2)

I wish I could test this more with winecfg Library overrides, but I unfortunately don't own a DRA-70 myself. I'll also ask mhnadler to jump in on this thread in case we need more logging.

@WheezyE
Copy link
Contributor Author

WheezyE commented Feb 5, 2022

Omg 🤦‍♂️ hid is available from winetricks. Please disregard this.

@WheezyE WheezyE closed this as completed Feb 5, 2022
@WheezyE WheezyE reopened this Feb 9, 2022
@WheezyE WheezyE changed the title Request to wrap wine-i386 hid.so Request to wrap wine-i386 sxs.so Feb 9, 2022
@WheezyE
Copy link
Contributor Author

WheezyE commented Feb 9, 2022

I've been experimenting with MS Process Explorer on Windows with soundmodem.exe and noticed that sxs.dll is one of the processes that is run when PTT.DLL is present for this program. I think this one might be needed too.

On Pi4, when I install hid.dll with BOX86_NOBANNER=1 winetricks hid, the BOX86_LOG=1 is the same as above (just without hid.so). I also tried installing vcrun2012 with winetricks but that didn't get rid of sxs.so in the log. I also reinstalled and tried vcrun2019 with winetricks, but no luck

@ptitSeb
Copy link
Owner

ptitSeb commented Oct 12, 2022

Is this fixed with latest box86?

@WheezyE
Copy link
Contributor Author

WheezyE commented Oct 12, 2022

I'm not entirely sure if this is fixed yet (since I don't personally have the "DRA board" hardware to test with), but I'll check in with some people to see if it's working for them yet.

I'm currently working on soldering together a mockup hardware thing to pretend to be a DRA board to do more testing, so I might make a new issue in the future if I get a better testing environment.

This at least is very cool: No more `Error loading needed lib` errors
#Box86 with Dynarec v0.2.7 14113faa built on Oct 10 2022 20:20:17
#wine-devel 7.1 (and wine64-devel 7.1 with box64), RPiOS 64-bit bullseye/aarch64.
#
#Installed these dependencies for wine-i386:
#sudo apt-get install -y libasound2:armhf libc6:armhf libglib2.0-0:armhf libgphoto2-6:armhf libgphoto2-port12:armhf \
#        libgstreamer-plugins-base1.0-0:armhf libgstreamer1.0-0:armhf libldap-2.4-2:armhf libopenal1:armhf libpcap0.8:armhf \
#        libpulse0:armhf libsane1:armhf libudev1:armhf libusb-1.0-0:armhf libvkd3d1:armhf libx11-6:armhf libxext6:armhf \
#        libasound2-plugins:armhf ocl-icd-libopencl1:armhf libncurses6:armhf libncurses5:armhf libcap2-bin:armhf libcups2:armhf \
#        libdbus-1-3:armhf libfontconfig1:armhf libfreetype6:armhf libglu1-mesa:armhf libglu1:armhf libgnutls30:armhf \
#        libgssapi-krb5-2:armhf libkrb5-3:armhf libodbc1:armhf libosmesa6:armhf libsdl2-2.0-0:armhf libv4l-0:armhf \
#        libxcomposite1:armhf libxcursor1:armhf libxfixes3:armhf libxi6:armhf libxinerama1:armhf libxrandr2:armhf \
#        libxrender1:armhf libxxf86vm1 libc6:armhf libcap2-bin:armhf # to run wine-i386 through box86:armhf on aarch64
#
# This log also edited to remove wine x11 warnings

pi@raspberrypi4:~/Downloads/soundmodem $ BOX86_LOG=1 wine soundmodem.exe 2>&1 | tee log1.txt
Dynarec for ARMv8, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA PageSize:4096
BOX86: Wine detected, WINEPRELOADRESERVE=""
Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/:i686/
Using default BOX86_PATH: ./:bin/
Counted 45 Env var
Looking for /usr/local/bin/wine
argv[1]="soundmodem.exe"
Rename process to "wine"
Using native(wrapped) libdl.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) librt.so.1
Using emulated /home/pi/wine/bin/../lib/wine/i386-unix/ntdll.so
Dynarec for ARMv8, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA PageSize:4096
BOX86: Wine detected, WINEPRELOADRESERVE=""
Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/:i686/
Using default BOX86_PATH: ./:bin/
Counted 46 Env var
Looking for /home/pi/wine/bin/wine
argv[1]="soundmodem.exe"
Rename process to "wine"
Using native(wrapped) libdl.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) librt.so.1
Using emulated /home/pi/wine/bin/../lib/wine/i386-unix/ntdll.so
Using emulated /home/pi/wine/lib/wine/i386-unix/libwine.so.1
Using emulated /home/pi/wine/lib/wine/i386-unix/win32u.so
Using native(wrapped) libm.so.6
Using emulated /home/pi/wine/lib/wine/i386-unix/winspool.so
Using emulated /home/pi/wine/lib/wine/i386-unix/dnsapi.so
Using native(wrapped) libresolv.so.2
Using emulated /home/pi/wine/lib/wine/i386-unix/ws2_32.so
Using native(wrapped) libfreetype.so.6
Using native(wrapped) libfontconfig.so.1

Using emulated /home/pi/wine/lib/wine/i386-unix/winex11.drv.so
Using native(wrapped) libXext.so.6
Using native(wrapped) libX11.so.6
Using native(wrapped) libxcb.so.1
Using native(wrapped) libXau.so.6
Using native(wrapped) libXdmcp.so.6
Using native(wrapped) libXinerama.so.1
Using native(wrapped) libXxf86vm.so.1
Using native(wrapped) libXrender.so.1
Using native(wrapped) libXrandr.so.2
Using native(wrapped) libXcomposite.so.1
Using native(wrapped) libXi.so.6
Using native(wrapped) libXcursor.so.1

Using native(wrapped) libcups.so.2

0170:fixme:imm:ImeSetActiveContext (0x312b70, 0): stub
0170:fixme:imm:ImmReleaseContext (00000000000200AC, 0000000000312B70): stub

0160:fixme:richedit:editor_handle_message EM_SETLANGOPTIONS: stub
0160:fixme:richedit:IRichEditOle_fnSetHostNames stub 0BAE9348 soundmodem soundmodem

0160:fixme:imm:ImeSetActiveContext (0xbaeaea8, 1): stub
0160:fixme:imm:ImmReleaseContext (000200BA, 0BAEAEA8): stub
Using emulated /home/pi/wine/lib/wine/i386-unix/winepulse.so
Using native(wrapped) libpulse.so.0
Using emulated /home/pi/wine/lib/wine/i386-unix/winealsa.drv.so
Using native(wrapped) libasound.so.2

I'll close this for now since the hid.so & sxs.so library errors are no longer showing.

@WheezyE WheezyE closed this as completed Oct 12, 2022
@SpudGunMan
Copy link

just tested with latest scripts and DRA did not function with vara

@ptitSeb
Copy link
Owner

ptitSeb commented Jan 3, 2023

can it be a box86rc issue?

@SpudGunMan
Copy link

Possibly I haven't dug deep, I assumed it was hid i/o related at the moment

@WheezyE
Copy link
Contributor Author

WheezyE commented Jan 4, 2023 via email

@WheezyE
Copy link
Contributor Author

WheezyE commented Jan 4, 2023 via email

@SpudGunMan
Copy link

Yea I will try and get a test on x86 platform.

Compiled newest box86 just now same problem issue with no device to DLL

@SpudGunMan
Copy link

Same issues on x86 vm, no RA board. No matching HID found I assume

@WheezyE
Copy link
Contributor Author

WheezyE commented Jan 4, 2023 via email

@SpudGunMan
Copy link

after some more tinkering with https://wiki.winehq.org/Hid
I dont see my device show up at all take a look here

pi@pi-Parallels-Virtual-Platform:~/dra-ptt$ ./cm108 -p
    VID  PID   Product                          Sound                  ADEVICE         HID [ptt]        
    ---  ---   -------                          -----                  -------         ---------        
**  0d8c 013a  USB PnP Sound Device             /dev/snd/pcmC1D0c      plughw:1,0      /dev/hidraw2     
**  0d8c 013a  USB PnP Sound Device             /dev/snd/pcmC1D0p      plughw:1,0      /dev/hidraw2     
**  0d8c 013a  USB PnP Sound Device             /dev/snd/controlC1                     /dev/hidraw2     
    203a fffc  Virtual Mouse                                                           /dev/hidraw1     
pi@pi-Parallels-Virtual-Platform:~/dra-ptt$ env WINEDEBUG=+hid wine /home/pi/.wine/drive_c/VARA\ FM/VARAFM.exe
001b:trace:hid:DriverEntry (004C1CE0, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\winehid")
001b:trace:hid:PNP_AddDevice Adding device to PDO 004C1700, id L"WINEMOUSE\\vid_0000&pid_0000"\L"0&WINEMOUSE&0&0".
001b:trace:hid:HID_CreateDevice Create base hid device L"\\Device\\HID#004C1CE0&004C1700"
001b:trace:hid:PNP_AddDevice Created device 004C2278
001b:trace:hid:add_device (004C1CE0, 004C2278)
001b:trace:hid:ParseDescriptor Descriptor[12]: 5 1 9 2 a1 1 9 1 a1 0 c0 c0 
001b:trace:hid:HidD_GetHidGuid (0075E4D0)
0009:trace:hid:HidD_GetHidGuid (0032F894)
0009:trace:hid:HidD_GetAttributes (000000D0 0032F874)
001c:trace:hid:HID_Device_create Open handle on device 004C2278
001c:trace:hid:HID_Device_ioctl device 004C2278 ioctl(b01a8)
001c:trace:hid:HID_Device_close Close handle on device 004C2278
001c:trace:hid:HID_DeleteDevice Delete device(004C2278) L"\\Device\\HID#004C1CE0&004C1700"
001c:trace:hid:UnloadDriver Driver Unload
001c:trace:hid:UnloadDriver 0 devices to unload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants