https://bugs.winehq.org/show_bug.cgi?id=47100
Bug ID: 47100 Summary: Simple command that needs CreateSymbolicLinkW doesn`t work anymore in Staging-4.7 Product: Wine-staging Version: 4.6 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: xerox.xerox2000x@gmail.com CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
Hi, I noticed that the patchset in Staging for CreateSymbolicLinkW has been updated.
Just creating this bug to let you know that the simple command from comment #4: https://bugs.winehq.org/show_bug.cgi?id=44948#c4 doesn`t work anymore.
I have a compiled recent version lying here ( wine-4.3-339-g865d4c3c72 (Staging)). There it seems to wok fine.
The command from comment #4 in one liner:
cd $(mktemp -d) && /media/louis/00e587ff-1035-4ec8-8d1f-b69d3527589a/wine-staging4.3/wine64-build/wine cmd /C "mklink foo bar" && stat foo
000b:fixme:winediag:start_process Wine Staging 4.3 is a testing version containing experimental patches. 000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
File: foo -> /home/louis/.wine/dosdevices/z:/tmp/tmp.8TxcDBiOH7/bar Size: 54 Blocks: 0 IO Block: 4096 symbolic link Device: 821h/2081d Inode: 1048736 Links: 1 Access: (0777/lrwxrwxrwx) Uid: ( 1000/ louis) Gid: ( 1000/ louis) Access: 2019-04-29 21:56:16.530708099 +0200 Modify: 2019-04-29 21:56:16.530708099 +0200 Change: 2019-04-29 21:56:16.530708099 +0200
in current Staging 4.7:
cd $(mktemp -d) && /opt/wine-staging/bin/wine cmd /C "mklink foo bar" && stat foo
000b:fixme:winediag:start_process Wine Staging 4.7 is a testing version containing experimental patches. 000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org. Failed to open 'foo'
stat: cannot stat 'foo': No such file or directory
If I remember correctly running Office365 installer with Staging was enough to avoid manually copying files to correct locations. I did not yet test if that is broken too now in Staging-4.7, will do later (takes quite some time). Just reporting this simple example for now.
https://bugs.winehq.org/show_bug.cgi?id=47100
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |erich.e.hoover@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=47100
--- Comment #1 from Erich E. Hoover erich.e.hoover@gmail.com --- I'm looking into a possibly related issue at the moment, does it work if the destination exists?
https://bugs.winehq.org/show_bug.cgi?id=47100
--- Comment #2 from Louis Lenders xerox.xerox2000x@gmail.com --- Hi Eric,
I'm looking into a possibly related issue at the moment, does it work if the >destination exists?do you mean like below?
Do you mean like below? It makes a difference apparently but it looks weird to me: File: foo -> .///././/////////////////////////.//.//bar
Commands issued:
louis@debian:~$ cd $(mktemp -d) louis@debian:/tmp/tmp.RbSb9zue4d$ touch /home/louis/.wine/dosdevices/z:/tmp/tmp.RbSb9zue4d/bar
louis@debian:/tmp/tmp.RbSb9zue4d$ /opt/wine-staging/bin/wine cmd /C "mklink foo bar" 000b:fixme:winediag:start_process Wine Staging 4.7 is a testing version containing experimental patches. 000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
louis@debian:/tmp/tmp.RbSb9zue4d$ stat foo File: foo -> .///././/////////////////////////.//.//bar Size: 42 Blocks: 0 IO Block: 4096 symbolic link Device: 801h/2049d Inode: 1048638 Links: 1 Access: (0777/lrwxrwxrwx) Uid: ( 1000/ louis) Gid: ( 1000/ louis) Access: 2019-04-30 09:06:20.557608527 +0200 Modify: 2019-04-30 09:06:20.557608527 +0200 Change: 2019-04-30 09:06:20.557608527 +0200 Birth: -
louis@debian:/tmp/tmp.RbSb9zue4d$ ls -al total 8 drwx------ 2 louis louis 4096 Apr 30 09:06 . drwxrwxrwt 14 root root 4096 Apr 30 09:05 .. -rw-r--r-- 1 louis louis 0 Apr 30 09:05 bar lrwxrwxrwx 1 louis louis 42 Apr 30 09:06 foo -> .///././/////////////////////////.//.//bar
https://bugs.winehq.org/show_bug.cgi?id=47100
--- Comment #3 from Erich E. Hoover erich.e.hoover@gmail.com --- (In reply to Louis Lenders from comment #2)
I'm looking into a possibly related issue at the moment, does it work if the >destination exists?
Do you mean like below? It makes a difference apparently but it looks weird to me: File: foo -> .///././/////////////////////////.//.//bar ...
Yes, that is exactly what I mean. It looks like I made a mistake in validating the destination path and am currently requiring it to exist before it will make a symlink/junction point. If you wouldn't mind testing, you should be able to fix it by replacing this line in FILE_CreateSymlink (dlls/ntdll/file.c): if ((status = wine_nt_to_unix_file_name( &nt_dest, &unix_dest, FILE_OPEN, FALSE ))) with these two: status = wine_nt_to_unix_file_name( &nt_dest, &unix_dest, 0, FALSE ); if (status != STATUS_SUCCESS && status != STATUS_NO_SUCH_FILE)
The reason it looks "weird" is that it is encoding the Reparse Tag into the symlink as "binary" (no period = 0, period = 1). This allows us to tell the difference between a Junction Point (IO_REPARSE_TAG_MOUNT_POINT) and an NT Symlink (IO_REPARSE_TAG_SYMLINK). This wouldn't matter so much if the format of the returned data was the same, but the two reparse types return incompatible structures.
https://bugs.winehq.org/show_bug.cgi?id=47100
--- Comment #4 from Louis Lenders xerox.xerox2000x@gmail.com --- Hi, I saw patchset was updated again, so gave it another try. It seems to work fine now.
I also tried Office365 installer (so with today`s Staging). After installation I have :
lrwxrwxrwx 1 louis louis 156 May 1 11:34 AppvIsvSubsystems32.dll -> '///././/////////////////////////.//.///home/louis/.winemsoffweg/dosdevices/c:/Program Files/Common Files/Microsoft Shared/ClickToRun/AppvIsvSubsystems32.dll' lrwxrwxrwx 1 louis louis 142 May 1 11:34 C2R32.dll -> '///././/////////////////////////.//.///home/louis/.winemsoffweg/dosdevices/c:/Program Files/Common Files/Microsoft Shared/ClickToRun/C2R32.dll'
When I try to start WINWORD I get however:
0009:err:module:import_dll Loading library AppVIsvSubsystems32.dll (which is needed by L"C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE") failed (error c0000020). 0009:err:module:LdrInitializeThunk Importing dlls for L"C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE" failed, status c0000135
Sid-note: I used vanilla wine to try run WINWORD, because with Staging I get the "IOPL not enabled" bug...
https://bugs.winehq.org/show_bug.cgi?id=47100
--- Comment #5 from Erich E. Hoover erich.e.hoover@gmail.com --- (In reply to Louis Lenders from comment #4)
... lrwxrwxrwx 1 louis louis 156 May 1 11:34 AppvIsvSubsystems32.dll -> '///././/////////////////////////.//.///home/louis/.winemsoffweg/dosdevices/ c:/Program Files/Common Files/Microsoft Shared/ClickToRun/AppvIsvSubsystems32.dll' ... When I try to start WINWORD I get however:
0009:err:module:import_dll Loading library AppVIsvSubsystems32.dll (which is needed by L"C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE") failed (error c0000020). ...
1) What folder are you listing? 2) Does the link point to the correct place? (does the destination exist?) 3) Did this work before?
https://bugs.winehq.org/show_bug.cgi?id=47100
--- Comment #6 from Louis Lenders xerox.xerox2000x@gmail.com --- \
- What folder are you listing?
- Does the link point to the correct place? (does the destination exist?)
- Did this work before?
1) pwd /home/louis/.winemsoffweg/drive_c/Program Files/Microsoft Office/root/Office16 louis@debian:~/.winemsoffweg/drive_c/Program Files/Microsoft Office/root/Office16$
2) The destination exists but is 0 bytes (????):
l-rw-r--r-- 1 louis louis 0 May 1 14:24 AppvIsvSubsystems32.dll
3) I`ll have to check if it worked before. As I said , i thougt to remember that it worked in earlier Staging versions , but I`ll have to recheck that.
I think for now best is to resolve this one as fixed, as this was about the simple command.
If I find that it worked before I`ll open a new bugreport, and add you to it (if you don`t mind), ok?
https://bugs.winehq.org/show_bug.cgi?id=47100
Louis Lenders xerox.xerox2000x@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Distribution|--- |Debian Fixed by SHA1| |7d9b7bbdf514cfe1b268329d5e2 | |666f700f746fe Status|NEW |RESOLVED
--- Comment #7 from Louis Lenders xerox.xerox2000x@gmail.com --- So resolving this one. I`ll open new one for Office 365 (if necessary) Thankd Erich for fixing
cd $(mktemp -d) && /media/louis/00e587ff-1035-4ec8-8d1f-b69d3527589a/wine-staging4.7/wine64-build/wine cmd /C "mklink foo bar" && stat foo 000b:fixme:winediag:start_process Wine Staging 4.7 is a testing version containing experimental patches. 000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org. wine: cannot find L"C:\windows\system32\winemenubuilder.exe" 000b:err:wineboot:process_run_key Error running cmd L"C:\windows\system32\winemenubuilder.exe -a -r" (2). 0017:fixme:advapi:RegisterEventSourceW ((null),L"AdobeARMservice"): stub 0017:fixme:advapi:ReportEventW (0xcafe4242,0x0004,0x0000,0x00000000,(nil),0x0001,0x00000000,0x73fc2c,(nil)): stub 0017:fixme:advapi:DeregisterEventSource (0xcafe4242) stub File: foo -> .///././/////////////////////////.//.//bar Size: 42 Blocks: 0 IO Block: 4096 symbolic link Device: 821h/2081d Inode: 1048642 Links: 1 Access: (0777/lrwxrwxrwx) Uid: ( 1000/ louis) Gid: ( 1000/ louis) Access: 2019-05-01 17:28:39.651227051 +0200 Modify: 2019-05-01 17:28:39.651227051 +0200 Change: 2019-05-01 17:28:39.651227051 +0200 Birth: -
https://bugs.winehq.org/show_bug.cgi?id=47100
--- Comment #8 from Louis Lenders xerox.xerox2000x@gmail.com --- Just to complete this bugreport:
Reinstalled office with latest wine-staging (from today) and (though installer seemed to hang at end) the links (and files) are created ok apparently. I was able to start WINWORD without manually copying over the two files mentioned in appdb howto***:
So this seems also fixed for Office 365 in current Staging
***:
8. Copy missing DLLs (AppvIsvSubsystems32 & C2R32)
cp -iv "${WINEPREFIX:-~/.wine}/drive_c/Program Files/Common Files/Microsoft Shared/ClickToRun/AppvIsvSubsystems32.dll" "${WINEPREFIX:-~/.wine}/drive_c/Program Files/Microsoft Office/root/Office16/AppvIsvSubsystems32.dll" cp -iv "${WINEPREFIX:-~/.wine}/drive_c/Program Files/Common Files/Microsoft Shared/ClickToRun/C2R32.dll" "${WINEPREFIX:-~/.wine}/driv
https://bugs.winehq.org/show_bug.cgi?id=47100
--- Comment #9 from Erich E. Hoover erich.e.hoover@gmail.com --- (In reply to Louis Lenders from comment #7)
So resolving this one. I`ll open new one for Office 365 (if necessary) Thankd Erich for fixing ...
Happy to help, thanks for testing!
(In reply to Louis Lenders from comment #8)
... Reinstalled office with latest wine-staging (from today) and (though installer seemed to hang at end) the links (and files) are created ok apparently. I was able to start WINWORD without manually copying over the two files mentioned in appdb howto***: ...
That's great! I'm trying to provide a comprehensive solution that fixes all the junction point/NT symlink issues, so it's good to hear that this fixes that problem as well.
https://bugs.winehq.org/show_bug.cgi?id=47100
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Fixed Staging issue.