winetricks icon indicating copy to clipboard operation
winetricks copied to clipboard

Unable to install some packages on Proton 5.13 created prefix

Open mmbossoni opened this issue 4 years ago • 26 comments

Some packages like wmp11 tries to install wsh57 that doesn't install properly due to dlls being a symbolic link to Proton wine dlls instead of a regular file.

mmbossoni avatar Nov 19 '20 01:11 mmbossoni

Hi I'm sorry I missed this bug report and opened another one. I had exactly the same issue as mmbossoni and I have a workaround that allows the packages to be installed. Steps to reproduce/output:

~ $ PATH=~/.steam/steam/steamapps/common/Proton\ 5.13/dist/bin/:$PATH WINEPREFIX=~/.steam/steam/steamapps/compatdata/1018010/pfx sh downloads/winetricks wsh57
Executing mkdir -p /home/steeznson/.steam/steam/steamapps/compatdata/1018010
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Using winetricks 20200412-next - sha256sum: 3eca348b02a12aef2aeae16f3ce41c53a48304b89c2133fe594f636798854fd7 with wine-5.13-634-gd6646652a2f and WINEARCH=win64
Executing w_do_call wsh57
Executing mkdir -p /home/steeznson/.steam/steam/steamapps/compatdata/1018010
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Executing load_wsh57 
Executing cabextract -q -d /home/steeznson/.steam/steam/steamapps/compatdata/1018010/pfx/dosdevices/c:/windows/syswow64 /home/steeznson/.cache/winetricks/wsh57/scripten.exe
/home/steeznson/.steam/steam/steamapps/compatdata/1018010/pfx/dosdevices/c:/windows/syswow64/dispex.dll: Permission denied
/home/steeznson/.steam/steam/steamapps/compatdata/1018010/pfx/dosdevices/c:/windows/syswow64/jscript.dll: Permission denied
/home/steeznson/.steam/steam/steamapps/compatdata/1018010/pfx/dosdevices/c:/windows/syswow64/scrobj.dll: Permission denied
/home/steeznson/.steam/steam/steamapps/compatdata/1018010/pfx/dosdevices/c:/windows/syswow64/scrrun.dll: Permission denied
/home/steeznson/.steam/steam/steamapps/compatdata/1018010/pfx/dosdevices/c:/windows/syswow64/vbscript.dll: Permission denied
/home/steeznson/.steam/steam/steamapps/compatdata/1018010/pfx/dosdevices/c:/windows/syswow64/cscript.exe: Permission denied
/home/steeznson/.steam/steam/steamapps/compatdata/1018010/pfx/dosdevices/c:/windows/syswow64/wscript.exe: Permission denied
/home/steeznson/.steam/steam/steamapps/compatdata/1018010/pfx/dosdevices/c:/windows/syswow64/wshom.ocx: Permission denied
------------------------------------------------------
warning: Note: command cabextract -q -d /home/steeznson/.steam/steam/steamapps/compatdata/1018010/pfx/dosdevices/c:/windows/syswow64 /home/steeznson/.cache/winetricks/wsh57/scripten.exe returned status 1. Aborting.
------------------------------------------------------

Workaround: The cabextract actually succeeds the first time so you can just try to install again with that step skipped. Comment out w_try_cabextract -d "${W_SYSTEM32_DLLS}" "${W_CACHE}"/wsh57/scripten.exe in load_wsh57() in winetricks script and retry install command.

steeznson avatar Nov 27 '20 13:11 steeznson

I don't use proton, so someone that does will need to look at this.

austin987 avatar Dec 07 '20 04:12 austin987

Can you please specify where load_wsh57() is exactly?

Nik7413 avatar Dec 13 '20 16:12 Nik7413

@Nik7413 It's a function in the winetricks script. Line 13275.

steeznson@velazquez ~/downloads $ wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
--2020-12-13 17:27:21--  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
Resolving raw.githubusercontent.com... 199.232.52.133
Connecting to raw.githubusercontent.com|199.232.52.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 880242 (860K) [text/plain]
Saving to: winetricks

winetricks                                      100%[=======================================================================================================>] 859.61K  --.-KB/s    in 0.08s   

2020-12-13 17:27:21 (10.2 MB/s) - winetricks saved [880242/880242]

steeznson@velazquez ~/downloads $ grep -nR load_wsh57
winetricks:13275:load_wsh57()

steeznson avatar Dec 13 '20 17:12 steeznson

Yup,found it. Thanks

Nik7413 avatar Dec 13 '20 17:12 Nik7413

@steeznson Can you please help me. wmp installed fine but i am also trying to install a package called "quartz". Using you method i commented out some lines in 11670 and 11697 yet its still not working giving me this error: Screenshot_20201214_075327

Nik7413 avatar Dec 14 '20 02:12 Nik7413

Screenshot_20201214_080512 These are the lines. I edited them in vim.

Nik7413 avatar Dec 14 '20 02:12 Nik7413

@Nik7413 My hypothesis when I originally raised the ticket was that w_try_cabextract was returning a non-zero exit status after it had already completed the extraction and then terminating the package installation. Perhaps the way proton prefixes setup permissions cabextract will always yield an error. Since the quartz error also happens with that function it still appears to be an issue. Also there are two w_try_cabextract calls one after the other there so if the first one 'fails' the second one ought to as well. I was looking originally at wsh57/wmp11 when I first investigated and found my solution for wsh57 through trial and error. I'll take a look at quartz today.

steeznson avatar Dec 14 '20 09:12 steeznson

