termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.97k stars 2.98k forks source link

[Bug]: Wine desktop autoclose and there are some high-priority libraries are missing #21210

Open DuilioPerez opened 3 weeks ago

DuilioPerez commented 3 weeks ago

Problem description

When a wine launch in desktop mode, for some reason, it automatically closes after some minutes. Also, when compiling with mingw-w64 for aarch64, it can't run C++ code, only C, unless you manually link statically libstdc++ and libgcc, and even in that way, there are problems rendering unicode characters in those programs. Also, if is run just in termux (without GUI), it makes the terminal useless. This is the log of termux for wine desktop:

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
0054:err:dnsapi:DllMain No libresolv support, expect problems
010c:err:system:NtUserChangeDisplaySettings Changing (null) display settings returned -2.
010c:err:explorer:initialize_display_settings Failed to set primary display settings.
0124:fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
0124:fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
0124:fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
010c:fixme:shell:ISF_ControlPanel_fnGetDisplayNameOf retrieve display name from control panel app
010c:fixme:shell:ISF_ControlPanel_fnGetDisplayNameOf retrieve display name from control panel app
010c:fixme:shell:ISF_ControlPanel_fnGetDisplayNameOf retrieve display name from control panel app
0124:fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
0124:fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
0124:fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
0124:fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
10142 exited, status=0
X connection to :1 broken (explicit kill or server shutdown).
X connection to :1 broken (explicit kill or server shutdown).

What steps will reproduce the bug?

Try to run the next command to enter in wine desktop mode: termux-x11 :1 -xstartup "dbus-launch --exit-with-session wine explorer /desktop=shell,1024x780" And try to run a simple hello world wrote in C, you'll see it works, then try to run a hello world wrote in C++, it won't work if you don't link libraries mentioned earlier statically.

What is the expected behavior?

Wine desktop don't close and wine can run C++ code without static link.

System information

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=5341
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main/ stable main
# glibc-repo (sources.list.d/glibc.list)
deb https://packages-cf.termux.dev/apt/termux-glibc/ glibc stable
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11/ x11 main
Updatable packages:
gst-libav/stable 1.24.7 aarch64 [upgradable from: 1.24.6]
gst-plugins-bad/stable 1.24.7 aarch64 [upgradable from: 1.24.6]
gst-plugins-base/stable 1.24.7 aarch64 [upgradable from: 1.24.6]
gst-plugins-good/stable 1.24.7 aarch64 [upgradable from: 1.24.6]
gst-plugins-ugly/stable 1.24.7 aarch64 [upgradable from: 1.24.6]
gstreamer/stable 1.24.7 aarch64 [upgradable from: 1.24.6]
termux-tools version:
1.43.3
Android version:
11
Kernel build information:
Linux localhost 4.14.186-22735277 #1 SMP PREEMPT Sat Feb 19 02:14:57 KST 2022 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-A225M
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.x11 versionCode:15
com.termux.styling versionCode:32
licy183 commented 3 weeks ago
  1. llvm-mingw-w64 will not statically link binaries. This is intended and will not be fixed.
  2. I haven't started wine explorer.exe in that way. I always start a desktop before using explorer.exe.
  3. Missing fonts may cause issues related to unicode characters rendering. You can try installing these fonts.
DuilioPerez commented 3 weeks ago
  1. llvm-mingw-w64 will not statically link binaries. This is intended and will not be fixed.

I'm not talking about issues with llvm-mingw-w64. I'm talking about important libraries missing in the package wine now:

~ $ vim helloWorld.cpp
~ $ aarch64-w64-mingw32-clang++ helloWorld.cpp -o helloWorld
~ $ wine helloWorld.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
0090:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0090:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0090:err:systray:initialize_systray Could not create tray window
0054:err:dnsapi:DllMain No libresolv support, expect problems
0024:err:module:import_dll Library libc++.dll (which is needed by L"Z:\\data\\data\\com.termux\\files\\home\\helloWorld.exe") not found
0024:err:module:import_dll Library libunwind.dll (which is needed by L"Z:\\data\\data\\com.termux\\files\\home\\helloWorld.exe") not found
0024:err:module:loader_init Importing dlls for L"Z:\\data\\data\\com.termux\\files\\home\\helloWorld.exe" failed, status c0000135
~ $ aarch64-w64-mingw32-clang++ helloWorld.cpp -o helloWorld -static-libstdc++ -static-libgcc
~ $ wine helloWorld.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
Hello world!
~ $
  1. I haven't started wine explorer.exe in that way. I always start a desktop before using explorer.exe.

