-
Notifications
You must be signed in to change notification settings - Fork 493
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
MSYS2 fails to run under Wine #682
Comments
You could try compiling mintty 2.6.0 with new runtime version. |
how if mintty doesn't start? i also tried "wineconsole --backend=curses usr/bin/bash -l" |
Run it from Linux console.
|
if i understood "msysww -c" runs what i already tried (https://github.com/Krakonos/msysww/blob/master/msysww#L153); right? |
|
but it runs the command https://github.com/Krakonos/msysww/blob/master/msysww#L153 or i didn't understand it? in the first case, as you can see on comment before, i already tried that command and it crashes |
@KrullKorg what's your wine version? what's your msys2 runtime version? Is it possible a Msys2 version later than or equal to 2.6.0? corinna, would you be surprised if cygwin crashing on wine starts from this commit: ffcef702e78f81c64376dbe7547f242f67b433d4 |
Also take care about https://bugs.wine-staging.com/show_bug.cgi?id=682 |
debian gnu/linux sid updated to last version (an lxc container inside debian gnu/linux sid updated to latest version) |
@KrullKorg I think it is exact the problem I was discuss with corrina on irc. The latest msys2-runtime version is 2.6.0 after core-update, according to repo.msys2.org: http://repo.msys2.org/msys/i686/msys2-runtime-2.6.0-1-i686.pkg.tar.xz The only way to workaround is, manually download old msys2-runtime version and manually revert /usr/bin/msys-2.0.dll if it's hard to get Msys2 right on Wine for you, you can try https://hub.docker.com/r/teaci/msys64/ and https://hub.docker.com/r/teaci/msys32/ as the last chance, which are used by tea-ci.org Sorry I don't have time to continue join corrina to fix this soon until few months later, any one could give a hand would be great helpful... ` |
|
yes i downgraded msys2-runtime and mintty and it works |
The same issue (wine-staging 1.9.18). Replacing msys-2.0.dll (from msys2-runtime-2.6.0-1-i686.pkg.tar.xz) with one from msys2-runtime-2.5.2-2-i686.pkg.tar.xz and mintty.exe (from mintty-1 Despite of presence of msys-2.0.dbg, there is no source line info:
Is the msys-2.0.dbg for the msys-2.0.dll not properly created? |
Hi @andreygursky , see https://bugs.wine-staging.com/show_bug.cgi?id=557 for the debugging symbol issue. It is a known issue that WineDbg does not know dwarf4, and it is a known issue that Win32 gdb does not understand Wine module, so I usually use a combination of WineDbg and Win32 gdb when debugging Msys2 on Wine, switching forth and back again and again, while sometimes rebuild Msys2 program with |
@fracting, thanks for clarifying. BTW, the fact that cygwin dropped the support of WinXP seems to be very unfortunate. Do you know whether RedHat could reconsider that? Had they got substantial benefits from that turn? And where can I follow the progress on the workaround you discussed with Corinna (@github-cygwin?)? Clear, dwarf4 should be better than dwarf2, but do many users of msys2 really make use of the improvements of the most recent dwarf standard or not really and compiling with dwarf2 could be enough? |
@andreygursky sometimes we discuss in Cygwin mailing list [1], sometimes we discuss in Cygwin irc channel [2]. Unfortunately there is no log for irc. I can't answer your question on behalf of RedHat or Cygwin or corrina, but I think the decision has made and it wouldn't be changed since WinXP is lack of security updates. [1] https://cygwin.com/lists.html |
Are you still having problems?
|
yes same problem, tried just now (debian sid, msys2 32bit, wine staging 1.9.22) |
I've just asked about this on the cygwin mailing list. Let's see, what Cygwin developers say. |
Unfortunately, Cygwin seems to be not cooperative: it's only Wine problem now :( |
On Nov 10 06:56, andreygursky wrote:
That's a bit unfair in terms of a summary. Here's what I wrote: --- snip --- It seems Cygwin under Wine was not tested outside of XP compatibility And, of course, we're not uncooperative, but that does not mean we can Corinna |
ok winxp is dead. but if i set wine to "emulate" >= vista mintty doesn't start anyway |
No answer I treated as no objection - that's why my summary. But now I'm very glad to hear from you that it is not the case :) So may we ask you relevant questions on some mailing list? Or only on IRC? The problem with later: it is hard to follow due to missing archives.
Are there some WinAPI tests in Cygwin? Running them would easily reveal the missing or not properly implemented ones in Wine. |
On Nov 10 07:54, andreygursky wrote:
You're free to discuss the issue on IRC freenode/#cygwin-developers and
Sorry, no, but you can use native Linux strace and GDB on Wine to see Corinna |
When installing dash under Wine:
|
@fracting, I'm trying now to build msys2-runtime under wine-staging 2.0~rc5. It fails without any visible reason:
Any clue? |
Aha, #421 (comment) solves the build failure. @Alexpux, can you build msys2-runtime with mingw-w64-cross-crt-clang-git? |
@Alexpux, do you know, is it hard to not strip debuginfos from msys-2.0.dll into separate msys-2.0.dbg? I've rebuilt mintty with dwarf-2 debuginfos (which are not splitted by its simple Makefile) and backtraces are there. |
OK, it was enough to comment out a line in winsup/cygwin/Makefile, where winsup/cygwin/dllfixdbg script is called: # Rule to build msys-2.0.dll
$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile $(VERSION_OFILES)
$(CXX) $(CXXFLAGS) \
-mno-use-libstdc-wrappers -L${WINDOWS_LIBDIR} \
-Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) -static \
-Wl,--heap=0 -Wl,--out-implib,msysdll.a -shared -o $@ \
-e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) $(VERSION_OFILES) \
$(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \
-lgcc $(DLL_IMPORTS) -Wl,-Map,msys.map
#@$(word 2,$^) $(OBJDUMP) $(OBJCOPY) $@ ${patsubst %0.dll,%-2.0.dbg,$@} # <--- HERE
@ln -f $@ new-$(DLL_NAME) Now I have verbose backtrace. |
ok i got something tho pacman is slow af ;-;
|
Wine has never worked fully with Msys2. It's something that has been a work in progress for quite some time. I myself have been tinkering with this for 18-months, and have submitted quite a number of fixes and new features to Wine. I maintain a small collection of fixes collected from various developers that I update from time to time: You should find fixes for most of the issues you are encountering there. We're at the point now where it works well enough to be usable much of the time, but there are still a large number of warnings and fixmes. I am working on it in my day job so that it can be rolled out for a Jenkins build task that will run Msys2 on Wine in Docker in a K8s cluster. It is currently splutter into life.
This is not actually a crash. The issue was tracked here: https://bugs.winehq.org/show_bug.cgi?id=40528, and was closed with "Not our bug". The issue is that Msys2 and Cygwin have super-sketchy code that peeks into the private memory of the Windows DLLs to get the current working directory string more quickly. If this fails, it prints this noisy warning and then uses the conventional API to retrieve the string instead. Wine can never replicate the private layout of Windows DLLs, so a proper solution would be to remove the FAST_CWD code path from Msys2/Cygwin, or at least remove the noisy warning.
This is tracked here: https://bugs.winehq.org/show_bug.cgi?id=53190 There is no fix available right now. The only solution is to avoid the script.
This is a manifestation of this bug: https://bugs.winehq.org/show_bug.cgi?id=52585 There is an active Merge Request from Jinoh Kang here: https://gitlab.winehq.org/wine/wine/-/merge_requests/4424 I'm hoping we will see this accepted quite soon. @mgood7123 do you have any interest in joining this effort? It's quite a fun project. There are lots of opportunities for hacking and experimentation, especially given that we have all the source code. |
I think this would be out of my scope especially for such a complex project, as much as i would like to |
Well there's lots of ways to be involved. Even just testing, experimenting and filing bugs is very beneficial. |
alright |
Are you aware of any efforts on the Cygwin/Msys2 side to implement such a solution? |
I put together a trivial patch a while ago to do that, but I don't believe I ever submitted it upstream, as there were plenty of other issues I planned to look at, and never did. In fact, I posted the patch in this ticket (patches 0025 and 0026 in master...TBBle:MSYS2-packages:msys2-runtime-wine-cwd-support). I was working against MSYS2 because I've never tried to build Cygwin itself, and the MSYS2 packages build system let me easily throw patches in and build, so experimentation was rapid. I haven't rebased that tree in over 5 years, so it's quite possible the patches no longer apply, but they should demonstrate how easy the change was, since we were just re-enabling a code-path that Cygwin had disabled but not removed when dropping pre-Windows7 support. |
Imma try to use Github Actions CI to build with msys2 on windows runner |
Update & Usage InstructionsAs mentioned previously, I maintain a small collection of Wine patches which I update periodically. This is the current version: The goal is to upstream as many of these fixes as possible over time. With Wine built with 64-bit support with WoW support enabled, Msys2 is moderately usable. To help others get started, here are some setup instructions. Wine InstallationDependenciesCheck your Linux distribution for advice on how to build Wine from source. It can often be somewhat tricky to provide the source dependencies. With Nix (either NixOS, or Nix installed into another Linux distro), with Nix Flake support enabled, entering a Wine development environment is very simple:
BuildIn the Wine source repository:
Install
Our patched version of Wine is now installed in
Note that Msys2 InstallationFirst, prepare a Wine Prefix:
This will contain the Wine C-drive, and our Msys2 installation. Msys2 Installation with the InstallerThe installer, available from the Msys2 website is known to work with the patched version of Wine.
The UI has a cosmetic issue running under Wine, but nonetheless competes the job. The installer can also be operated in the terminal:
Msys2 Installation without the InstallerIt is also possible to install Msys2 by simply unpacking the tar file:
Running Msys2 bash for the first time will trigger the post-install triggers, which results in an equivalent result to the GUI installer:
UsageTypically users launch Msys2 through Running Msys2 bash in the terminalMsys2 triggers many fixme, warning and error messages in Wine. These are useful for debugging purposes, but for usage, they can drown the terminal in messages. You may wish to first disable the messages:
Now select which Msys2 environment to use:
Now we can launch the bash shell:
Running Msys2 bash in minttyAlternatively, we can also run Msys2's GUI terminal emulator in Wine. In this case, it is not necessary to disable Wine debug messages.
Known IssuesEnvironment VariablesWine passes most environment variables from the host system through to the guest process. This can cause problems for Msys2 processes which may react to the variables in unexpected ways. Here is a non-exhaustive list of variables which may need to be unset:
LocaleWine is sensitive to the host system locale when converting Windows UTF-16 strings to Linux strings. If the locale is not correctly configured, this can manifest in strange ways. For example, the source code archive of OpenOCD contains files with Cyrillic characters. If the locale is not configured correctly, To ensure you have a correctly configured locale, run
If not, override it, with Other FAST_CWDMsys2 (and Cygwin) currently use a dubious method to quickly acquire the current working directory string, by peeking at the private memory of the Windows DLLs. There is no way that this can be implemented in Wine, which triggers a noisy warning:
This warning is safe to ignore because in this case, Msys2 will fall back to using the Windows API in the normal way. The issue is tracked here in Wine, and was closed with "RESOLVED NOTOURBUG". Incomplete Support in WineWine's support for Msys2 and Cygwin is incomplete, and there are many unresolved bugs being tracked in the Wine bug tracker. Most of these can be found by searching for "msys2". If you encounter any issue which has not been previously reported, please file a Wine bug. |
Two possible workarounds for this:
|
This is a really useful project, thanks, @jhol, for your wonderful work on this! |
Indeed, when removing |
This type of removal is possible only after starting the MSYS session, during the session (from outside, in the Linux host). |
I found that |
Here is a blog entry with a tutorial on building a Windows application completely in Wine: https://matek.hu/zoltan/blog-20240822.php?t=d --- thanks, @jhol! |
msys2-hacks-18 works fine too. Update: commands do work but react very slow. |
It seems Gradle has difficulties with projects that require the Gradle daemon. There should be some file locking issue there. Any ideas to overcome this problem? |
|
Anyone using msys2-hacks-18? Everything(esp. gnu configuration scripts) runs as slow as hell. |
turns out it's not wine's problem. |
It seems I cannot. The docs at https://docs.gradle.org/8.5/userguide/gradle_daemon.html#sec:disabling_the_daemon say that I should set I also found https://discuss.gradle.org/t/need-help-trying-to-stop-daemon-and-re-use-launcher-jvm/47852 but that discussion seems unfinished. I know this is not an MSYS2 issue but a problem in Wine with file locking, and maybe in Gradle too. |
I tried to get msys2 running in this docker image. I used this commit from the msys2-hacks-18 branch. The newest commit on that branch does not compile successfully. My goal is to compile autotools-based projects (like openssl) for Windows in this Docker container. Unfortunately, it doesn't work because the bash.exe process hangs.
|
Jinoh Kang: server: Allow creating named pipes using \Device\NamedPipe\ as RootDirectory. is now merged! |
Don't know why noone mentioned this, but there recently appeared an (experimental) docker image with wine and msys2, based on |
Interesting. @lazka is using |
@jhol now that more stuff is merged into master what is the difference between |
i'm sorry, but i didn't want to open an issue about that; i just wanted to open a discussion under sourceforge but i saw that it is no longer possible
so the problem is as the object: mintty doesn't start anymore under wine-staging after latest msys2 core updates; before updates it started but only with winxp compatibility setted
what could be the problem? thanks in advanced.
Click here to see the full error log
System information:
Wine build: wine-1.9.18 (Staging)
Platform: i386 (WOW64)
Version: Windows XP
Host system: Linux
Host version: 4.7.0-1-amd64
The text was updated successfully, but these errors were encountered: