Closed juanjosegarciaripoll closed 1 year ago
I have the same issue. And if I try to run it again, it leads to this permission error because it tries to rebuild the bin files. Even if I go in and leave msys installed and run pacman-key --init
manually it still leads to the same problem.
That is very concerning. I'll be rerunning it again in a sandbox; I hope it is just a GPG keyserver which is temporarily down. If a keyserver is still down (after 12 hours), I'll have to make another release that skips the signing verifications (which sadly lessens the security but may be unavoidable).
@tensor-programming When you rerun you will need to first either a) go to Add Remove Programs to remove Diskuv OCaml, or b) run the uninstaller (the latest is at https://github.com/diskuv/dkml-installer-ocaml/releases/tag/v1.1.0_r2). The automatic uninstall feature will be coming after the complete transition to winget install Diskuv.OCaml
.
In a Windows Sandbox I was able to get past your GPG steps. convert -delay 250 Screenshot_20230103_*.png -loop 0 installer-ISSUE25.gif
:
Hopefully that means it was just a temporary outage of the key servers. Please Add Remove Programs, or use the uninstaller. Then rerun the installer.
If you experience the same problem, please tell me approximately where you are located (ex. country). I can try to run a server in that region or country to see if it is a networking or route selection issue.
After a failed installation, the uninstaller does not work as expected. It does not delete the DiskuvOCaml folders and it does not uninstall the Visual Studio components (which are redundant with the ones I have and use, from 2022). I am afraid this could interfere with later attempts at reinstalling the software
That is very concerning. I'll be rerunning it again in a sandbox; I hope it is just a GPG keyserver which is temporarily down. If a keyserver is still down (after 12 hours), I'll have to make another release that skips the signing verifications (which sadly lessens the security but may be unavoidable).
@tensor-programming When you rerun you will need to first either a) go to Add Remove Programs to remove Diskuv OCaml, or b) run the uninstaller (the latest is at https://github.com/diskuv/dkml-installer-ocaml/releases/tag/v1.1.0_r2). The automatic uninstall feature will be coming after the complete transition to
winget install Diskuv.OCaml
.
I tried the following; an instance where I didn't do anything with the pervious installation (that led to the permission issues that I described above), an instance where I deleted everything but the msys2 installation that the installer had added (and I manually called pacman-key --init
which still ran into the gpg failures), an instance where I used the downloaded uninstaller (didn't remove the VS components and still led to the gpg issue), and finally an instance where I manually went through and deleted everything after used the uninstaller (still led to the gpg issue). I also removed my own msys2 install which I had globally available on the PATH
(it seemed like for some steps the script was trying to use it instead of the one that it had installed).
You said you were able to get past the gpg issues in a Windows Sandbox but I am still seeing them today some 9-10 hours later. Is there anything else I can try here that might either a) bypass the gpg servers or b) refresh the gpg repos? My thought is that there is something that is still being cached here that is leading to the error even though the servers should be fine.
This is what the failure looks like currently:
2023-01-05T00:25:42.829Z [MSYS2] bash -lc true
2023-01-05T00:25:43.431Z [MSYS2] sed -i s/^CheckSpace/#CheckSpace/g /etc/pacman.conf
2023-01-05T00:25:43.655Z [MSYS2] pacman -Syu --noconfirm
warning: Public keyring not found; have you run 'pacman-key --init'?
error: mingw32: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: mingw64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: ucrt64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: clang64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: msys: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
:: Synchronizing package databases...
mingw32 downloading...
mingw64 downloading...
ucrt64 downloading...
clang64 downloading...
msys downloading...
error: mingw32: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: mingw64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: ucrt64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: clang64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: msys: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))
2023-01-05T00:25:51.684Z [MSYS2] pacman -Syu --noconfirm
warning: Public keyring not found; have you run 'pacman-key --init'?
error: mingw32: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: mingw64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: ucrt64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: clang64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: msys: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
:: Synchronizing package databases...
mingw32 downloading...
mingw64 downloading...
ucrt64 downloading...
clang64 downloading...
msys downloading...
error: mingw32: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: mingw64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: ucrt64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: clang64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: msys: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: keyring is not writable
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))
Setup did not complete because an error occurred.
MSYS2 command failed! Exited with 1. Command was: env MSYSTEM=CLANG64 MSYSTEM_PREFIX=/clang64 HOME=/home/tensor PATH=/clang64/bin:/usr/bin:/bin env PATH=/c/users/tensor/scoop/shims:/clang64/bin:/usr/bin:/bin DKML_TMP_PARENTDIR=/c/Users/tensor/AppData/Local/Temp/PA937E~1/0 pacman -Syu --noconfirm
at Invoke-MSYS2Command, C:\Users\tensor\AppData\Local\Temp\7z640F8384\sg\network-ocamlcompiler\windows_x86_64\dkmldir\vendor\drd\src\windows\UnixInvokers\UnixInvokers.psm1: line 165
at Invoke-MSYS2CommandWithProgress, C:\Users\tensor\AppData\Local\Temp\7z640F8384\sg\network-ocamlcompiler\windows_x86_64\setup-userprofile.ps1: line 856
at <ScriptBlock>, C:\Users\tensor\AppData\Local\Temp\7z640F8384\sg\network-ocamlcompiler\windows_x86_64\setup-userprofile.ps1: line 1003
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1
[Advanced] MSYS2 commands can be run with: C:\Users\tensor\AppData\Local\Programs\DISKUV~1\tools\MSYS2\msys2_shell.cmd
Bug Reports can be filed at https://github.com/diskuv/dkml-installer-ocaml/issues
Please copy the error message and attach the log file available at
C:\Users\tensor\AppData\Local\Programs\DISKUV~1\setup-userprofile.full.log
FATAL [a0d16230]. A transient failure occurred.
Root cause: The conformant command had exit code 1:
C:\Users\tensor\AppData\Local\Temp\7z640F8384\sg\network-ocamlcompiler\windows_x86_64\setup-userprofile.bat
-AllowRunAsAdmin
-InstallationPrefix
C:\Users\tensor\AppData\Local\Programs\DISKUV~1
-MSYS2Dir
C:\Users\tensor\AppData\Local\Programs\DISKUV~1\tools\MSYS2
-OpamExe
C:\Users\tensor\AppData\Local\Programs\DISKUV~1\bin\OPAM-R~1.EXE
-DkmlPath
C:\Users\tensor\AppData\Local\Temp\7Z640F~1\sg\NETWOR~1\WINDOW~1\dkmldir
-GlobalCompileDir
C:\Users\tensor\AppData\Local\Temp\7Z640F~1\sg\STAGIN~1\generic
-NoDeploymentSlot -DkmlHostAbi
windows_x86_64 -TempParentPath
C:\Users\tensor\AppData\Local\Temp\PA937E~1
-SkipProgress
>>> A transient failure occurred. <<<
dkml-package.bc: [ERROR] FATAL [5f927a8b].
A transient failure occurred.
Root cause: The command had exit code 20:
C:\Users\tensor\AppData\Local\Temp\7z640F8384\bin\dkml-install-user-runner.exe
install-user-network-ocamlcompiler --verbosity=info
--color=always --prefix
C:\Users\tensor\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\tensor\AppData\Local\Temp\7z640F8384\sg
>>> A transient failure occurred. <<<
Seems identical to the issue described by the OP.
I tried the following; an instance where I didn't do anything with the pervious installation (that led to the permission issues that I described above), an instance where I deleted everything but the msys2 installation that the installer had added (and I manually called pacman-key --init which still ran into the gpg failures), an instance where I used the downloaded uninstaller (didn't remove the VS components and still led to the gpg issue), and finally an instance where I manually went through and deleted everything after used the uninstaller (still led to the gpg issue). I also removed my own msys2 install which I had globally available on the PATH (it seemed like for some steps the script was trying to use it instead of the one that it had installed).
You didn't need to take your time with all that; hopefully you didn't take too much time. I only needed you to follow the instructions I gave, which was to use the uninstaller I provided and rerun the installer.
You said you were able to get past the gpg issues in a Windows Sandbox but I am still seeing them today some 9-10 hours later. Is there anything else I can try here that might either a) bypass the gpg servers or b) refresh the gpg repos? My thought is that there is something that is still being cached here that is leading to the error even though the servers should be fine.
[me] If you experience the same problem, please tell me approximately where you are located (ex. country). I can try to run a server in that region or country to see if it is a networking or route selection issue.
Right now it is fastest that I get the information asked earlier: please tell me approximately where you are located (ex. country). While I'm thinking about it, one more question: Are you running the installer on a managed (corporate) Windows PC, or behind a corporate/government/university firewall? If so, which one?
(I doubt it is a caching problem on disk, although I won't rule it out yet. MSYS2's gpg keeps its key chains in MSYS2 folders (ex. see https://www.msys2.org/docs/faq/#how-can-i-make-msys2pacman-trust-my-companys-custom-tls-ca-certificate), and the MSYS2 folder is wiped out by the installer. In contrast, the under-resourced, under-staffed and spam-ridden OpenPGP servers are known to be flaky. I would suggest you let me do the root causing, but if you are really really interested in doing it yourself, start by looking at https://www.msys2.org/news/#2020-06-29-new-packagers, https://www.msys2.org/docs/updating/#potential-issues and https://github.com/msys2/MSYS2-packages/issues/2343#issuecomment-780121556)
Seems identical to the issue described by the OP.
Of course. Regardless, I was worried and am still worried that you may get distracted with extraneous comments in this ticket. We've already lost the time I had earlier today to root-cause the issue (ie. spin up a test server in your region, check which GPG servers were closest to you, etc.) and, if the root cause was found, to combine it with a patch release I'm finishing up today.
You didn't need to take your time with all that; hopefully you didn't take too much time. I only needed you to follow the instructions I gave, which was to use the uninstaller I provided and rerun the installer.
This is stuff I did on my own when I first encountered the problem prior to coming to the repo to file the issue (or make the comment).
Right now it is fastest that I get the information asked earlier: please tell me approximately where you are located (ex. country). While I'm thinking about it, one more question: Are you running the installer on a managed (corporate) Windows PC, or behind a corporate/government/university firewall? If so, which one?
Sorry I didn't respond earlier to this query, the 2nd issue confused the matter more in that regard.
I am in the US, on the east coast and this PC is not behind any kind of firewall or anything of that sort (Also on win 11 x64 if that matters). I was able to open my own instance of msys2 and even the one installed by the installer and run the pacman commands just fine. Its very unlikely that this is a location specific problem given that fact. The issue seems to be isolated on the instance that is created in the TMP folders during the installation; though I don't use msys2 that often so I can't really say much on the subject.
Normally I run Ocaml on WSL2 but I have been vaguely aware of the Ocaml 5 and Opam windows migration that has been going over the past couple of years. In the case of this installer, this is my first time using it as I was not aware of it until now. Not sure if that helps, but it was an entirely fresh installation.
I'm going to simplify the situation and resolve this and related problems by:
Status: This ticket is currently the top priority
waiting for this
The replacement for MSYS2 "base" is ready: https://gitlab.com/diskuv-ocaml/distributions/msys2-dkml-base#msys2-dkml-base
Still outstanding:
Status: Testing prerelease
This problem is only for v1.2.0-prerel7. It was fixed in v1.2.0-prerel8
The LSP server is pre-installed in the dkml
switch. That lets you use VS Code without creating your own switch.
However, if you do create a new switch with the official dkml init
command, then you will need to unpin packages for LSP server to be available:
opam pin remove omd --no-action
opam install ocaml-lsp-server
Possible solution: Get rid of incorrect omd.2.0.0~alpha2 pin
Typically people are not installing MSYS2 packages manually, especially now that msys2-dkml-base (link below) is available for common MSYS2 packages. But because now there is a fully offline installation for MSYS2, if you want to add more packages to your own PC you will first have to populate the GPG keys that MSYS2 requires for verifying Internet downloads:
with-dkml pacman-key --init
with-dkml pacman-key --populate
with-dkml pacman -Syy
That is documented with some more details in https://gitlab.com/diskuv-ocaml/distributions/msys2-dkml-base#usage
Possible solution: Automatically do those above commands immediately after installation but before first use. That way the installation can fail but you still have a functional, easy-to-fix system.
Status: Testing complete
The prerelease is available at:
These are unsigned so it is doubly important to temporarily disable your antivirus while installing.
Also be aware of the Errata I posted above.
Status: Testing complete
The prerelease is available at:
- v1.2.0-prerel7 Installer: unsigned-diskuv-ocaml-windows_x86_64-i-1.1.0.exe
- v1.2.0-prerel7 Uninstaller: unsigned-diskuv-ocaml-windows_x86_64-u-1.1.0.exe
These are unsigned so it is doubly important to temporarily disable your antivirus while installing.
Also be aware of the Errata I posted above.
Got new error here.
config.status: creating Makefile.build_config
config.status: creating Makefile.config
config.status: creating stdlib/sys.ml
config.status: creating manual/src/version.tex
config.status: creating manual/src/html_processing/src/common.ml
config.status: creating tools/eventlog_metadata
config.status: creating runtime/caml/m.h
config.status: creating runtime/caml/s.h
config.status: creating runtime/caml/version.h
config.status: executing libtool commands
Setup did not complete because an error occurred.
MSYS2 command failed! Exited with 127. Command was: env MSYSTEM=CLANG64 MSYSTEM_PREFIX=/clang64 HOME=/home/aison PATH=/clang64/bin:/usr/bin:/bin env PATH=/c/Users/aison/scoop/shims:/clang64/bin:/usr/bin:/bin DKML_TMP_PARENTDIR=/c/Users/aison/AppData/Local/Temp/PA95DA~1/0 env DiskuvOCamlVarsVersion=2 DiskuvOCamlHome='/c/Users/aison/AppData/Local/Programs/DISKUV~1' DiskuvOCamlBinaryPaths='/c/Users/aison/AppData/Local/Programs/DISKUV~1/usr/bin:/c/Users/aison/AppData/Local/Programs/DISKUV~1/bin' DiskuvOCamlMSYS2Dir='/' DiskuvOCamlDeploymentId='v-1.2.0-prerel7;ocaml-4.14.0;opam-2.2.0~alpha0~20221228;inotify-36d18f3dfe042b21d7136a1479f08f0d8e30e2f9;msys2-999CED2C8F5FF6A2;docker-99C8BC9860D703EB;bins-952D9673A6642899;stubs-4E6958B274EAB043;toplevels-80941AA1C64DA259' DiskuvOCamlVersion='1.2.0-prerel7' WITHDKML_ENABLE=OFF OCAMLLIB= TOPDIR=/c/Users/aison/AppData/Local/Temp/7Z5A82~1/sg/NETWOR~1/WINDOW~1/dkmldir/vendor/drc/all/emptytop sh /c/Users/aison/AppData/Local/Temp/7z5A82A6D4/sg/network-ocamlcompiler/windows_x86_64/install-ocaml.sh /c/Users/aison/AppData/Local/Temp/7Z5A82~1/sg/NETWOR~1/WINDOW~1/dkmldir 15553b77175270d987058b386d737ccb939e8d5a windows_x86_64 /c/Users/aison/AppData/Local/Programs/DISKUV~1 --disable-imprecise-c99-float-ops
at Invoke-MSYS2Command, C:\Users\aison\AppData\Local\Temp\7z5A82A6D4\sg\network-ocamlcompiler\windows_x86_64\dkmldir\vendor\drd\src\windows\UnixInvokers\UnixInvokers.psm1: line 165
at Invoke-MSYS2CommandWithProgress, C:\Users\aison\AppData\Local\Temp\7z5A82A6D4\sg\network-ocamlcompiler\windows_x86_64\setup-userprofile.ps1: line 863
at <ScriptBlock>, C:\Users\aison\AppData\Local\Temp\7z5A82A6D4\sg\network-ocamlcompiler\windows_x86_64\setup-userprofile.ps1: line 1123
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1
[Advanced] MSYS2 commands can be run with: C:\Users\aison\AppData\Local\Programs\DISKUV~1\tools\MSYS2\msys2_shell.cmd
Bug Reports can be filed at https://github.com/diskuv/dkml-installer-ocaml/issues
Please copy the error message and attach the log file available at
C:\Users\aison\AppData\Local\Programs\DISKUV~1\setup-userprofile.full.log
FATAL [a0d16230]. A transient failure occurred.
Root cause: The conformant command had exit code 1:
C:\Users\aison\AppData\Local\Temp\7z5A82A6D4\sg\network-ocamlcompiler\windows_x86_64\setup-userprofile.bat
-AllowRunAsAdmin
-InstallationPrefix
C:\Users\aison\AppData\Local\Programs\DISKUV~1
-MSYS2Dir
C:\Users\aison\AppData\Local\Programs\DISKUV~1\tools\MSYS2
-OpamExe
C:\Users\aison\AppData\Local\Programs\DISKUV~1\bin\OPAM-R~1.EXE
-DkmlPath
C:\Users\aison\AppData\Local\Temp\7Z5A82~1\sg\NETWOR~1\WINDOW~1\dkmldir
-GlobalCompileDir
C:\Users\aison\AppData\Local\Temp\7Z5A82~1\sg\STAGIN~1\generic
-NoDeploymentSlot -DkmlHostAbi
windows_x86_64 -TempParentPath
C:\Users\aison\AppData\Local\Temp\PA95DA~1
-SkipProgress -SkipMSYS2Update
>>> A transient failure occurred. <<<
dkml-package.bc: [ERROR] FATAL [5f927a8b].
A transient failure occurred.
Root cause: The command had exit code 20:
C:\Users\aison\AppData\Local\Temp\7z5A82A6D4\bin\dkml-install-user-runner.exe
install-user-network-ocamlcompiler --verbosity=info
--color=always --prefix
C:\Users\aison\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\aison\AppData\Local\Temp\7z5A82A6D4\sg
>>> A transient failure occurred. <<<
That spot where it failed looks like antivirus or malware protection.
That spot where it failed looks like antivirus or malware protection.
- Did you disable antivirus/malware/Defender/etc before installing? If it can’t be disabled or don’t know how to , you’ll have to schedule a session with me (open a new issue).
- If you just missed my earlier warning about antivirus, then run the uninstaller, disable your antivirus, and then run the installer.
- Otherwise this is a brand new problem unrelated to GpG keys. Opening a new issue would be warranted .
I had disabled but still happened. I will open a new issue
@juanjosegarciaripoll @tensor-programming : I believe this pacman issue is fixed with the prerelease. If there are further issues (pacman related or not), schedule an initial session with me at https://calendly.com/diskuv/30-minute-dkml-installation.
Thanks.
Also, if anyone else is using the Windows package manager "Scoop" (which is placing a conflicting UNIX bash shell in the PATH), please say so in AisonSu's ticket.
Sorry I lost track of this issue over the past weeks. I have been able to use the installer with 1.2 since that time though without incident. I did find a small issue from before where I had to remove my old .opam
folder and the esy
installation that I had from yarn
but apart from that, everything seems to work as expected. I do also use scoop though not for this...
@tensor-programming Any chance you remember what was causing the esy
problem? (Does esy
put binaries in the PATH, install anything to C:\WINDOWS, etc.?) I'm trying to add as many defensive safeguards as possible to the installer, and the more I know the more safeguards I can put in place. If you don't remember the exact issue, do you think I can replicate what you saw by just doing npm install -g esy
?
Closing due to inactivity.
Installer downloaded today, Jan 3rd. It seems that the MSYS2 installation created by Diskuv is corrupt.
Content of log file