In the other way should be open until you close it manually.

  1. Missing fonts may cause issues related to unicode characters rendering. You can try installing these fonts.

This issue isn't caused by missing fonts, maybe it is caused by missing libraries or wrong character decoding:

~ $ cat test.c
#include <stdio.h>

int main(void)
{
  puts("áéíóú");
}
~ $ aarch64-w64-mingw32-clang test.c -o test
~ $ wine cmd
0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0088:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0088:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0088:err:systray:initialize_systray Could not create tray window
0054:err:dnsapi:DllMain No libresolv support, expect problems
Microsoft Windows 10.0.22000

Z:\data\data\com.termux\files\home>echo "áéíóú"
"áéíóú"

Z:\data\data\com.termux\files\home>test
áéíóú

Z:\data\data\com.termux\files\home>exit
~ $
Biswa96 commented 3 weeks ago

0024:err:module:import_dll Library libc++.dll (which is needed by L"Z:\data\data\com.termux\files\home\helloWorld.exe") not found 0024:err:module:import_dll Library libunwind.dll (which is needed by L"Z:\data\data\com.termux\files\home\helloWorld.exe") not found

Those can be found in llvm-mingw directory. For example, aarch64-w64-mingw32/bin/libc++.dll

DuilioPerez commented 3 weeks ago

0024:err:module:import_dll Library libc++.dll (which is needed by L"Z:\data\data\com.termux\files\home\helloWorld.exe") not found 0024:err:module:import_dll Library libunwind.dll (which is needed by L"Z:\data\data\com.termux\files\home\helloWorld.exe") not found

Those can be found in llvm-mingw directory. For example, aarch64-w64-mingw32/bin/libc++.dll

That should be an error with wine configuration. Those warning are from wine, not from llvm-mingw-w64

Biswa96 commented 3 weeks ago

You have to setup the environment so that the .exe can find those .dll. It is same in Windows also. Try to prepend the bin/ directory in PATH env var.

DuilioPerez commented 3 weeks ago

I'm not familiar with Windows, but I think there should be available some libraries at least, like libc++, wich isn't available in wine for termux. If adding those path is needed, then the package should depend on llvm-mingw-w64

Biswa96 commented 3 weeks ago

I'm not familiar with Windows, but I think there should be available some libraries at least, like libc++, wich isn't available in wine for termux.

Those are provided in llvm-mingw-w64-ucrt package.

$ apt-file search aarch64-w64-mingw32/bin/libc++.dll
llvm-mingw-w64-ucrt: /data/data/com.termux/files/usr/opt/llvm-mingw-w64/aarch64-w64-mingw32/bin/libc++.dll
DuilioPerez commented 3 weeks ago

I'm not familiar with Windows, but I think there should be available some libraries at least, like libc++, wich isn't available in wine for termux.

Those are provided in llvm-mingw-w64-ucrt package.

$ apt-file search aarch64-w64-mingw32/bin/libc++.dll
llvm-mingw-w64-ucrt: /data/data/com.termux/files/usr/opt/llvm-mingw-w64/aarch64-w64-mingw32/bin/libc++.dll

It isn't a dependency of wine:

Package: wine-stable
Version: 9.0
Maintainer: @termux
Installed-Size: 536 MB
Depends: fontconfig, freetype, krb5, libandroid-spawn, libc++, libgmp, libgnutls, libxcb, libxcomposite, libxcursor, libxfixes, libxrender, mesa, opengl, pulseaudio, sdl2, vulkan-loader, xorg-xrandr
Homepage: https://www.winehq.org/
Download-Size: 90.7 MB
APT-Manual-Installed: yes
APT-Sources: https://packages-cf.termux.dev/apt/termux-x11 x11/main aarch64 Packages
Description: A compatibility layer for running Windows programs

I guess support to run C and C programs that only uses the standard library should be fundamental in wine

Biswa96 commented 3 weeks ago

If adding those path is needed, then the package should depend on llvm-mingw-w64

wine does on depends on those libraries but the cross compiled .exe or .dll do.

DuilioPerez commented 3 weeks ago

wine does on depends on those libraries but the cross compiled .exe or .dll do.

Wine depends on those libraries, but in the linux host platform. Wine doesn't contains those libraroes. In otjer words, wine depends on the shared objects (.so), but doesn't contains the dinamic link libraries (.dll) for the c++ standard amd there are missing other highly used dlls by programs, at least, by C++ programs that uses the C standard, without extensions.

licy183 commented 2 weeks ago

I'm not familiar with Windows, but I think there should be available some libraries at least, like libc++, wich isn't available in wine for termux. If adding those path is needed, then the package should depend on llvm-mingw-w64

Actually I don't think so. Windows executables should bundled these libraries with themselves if they depend them. The behavior in Termux is the same as other distros. Just like the following result on Ubuntu 22.04.

~$ sudo apt install mingw-w64 wine-stable
~$ x86_64-w64-mingw32-g++ main.cpp -o a.exe
~$ wine a.exe
0024:err:module:import_dll Library libgcc_s_seh-1.dll (which is needed by L"Z:\\a.exe") not found
0024:err:module:import_dll Library libstdc++-6.dll (which is needed by L"Z:\\a.exe") not found
0024:err:module:LdrInitializeThunk Importing dlls for L"Z:\\a.exe" failed, status c0000135

The codec issue you encountered is also not specific to Termux either.

~$ x86_64-w64-mingw32-gcc test.c
~$ wine a.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"
áéíóú

Using wine with mingw toolchain is not a common usage, so I still don't think there is any need to make wine-stable depending on llvm-mingw-w64 in Termux.

DuilioPerez commented 2 weeks ago

Ok, I've made some researchs, and: 1 - Windows (not only wine) have a strange behavior with unicode characters. 2 - Wine needs libraries to run c programs. 3 - Wine desktop crashing is not common, so this is an issue.

I've recently have tried to run clang-20 in wine, but it don't run. It seems it have issues with pathes, because python works right:

~/llvm-mingw-nightly-ucrt-aarch64 $ ls bin/
aarch64-w64-mingw32-addr2line.exe           i686-w64-mingw32-ranlib.exe
aarch64-w64-mingw32-ar.exe                  i686-w64-mingw32-readelf.exe
aarch64-w64-mingw32-as.exe                  i686-w64-mingw32-size.exe
aarch64-w64-mingw32-c++.exe                 i686-w64-mingw32-strings.exe                                                aarch64-w64-mingw32-clang++.exe             i686-w64-mingw32-strip.exe
aarch64-w64-mingw32-clang-scan-deps.exe     i686-w64-mingw32-widl.exe
aarch64-w64-mingw32-clang.exe               i686-w64-mingw32-windres.exe
aarch64-w64-mingw32-dlltool.exe             i686-w64-mingw32uwp-addr2line.exe
aarch64-w64-mingw32-g++.exe                 i686-w64-mingw32uwp-ar.exe
aarch64-w64-mingw32-gcc.exe                 i686-w64-mingw32uwp-as.exe
aarch64-w64-mingw32-ld                      i686-w64-mingw32uwp-c++.exe
aarch64-w64-mingw32-llvm-ar.exe             i686-w64-mingw32uwp-clang++.exe
aarch64-w64-mingw32-llvm-ranlib.exe         i686-w64-mingw32uwp-clang-scan-deps.exe
aarch64-w64-mingw32-nm.exe                  i686-w64-mingw32uwp-clang.exe
aarch64-w64-mingw32-objcopy.exe             i686-w64-mingw32uwp-dlltool.exe
aarch64-w64-mingw32-objdump                 i686-w64-mingw32uwp-g++.exe
aarch64-w64-mingw32-ranlib.exe              i686-w64-mingw32uwp-gcc.exe
aarch64-w64-mingw32-readelf.exe             i686-w64-mingw32uwp-ld
aarch64-w64-mingw32-size.exe                i686-w64-mingw32uwp-llvm-ar.exe
aarch64-w64-mingw32-strings.exe             i686-w64-mingw32uwp-llvm-ranlib.exe
aarch64-w64-mingw32-strip.exe               i686-w64-mingw32uwp-nm.exe
aarch64-w64-mingw32-widl.exe                i686-w64-mingw32uwp-objcopy.exe
aarch64-w64-mingw32-windres.exe             i686-w64-mingw32uwp-objdump
aarch64-w64-mingw32uwp-addr2line.exe        i686-w64-mingw32uwp-ranlib.exe
aarch64-w64-mingw32uwp-ar.exe               i686-w64-mingw32uwp-readelf.exe
aarch64-w64-mingw32uwp-as.exe               i686-w64-mingw32uwp-size.exe
aarch64-w64-mingw32uwp-c++.exe              i686-w64-mingw32uwp-strings.exe
aarch64-w64-mingw32uwp-clang++.exe          i686-w64-mingw32uwp-strip.exe
aarch64-w64-mingw32uwp-clang-scan-deps.exe  i686-w64-mingw32uwp-widl.exe
aarch64-w64-mingw32uwp-clang.exe            i686-w64-mingw32uwp-windres.exe
aarch64-w64-mingw32uwp-dlltool.exe          intercept-build
aarch64-w64-mingw32uwp-g++.exe              ld
aarch64-w64-mingw32uwp-gcc.exe              ld-wrapper.sh
aarch64-w64-mingw32uwp-ld                   ld.lld.exe
aarch64-w64-mingw32uwp-llvm-ar.exe          libLLVM-20git.dll
aarch64-w64-mingw32uwp-llvm-ranlib.exe      libc++.dll
aarch64-w64-mingw32uwp-nm.exe               libclang-cpp.dll
aarch64-w64-mingw32uwp-objcopy.exe          libffi-8.dll
aarch64-w64-mingw32uwp-objdump              liblldb.dll
aarch64-w64-mingw32uwp-ranlib.exe           libomp.dll
aarch64-w64-mingw32uwp-readelf.exe          libpython3.11.dll
aarch64-w64-mingw32uwp-size.exe             libpython3.dll
aarch64-w64-mingw32uwp-strings.exe          libunwind.dll
aarch64-w64-mingw32uwp-strip.exe            libwinpthread-1.dll
aarch64-w64-mingw32uwp-widl.exe             lldb-argdumper.exe
aarch64-w64-mingw32uwp-windres.exe          lldb-dap.exe
addr2line.exe                               lldb-instr.exe
analyze-build                               lldb-mi.exe
ar.exe                                      lldb-server.exe
armv7-w64-mingw32-addr2line.exe             lldb.exe
armv7-w64-mingw32-ar.exe                    llvm-addr2line.exe
armv7-w64-mingw32-as.exe                    llvm-ar.exe
armv7-w64-mingw32-c++.exe                   llvm-cov.exe
armv7-w64-mingw32-clang++.exe               llvm-cvtres.exe
armv7-w64-mingw32-clang-scan-deps.exe       llvm-cxxfilt.exe
armv7-w64-mingw32-clang.exe                 llvm-dlltool.exe
armv7-w64-mingw32-dlltool.exe               llvm-ml.exe
armv7-w64-mingw32-g++.exe                   llvm-nm.exe
armv7-w64-mingw32-gcc.exe                   llvm-objcopy.exe
armv7-w64-mingw32-ld                        llvm-objdump.exe
armv7-w64-mingw32-llvm-ar.exe               llvm-pdbutil.exe
armv7-w64-mingw32-llvm-ranlib.exe           llvm-profdata.exe
armv7-w64-mingw32-nm.exe                    llvm-ranlib.exe
armv7-w64-mingw32-objcopy.exe               llvm-rc.exe
armv7-w64-mingw32-objdump                   llvm-readelf.exe
armv7-w64-mingw32-ranlib.exe                llvm-readobj.exe
armv7-w64-mingw32-readelf.exe               llvm-size.exe
armv7-w64-mingw32-size.exe                  llvm-strings.exe
armv7-w64-mingw32-strings.exe               llvm-strip.exe
armv7-w64-mingw32-strip.exe                 llvm-symbolizer.exe
armv7-w64-mingw32-widl.exe                  llvm-windres.exe
armv7-w64-mingw32-windres.exe               llvm-wrapper.exe
armv7-w64-mingw32uwp-addr2line.exe          mingw32-make.exe
armv7-w64-mingw32uwp-ar.exe                 nm.exe
armv7-w64-mingw32uwp-as.exe                 objcopy.exe
armv7-w64-mingw32uwp-c++.exe                objdump
armv7-w64-mingw32uwp-clang++.exe            objdump-wrapper.sh
armv7-w64-mingw32uwp-clang-scan-deps.exe    ranlib.exe
armv7-w64-mingw32uwp-clang.exe              readelf.exe
armv7-w64-mingw32uwp-dlltool.exe            run-clang-tidy
armv7-w64-mingw32uwp-g++.exe                scan-build-py
armv7-w64-mingw32uwp-gcc.exe                size.exe
armv7-w64-mingw32uwp-ld                     strings.exe
armv7-w64-mingw32uwp-llvm-ar.exe            strip.exe
armv7-w64-mingw32uwp-llvm-ranlib.exe        widl.exe
armv7-w64-mingw32uwp-nm.exe                 windres.exe
armv7-w64-mingw32uwp-objcopy.exe            x86_64-w64-mingw32-addr2line.exe
armv7-w64-mingw32uwp-objdump                x86_64-w64-mingw32-ar.exe
armv7-w64-mingw32uwp-ranlib.exe             x86_64-w64-mingw32-as.exe
armv7-w64-mingw32uwp-readelf.exe            x86_64-w64-mingw32-c++.exe
armv7-w64-mingw32uwp-size.exe               x86_64-w64-mingw32-clang++.exe
armv7-w64-mingw32uwp-strings.exe            x86_64-w64-mingw32-clang-scan-deps.exe
armv7-w64-mingw32uwp-strip.exe              x86_64-w64-mingw32-clang.exe
armv7-w64-mingw32uwp-widl.exe               x86_64-w64-mingw32-dlltool.exe
armv7-w64-mingw32uwp-windres.exe            x86_64-w64-mingw32-g++.exe
c++.exe                                     x86_64-w64-mingw32-gcc.exe
c11.exe                                     x86_64-w64-mingw32-ld
c99.exe                                     x86_64-w64-mingw32-llvm-ar.exe
cc.exe                                      x86_64-w64-mingw32-llvm-ranlib.exe
clang++.exe                                 x86_64-w64-mingw32-nm.exe
clang-20.exe                                x86_64-w64-mingw32-objcopy.exe
clang-format.exe                            x86_64-w64-mingw32-objdump
clang-scan-deps-real.exe                    x86_64-w64-mingw32-ranlib.exe
clang-scan-deps-wrapper.exe                 x86_64-w64-mingw32-readelf.exe
clang-scan-deps-wrapper.sh                  x86_64-w64-mingw32-size.exe
clang-scan-deps.exe                         x86_64-w64-mingw32-strings.exe
clang-target-wrapper.exe                    x86_64-w64-mingw32-strip.exe
clang-target-wrapper.sh                     x86_64-w64-mingw32-widl.exe
clang-tidy.exe                              x86_64-w64-mingw32-windres.exe
clang.exe                                   x86_64-w64-mingw32uwp-addr2line.exe
clangd.exe                                  x86_64-w64-mingw32uwp-ar.exe
dlltool.exe                                 x86_64-w64-mingw32uwp-as.exe
g++.exe                                     x86_64-w64-mingw32uwp-c++.exe
gcc.exe                                     x86_64-w64-mingw32uwp-clang++.exe
gendef.exe                                  x86_64-w64-mingw32uwp-clang-scan-deps.exe
git-clang-format                            x86_64-w64-mingw32uwp-clang.exe
i686-w64-mingw32-addr2line.exe              x86_64-w64-mingw32uwp-dlltool.exe
i686-w64-mingw32-ar.exe                     x86_64-w64-mingw32uwp-g++.exe
i686-w64-mingw32-as.exe                     x86_64-w64-mingw32uwp-gcc.exe
i686-w64-mingw32-c++.exe                    x86_64-w64-mingw32uwp-ld
i686-w64-mingw32-clang++.exe                x86_64-w64-mingw32uwp-llvm-ar.exe
i686-w64-mingw32-clang-scan-deps.exe        x86_64-w64-mingw32uwp-llvm-ranlib.exe
i686-w64-mingw32-clang.exe                  x86_64-w64-mingw32uwp-nm.exe
i686-w64-mingw32-dlltool.exe                x86_64-w64-mingw32uwp-objcopy.exe
i686-w64-mingw32-g++.exe                    x86_64-w64-mingw32uwp-objdump
i686-w64-mingw32-gcc.exe                    x86_64-w64-mingw32uwp-ranlib.exe
i686-w64-mingw32-ld                         x86_64-w64-mingw32uwp-readelf.exe
i686-w64-mingw32-llvm-ar.exe                x86_64-w64-mingw32uwp-size.exe
i686-w64-mingw32-llvm-ranlib.exe            x86_64-w64-mingw32uwp-strings.exe
i686-w64-mingw32-nm.exe                     x86_64-w64-mingw32uwp-strip.exe
i686-w64-mingw32-objcopy.exe                x86_64-w64-mingw32uwp-widl.exe
i686-w64-mingw32-objdump                    x86_64-w64-mingw32uwp-windres.exe
~/llvm-mingw-nightly-ucrt-aarch64 $ cat test.c
#include <stdio.h>
int main(void)
{
  puts("Hello world!");
}
~/llvm-mingw-nightly-ucrt-aarch64 $ wine bin/clang.exe test.c -o test
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0084:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0084:err:systray:initialize_systray Could not create tray window
0054:err:dnsapi:DllMain No libresolv support, expect problems
Z:\data\data\com.termux\files\home\llvm-mingw-nightly-ucrt-aarch64\bin\clang-20: No such file or directory
~/llvm-mingw-nightly-ucrt-aarch64 $ wine bin/clang-20.exe test.c -o test
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
0088: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
Z:\data\data\com.termux\files\home\llvm-mingw-nightly-ucrt-aarch64\bin\clang-20.exe: No such file or directory
~/llvm-mingw-nightly-ucrt-aarch64 $ ls
LICENSE.TXT          armv7-w64-mingw32  i686-w64-mingw32  lib     share   versions.txt
aarch64-w64-mingw32  bin                include           python  test.c  x86_64-w64-mingw32
~/llvm-mingw-nightly-ucrt-aarch64 $ ls python/
bin  include  lib  share
~/llvm-mingw-nightly-ucrt-aarch64 $ ls python/bin/
2to3       idle3     libffi-8.dll       libpython3.dll  pydoc3.11   python3-config     python3.11.exe  python3w.exe
2to3-3.11  idle3.11  libpython3.11.dll  pydoc3          python.exe  python3.11-config  python3.exe
~/llvm-mingw-nightly-ucrt-aarch64 $ wine python/bin/python.exe
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
008c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0070:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0070:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0070:err:systray:initialize_systray Could not create tray window
0054:err:dnsapi:DllMain No libresolv support, expect problems
Python 3.11.6 (remotes/origin/mingw-v3.11.6-dirty:03d9f3ca48, Aug 20 2024, 08:31:04)  [GCC Clang 20.0.0 64 bit (ARM64)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello world!")
Hello world!
>>> exit()
~/llvm-mingw-nightly-ucrt-aarch64 $
DuilioPerez commented 2 weeks ago

I've made further testing and wine can run most of arm programs i've tried, but there are some strange bugs. CMake can be installed and it seems to work very well, clang doesn't work because executable can't be found and vlc can run, even with translations, wich aren't available in the termux version. But with vlc, only works while the installer is running, and the installation can't complete because it cause a stack overflow. Screenshot_20240827-090549_TermuxX11

DuilioPerez commented 2 weeks ago

Here you can see vlc in wine in termux working. I've fixed the issue with the installer adding the path of System32 aarch64-w64-mingw to WINEDLLPATH. In vlc we can get audio working, but for now it can play videos. Screenshot_20240827-104640_TermuxX11 Screenshot_20240827-105113_TermuxX11 Screenshot_20240827-104854_TermuxX11

DuilioPerez commented 2 weeks ago

So for now the only issues are with desktop autoclosing and file path