Hey,
The issue has been found using the latest winetricks version (61509663b824d72daafec6a95986e5b256e19e0e8ec1d2b7c4e89cf52665d63b).
We tried to find the cause for a crash in Foundation over at the Proton issue tracker. After some tinkering & a tip by @gverm it became clear that there is an issue with the vcrun2015 & vcrun2017 installers not properly replacing the ucrtbase.dll due to issues with the file permission. There is no hint in the log that the file couldn't be replaced properly.
This recently removed workaround for wine bug 30713 (via #1631 ) fixed the issue for some users by manually copy/pasting the dlls into the prefix system32 directory, but it didn't work for everyone.
A manual workaround for Foundation is described here.
Since proton automatically installs vcrun2015 into the game prefix and the game still crashes, I assumed that the vcrun2015 installer has to be affected as well.
In my particular case the target file is a symbolic link to /home/vavooon/.local/share/Steam/steamapps/common/Proton 5.13/dist/lib64/wine/fakedlls/ucrtbase.dll and cp fails while trying to follow the link and override read-only file.
I don't really know a cp flag which just overrides the link but if we remove it it would completely solve the issue. Not sure whether it's required for other files though.
diff --git a/winetricks b/usr/bin/winetricks
index 2dc1fd8..97c36ec 100755
--- a/winetricks
+++ b/usr/bin/winetricks
@@ -12724,6 +12724,7 @@ load_vcrun2017()
cp "${W_TMP}"/api_ms_win_crt_math_l1_1_0.dll "${W_SYSTEM64_DLLS}"/api-ms-win-crt-math-l1-1-0.dll
cp "${W_TMP}"/api_ms_win_crt_runtime_l1_1_0.dll "${W_SYSTEM64_DLLS}"/api-ms-win-crt-runtime-l1-1-0.dll
cp "${W_TMP}"/api_ms_win_crt_stdio_l1_1_0.dll "${W_SYSTEM64_DLLS}"/api-ms-win-crt-stdio-l1-1-0.dll
+ rm "${W_SYSTEM64_DLLS}"/ucrtbase.dll
cp "${W_TMP}"/ucrtbase.dll "${W_SYSTEM64_DLLS}"/ucrtbase.dll
else
w_try "${WINE}" vc_redist.x64.exe ${W_OPT_UNATTENDED:+/q}
We probably need to remove the wine dlls so that the installer can install them properly. Also, the fact this game doesn't work with wine's ucrtbase.dll is also a bug. Could you please report this on bugs.winehq.org?
EDIT: I'll try to work on the winetricks part soon.
@gverm I just searched for similar cases on bugs.winehq.org and found this and the statement from 2018:
(In reply to Brendan McGrath from comment #0)
> Therefore I was able to resolve this by changing the version in
> dlls/ucrtbase/version.rc to 10.0.1.0. Proposed patch is attached.
This doesn't seem sustainable. IIRC I've seen at least one application that requires an actually higher version than we currently report. I think the better solution is just to remove builtin ucrtbase before installing native.
The reported version might not be of any interest, but in the second part the dev suggested, as I understand it, to remove the builtin dll anyway when installing the native dll via vcrun installer. Maybe I misunderstand it, though.
@Vavooon If you don't mind I'd suggest that you open the bug report on bugs.winehq.org if still needed? You seem to be a better candidate for that. :wink:
@MadByteDE Yeah, I think the installer not replacing ucrtbase will be a WONTFIX on the wine side. But removing the builtin dlls before installing native should work fine, I'll send a PR soon.
About the actual wine bug: I meant reporting a bug for this game because it won't work without installing vcrun. This should not be the case and wine should be fixed accordingly.
@MadByteDE Sure, here it is https://bugs.winehq.org/show_bug.cgi?id=50031
Anyways, I'm wondering what's the actual issue. Is ucrtbase from VC_redist just a newer library version?
I see 3 possible cases here then:
Or maybe it's the case at all, I only have some knowledge about how libraries on Linux work.
@Vavooon There are multiple issues:
Anyways, let's refrain from discussing this more, the issue has been narrowed down.
Most helpful comment
@Vavooon There are multiple issues:
Anyways, let's refrain from discussing this more, the issue has been narrowed down.