Open twaik opened 9 months ago
hangover-libqemu
and hangover-libfexcore
is able to be compiled but can't work. I'll mark this issue as help wanted...
What about wow64 and box64 modules? I suppose it will be possible to use box64+wow64 to run both win32 and win64 binaries, with no need to invoke box86 to run 32-bit apps (which is important for i.e. steam).
hangover-libqemu
andhangover-libfexcore
is able to be compiled but can't work. I'll mark this issue as help wanted...
What is a problem in these packages? Segfaults? Or maybe something else? I think we can ping hangover dev here. Maybe he will help us.
box64
works as expected, but qemu
and fex
doesn't. hangover-libqemu
will segfault, hangover-libfexcore
and hangover-libwow64fex
will not load dlls.
~ $ wine aarch64-test.exe
Hello World
~ $ wine i686-test.exe
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0048:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0048:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0048:err:systray:initialize_systray Could not create tray window
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
005c:err:dnsapi:DllMain No libresolv support, expect problems
0024:err:environ:init_peb starting L"Z:\\data\\data\\com.termux\\files\\home\\i686-test.exe" in experimental wow64 mode
starting Box64 based box64cpu.dll
Hello World
~ $ HODLL=xtajit.dll taskset -c 1 wine ./i686-test.exe
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0074:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0074:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0074:err:systray:initialize_systray Could not create tray window
0054:err:dnsapi:DllMain No libresolv support, expect problems
0024:err:environ:init_peb starting L"Z:\\data\\data\\com.termux\\files\\home\\i686-test.exe" in experimental wow64 mode
starting Qemu based xtajit.dll
0024:err:wow:attach tcg_ctx 0x0
0024:err:wow:load_64bit_module failed to load dll c0000142
Segmentation fault
~ $ HODLL=wowarmhw.dll taskset -c 1 wine ./arm-test.exe
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0074:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0074:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0074:err:systray:initialize_systray Could not create tray window
0054:err:dnsapi:DllMain No libresolv support, expect problems
0024:err:environ:init_peb starting L"Z:\\data\\data\\com.termux\\files\\home\\arm-test.exe" in experimental wow64 mode
starting Qemu based wowarmhw.dll
0024:err:wow:attach tcg_ctx 0x0
0024:err:wow:load_64bit_module failed to load dll c0000142
Segmentation fault
~ $ HODLL=fexcore.dll wine i686-test.exe
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0050:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0050:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0050:err:systray:initialize_systray Could not create tray window
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
005c:err:dnsapi:DllMain No libresolv support, expect problems
0024:err:environ:init_peb starting L"Z:\\data\\data\\com.termux\\files\\home\\i686-test.exe" in experimental wow64 mode
starting FEX based fexcore.dll
0024:err:wow:load_64bit_module failed to load dll c0000142
~ $ HODLL=libwow64fex.dll wine i686-test.exe
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0064:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0064:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0064:err:systray:initialize_systray Could not create tray window
0054:err:dnsapi:DllMain No libresolv support, expect problems
0024:err:environ:init_peb starting L"Z:\\data\\data\\com.termux\\files\\home\\i686-test.exe" in experimental wow64 mode
0024:err:wow:load_64bit_module failed to load dll c0000135
@AndreRH can you please help us?
c0000142 is a failed dll initialization c0000135 is file not found, so libwow64fex seems to not be in the prefix I'll have a closer look the next days
For libwow64fex you need a binary patch for the dll to be picked up by wineboot and land in the prefix: https://github.com/AndreRH/hangover/blob/7969c549161279edd3c57a558fc60540e0dafb49/.packaging/debian11/fexpe/Dockerfile#L9
After copying libwow64fex
to $HOME/.wine/drive_c/windows/system32
:
~ $ HODLL=libwow64fex.dll wine i686-test.exe
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0050:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0050:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0050:err:systray:initialize_systray Could not create tray window
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
005c:err:dnsapi:DllMain No libresolv support, expect problems
0024:err:environ:init_peb starting L"Z:\\data\\data\\com.termux\\files\\home\\i686-test.exe" in experimental wow64 mode
0024:err:virtual:virtual_setup_exception stack overflow 1296 bytes addr 0x6f19c3c4 stack 0x100100af0 (0x100100000-0x100101000-0x1001ffd20)
~ $
@AndreRH is there any chance you can help us to make a full port of hangover code to termux? Android devices are much more popular than other ARM devices.
@AndreRH is there any chance you can help us to make a full port of hangover code to termux? Android devices are much more popular than other ARM devices.
For now I'd suggest to fix X11 (wine-staging package has it enabled). Having the integrated Box64 would be enough for now, I don't see a point in having multiple emulators on Termux from the beginning where it is harder to switch between them. They can be fixed later.
I also tried to build it myself, but some intermediate step failed and the documentation isn't very precise. Here's what I tried: https://github.com/AndreRH/hangover/blob/tst/.packaging/termux/Dockerfile
@AndreRH
https://github.com/termux-user-repository/tur/blob/master/tur-multilib/hangover-wine/build.sh
In short how you build, clone repository, run ./setup-environment.sh to download necessary files and ./scripts/run-docker.sh ./build-package.sh -I hangover-wine
It will build a current version of hangover-wine
You just modyfil build.sh file (and create patch files if you want to patch something), it works without any other modifications
I think this workflow can be used as a reference. I think you can skip Gather build summary
, Generating build artifact
and upload
steps.
@AndreRH
https://github.com/termux-user-repository/tur/blob/master/tur-multilib/hangover-wine/build.sh
In short how you build, clone repository, run ./setup-environment.sh to download necessary files and ./scripts/run-docker.sh ./build-package.sh -I hangover-wine
It will build a current version of hangover-wine
You just modyfil build.sh file (and create patch files if you want to patch something), it works without any other modifications
That works, thanks
hangover-libqemu
andhangover-libfexcore
is able to be compiled but can't work. I'll mark this issue as help wanted...
qemu is slow and not very useful, libfexcore might be abandoned in favour of libwow64fex this year. So they aren't important.
Though in my testing libwow64fex worked perfectly in termux as expected. It just has issues with CLI applications, e.g. it doesn't print their output. So patch it as I suggested and package it, it'll work :)
Also you could bump hangover-wine to 9.0-rc4 as it landed a Termux fix: https://gitlab.winehq.org/wine/wine/-/commit/0900d919e2fd5ce12e02375cfcbfa5ab7c283515 So the comments at the end of build.sh are obsolete
Thank all for making this awesome package on Termux! I tried to install packages with winetricks
, but it seems not working for almost any installation commands. It prompts errors of regedit.exe
attempt to call libunwind
which is not available.
Taking winetricks wmp9
as an example, excerpt of log is shown below, with the full log available at winetricks_wmp9.log.
Using native,builtin override for following DLLs: jscript scrrun vbscript cscript.exe wscript.exe
Executing wine C:\windows\syswow64\regedit.exe C:\windows\Temp\override-dll.reg
0220:err:environ:init_peb starting L"C:\\windows\\syswow64\\regedit.exe" in experimental wow64 mode
0220:err:seh:unwind_builtin_dll libunwind not available, unable to unwind
0220:err:seh:unwind_builtin_dll libunwind not available, unable to unwind
0220:err:seh:unwind_builtin_dll libunwind not available, unable to unwind
<.... repeats so many times here ...>
0220:err:seh:unwind_builtin_dll libunwind not available, unable to unwind
0220:err:seh:unwind_builtin_dll libunwind not available, unable to unwind
0220:err:seh:unwind_builtin_dll libunwind not available, unable to unwind
0220:err:virtual:virtual_setup_exception stack overflow 2944 bytes addr 0x7fffda59b0 stack 0x100100480 (0x100100000-0x100101000-0x1001ffd20)
------------------------------------------------------
warning: Note: command wine C:\windows\syswow64
egedit.exe C:\windows\Temp\override-dll.reg returned status 1. Aborting.
------------------------------------------------------
I'm not sure if libunwind.so
is really the cause of issue, but I follow the clue and found https://github.com/termux/termux-packages/issues/4307 saying that libunwind.so
is not packaged in Termux repo as this lib is made available by Android NDK at /system/lib/libunwind.so
. However, as I checked on my phone (Android 14, Linux 5.19.94, aarch64), there is no /system/lib/libunwind.so
(there is only /system/lib/libunwindstack.so
). Besides, it seems to me that many Temux packages tend to statically link $PREFIX/lib/libunwind.a
instead.
Hope my information help and really grateful for a fix! Thanks a lot!
Thank all for making this awesome package on Termux! I tried to install packages with
winetricks
, but it seems not working for almost any installation commands. It prompts errors ofregedit.exe
attempt to calllibunwind
which is not available.
libunwind shouldn't be necessary anymore with hangover-wine 9.1 so updating the version should help here see also wine commit 57b8d4c01982e68f2ce538fec40ce69413f1400d
If someone wants to try 9.7: https://github.com/Trass3r/termux-user-repository/commit/91b34a1e625c4368226a3ac3ec6a67fb4970257a I just adapted the patches though, not sure if anything else should be changed. There are some notable changes about ARM64X: https://gitlab.winehq.org/wine/wine/-/releases/wine-9.7
Fex also works by extracting the dll from https://github.com/AndreRH/hangover/actions/runs/8767939622/artifacts/1432406871 into ~/.wine/drive_c/windows/system32
@licy183 do you think we can build hangover apk with wineandroid.drv backend instead of winepulse and winex11 using termux's build scripts and toolchain? It seems like I have an idea how to fix graphics but I am not sure I have enough energy to find out how to build apk.
@licy183 do you think we can build hangover apk with wineandroid.drv backend instead of winepulse and winex11 using termux's build scripts and toolchain? It seems like I have an idea how to fix graphics but I am not sure I have enough energy to find out how to build apk.
Theoretically, it is possible. May also need to set rpath
to $ORIGIN
after a successful compilation.
Can you please try to build it?
Can you please try to build it?
I'll try it this weekend if possible.
Name
Hangover
Source code URL
https://github.com/AndreRH/hangover
Packaging policy acknowledgement
Additional information
We have
wine-stable
package so it should be pretty easy to porthangover
too. It has support of builtin box64, qemu and fex (dlls) so it can run x86_64 and x86 binaries even in the case if there is no box86/box64 support in termux itself.