@Nik7413 Ok I managed to install quartz using an extremely convoluted method of running winetricks, hitting an error, commenting out the line that raised the error, then re-running winetricks. w_try_cabextract and w_try cp both appear to raise a non-zero exit error in the winetricks script due to permissions issues despite the fact that they both succeed. If I were to start working on a solution to this issue it would likely be a winetricks flag that instructs the w_try commands to ignore permissions errors.

steeznson avatar Dec 14 '20 09:12 steeznson

@steeznson So, what should i do on my part to get it working on my end? And also another issue,this time regarding 'devenum'( extremely sorry if it bothers you). This is (i think) the last of the hurdles to get the game running(theoritically). The game in question is persona 4 golden. Refering to both github and protondb, i need to install wmp,quartz and devenum to get it working. Screenshot_20201214_101741

Nik7413 avatar Dec 14 '20 13:12 Nik7413

@Nik7413, my workaround for the time being is find out everything I want to install using winetricks, deleting the prefix and running winetricks before hitting the play button. That way winetricks runs without any problem.

mmbossoni avatar Dec 14 '20 13:12 mmbossoni

@Nik7413 I would recommend trying the fix from @mmbossoni since that sounds more clean. As I mentioned I managed to install quartz by:

  1. Running winetricks command to try install it
  2. When an error appears find the exact point where the w_try_cabextract or w_try cp command fails and comment that out in the winetricks script
  3. Go back to step 1 (repeat this process until the installation works)

I suspect that approach would work with devenum too. Remember the trick to this approach is that the commands are reporting failures and terminating the installation when they are actually succeeding, so provided you comment out and re-run each step in order you get to the point where the full install has taken place. It's a bad solution but worked for me.

I don't think this bug report is a good place for you to ask for help with getting a specific game running so this comment is the last help I'm giving.

steeznson avatar Dec 14 '20 16:12 steeznson

I've hit this same error with installing directplay verb in proton prefix.

~~From what it seems this is really caused by cabextract "following" symlinks and Proton having the linked files marked as unwritable (perms 444) Edit: This might actually be caused by the new "hardened" Proton (soldier/pressure-vessel ?)~~ Edit: I didn't read the issue description properly

wereii avatar Jan 02 '21 13:01 wereii

winetricks cabextract fails if there are pre-existing files in the prefix that are

  • not writable (mode 444 for instance; cabextract itself produces such)
  • symlinks

It's a problem with wsh57, gdiplus, quartz, and possibly more.

Seegras avatar Jan 08 '21 16:01 Seegras

msasn1 affected too.

soredake avatar Mar 09 '21 15:03 soredake

FWIW I can confirm this is still an issue particularly with "amstream". My fix so far has been to roll Proton back to 5.0 so I can run winetricks to fix video playback for a number of games.

PlaidPhantom avatar Jun 14 '21 04:06 PlaidPhantom

I have the same issue and @mmbossoni 's workaround is working. I was trying to install dotnet472 ole32 gdiplus in a proton 6.19 game prefix

fuzunspm avatar Oct 18 '21 23:10 fuzunspm

It will fail to do cp if the destination is a symlink if the symlink point to a file that you don't have permission to write. If you do have permission, it will overwrite the target of the symlink, which in this case will overwrite something in the proton or wine installation rather than the prefix, which is probably not what you want. Maybe the script should try removing the destination file before copying?

patlefort avatar Nov 16 '21 06:11 patlefort

The fix should be at cabextract side: https://github.com/kyz/libmspack/issues/42

truboxl avatar Dec 30 '21 13:12 truboxl

@Nik7413, my workaround for the time being is find out everything I want to install using winetricks, deleting the prefix and running winetricks before hitting the play button. That way winetricks runs without any problem.

An imo easier workaround is to let Steam and Proton create the wineprefix, then simply delete the problematic symbolic links in it. Winetricks (via Protontricks as in the issues referencing this) then runs just fine. I even got the the game I wanted (Magellania) running \o/

Bunny5390 avatar Jul 13 '22 06:07 Bunny5390

This is also an issue with vcrun2017

tralph3 avatar Oct 08 '22 18:10 tralph3

This really should be fixed on the cabextract side. There are currently ~200 calls to cabextract that would need to be investigated to 'fix' this (hackily) on the winetricks side.

austin987 avatar Oct 09 '22 08:10 austin987

This really should be fixed on the cabextract side. There are currently ~200 calls to cabextract that would need to be investigated to 'fix' this (hackily) on the winetricks side.

With this being said, is there any pressure that Winetricks can put on the cabextract team to get this resolved? There is a PR that was started to fix this issue (https://github.com/kyz/libmspack/pull/43) and it's not been merged yet. The PR is just shy of 2 years old, and the issue is still plaguing winetricks installs today.

Coolguy3289 avatar Dec 09 '22 02:12 Coolguy3289

I don't think winetricks has any leverage here. In my blunt opinion, if anything, Proton/Valve/Steam should be the one taking the initiative here. Given that this only affects their fork, and that they're funding FOSS work, in my view, it makes sense for them to (have someone) send a PR adding symlink support.

I've (previously) upvoted comments on the related libmspack issue, but as I said, it's a separate project and I don't have any influence over it. Affected users are welcome to subscribe themselves (or, ideally, will send a PR themselves ;) ).

austin987 avatar Dec 10 '22 08:12 austin987

Cabextract has released a new version, 1.10 that has support for keeping symlinks. If you're using Proton 5.13 and can get the newer cabextract, please try https://github.com/Winetricks/winetricks/pull/2025 and see if that fixes the issue.

austin987 avatar Feb 15 '23 01:02 austin987

I've installed the latest cabextract, but the Flatpak protontricks is not using it. I think it brings its own version. Thankfully, using system package Protontricks with the STEAM_DIR environment variable set to the Flatpak Steam installation directory works.

thelabcat avatar Apr 16 '23 23:04 thelabcat