Skip to content
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

default install msys fails with "missing database" #1283

Closed
stephe-ada-guru opened this issue Jan 1, 2023 · 4 comments
Closed

default install msys fails with "missing database" #1283

stephe-ada-guru opened this issue Jan 1, 2023 · 4 comments

Comments

@stephe-ada-guru
Copy link

I just installed Alire 1.2.1 on a virgin PC (Windows 11, no previous gnat or msys install). The Alire installer ran fine, and clicking the icon opened a PowerShell window.

I typed "alr get emacs_ada_mode". It prompted about installing msys; I said yes.

That failed partway thru, something about a missing database. Running the same command again did not fix it. I managed to fix the problem by starting an mingw64 window and installing git (and later make).

I suspect the problem is that some path is not updated after the first part of the msys install; it's trying to run msys update and failing.

Then tried "alr get emacs_ada_mode" again; it failed because no toolchain was selected. So I did "alr toolchain --select", accepted the defaults; it deployed gnat 22.1 and gprbuild 22.1.

Then "alr get emacs_ada_mode" succeeded. The build failed on missing "make"; installing that via the mingw64 window fixed that. Then emacs_ada_mode built.

@Fabien-Chouteau
Copy link
Member

It probably means that we have to update the msys2 installer.
Can you try again with the procedure below procedure?

  • First, set the new installer in config:
$ alr config --global --set msys2.installer "msys2-x86_64-20221216.exe"
$ alr config --global --set msys2.installer_url "https://github.com/msys2/msys2-installer/releases/download/2022-12-16/msys2-x86_64-20221216.exe"
  • Second, remove the installed msys2, it should be somewhere in "C:/Users//.cache/alire/msys64"

  • Third, run Alire again (e.g. alr get emacs_ada_mode) and answer yes to the installation question.

@stephe-ada-guru
Copy link
Author

I think it got farther, but still fails. attached is a log of the install. i dont have emacs on this machine, so it is not edited -- skip the first few commands
Alireinstall msys.txt

@pjljvandelaar
Copy link
Contributor

Same problem with my github actions

[44533] \x1B[H\x1B[2J\x1B[3J\n\n###################################################################\n#                                                                 #\n#                                                                 #\n#                   C   A   U   T   I   O   N                     #\n#                                                                 #\n#                  This is first start of MSYS2.                  #\n#       You MUST restart shell to apply necessary actions.        #\n#                                                                 #\n#                                                                 #\n###################################################################\n\n\n\x1B[H\x1B[2J\x1B[3J
[44534] Done
[44539] Writing maintenance tool: "C:/Users/runneradmin/.cache/alire/msys64/uninstall.exe.new"
[44539] Writing maintenance tool.
[44609] Wrote permissions for maintenance tool.
[44709] Maintenance tool hard restart: false.
[44720] Installation finished!
[44720] Components installed successfully.
:: Synchronizing package databases...
 mingw32 downloading...
 mingw64 downloading...
 ucrt64 downloading...
 clang32 downloading...
 clang64 downloading...
 msys downloading...
:: Starting core system upgrade...
warning: resolving dependencies...
terminate other MSYS2 programs before proceeding
looking for conflicting packages...

Packages (6) bash-5.2.009-1  filesystem-2022.01-7  mintty-1~3.6.3-1  msys2-runtime-3.4.3-4  pacman-6.0.1-28  pacman-mirrors-20221016-1

Total Download Size:   11.64 MiB
Total Installed Size:  56.88 MiB
Net Upgrade Size:      -0.12 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 pacman-6.0.1-28-x86_64 downloading...
 msys2-runtime-3.4.3-4-x86_64 downloading...
 bash-5.2.009-1-x86_64 downloading...
 mintty-1~3.6.3-1-x86_64 downloading...
 filesystem-2022.01-7-x86_64 downloading...
 pacman-mirrors-20221016-1-any downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
upgrading bash...
upgrading filesystem...
upgrading mintty...
upgrading msys2-runtime...
upgrading pacman-mirrors...
upgrading pacman...
:: To complete this update all MSYS2 processes including this terminal will be closed. Confirm to proceed [Y/n] 
warning: database file for 'clangarm64' does not exist (use '-Sy' to download)
:: Starting core system upgrade...
 there is nothing to do
:: Starting full system upgrade...
error: failed to prepare transaction (could not find database)

raised ALIRE.CHECKED_ERROR : alire-stored-error:1
[D:\a\Rejuvenation-Ada\Rejuvenation-Ada\alire_install\bin\alr.exe]
0xdc8cdb Semantic_Versioning.Basic.At_Least at alire.adb:251
0xa63c02 Semantic_Versioning.Basic.At_Least at alire-os_lib-subprocess.adb:110
0xa6d7d1 Semantic_Versioning.Basic.At_Least at alire-platforms-current__windows.adb:326
0xa6f6a3 Semantic_Versioning.Basic.At_Least at alire-platforms-current__windows.adb:374
0xa6fbb7 Semantic_Versioning.Basic.At_Least at alire-platforms-current__windows.adb:396
0x403f25 Adainit at b__alr-main.adb:1848
0x404bd1 Main at b__alr-main.adb:2129
0x401423 __tmainCRTStartup at ???
0x40113b mainCRTStartup at ???
[C:\Windows\System32\KERNEL32.DLL]
0x7fffbbfe4dde
[C:\Windows\SYSTEM32\ntdll.dll]
0x7fffbccfe409
ERROR: Command ["pacman", "--noconfirm", "-Su"] exited with code 1
ERROR: alr encountered an unexpected error, re-run with -d for details.
Error: The process 'D:\a\Rejuvenation-Ada\Rejuvenation-Ada\alire_install\bin\alr.exe' failed with exit code 1
    at ExecState._setResult (D:\a\_actions\alire-project\setup-alire\v1\node_modules\@actions\exec\lib\toolrunner.js:592:25)
    at ExecState.CheckComplete (D:\a\_actions\alire-project\setup-alire\v1\node_modules\@actions\exec\lib\toolrunner.js:575:18)
    at ChildProcess.<anonymous> (D:\a\_actions\alire-project\setup-alire\v1\node_modules\@actions\exec\lib\toolrunner.js:469:27)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
Error: The process 'D:\a\Rejuvenation-Ada\Rejuvenation-Ada\alire_install\bin\alr.exe' failed with exit code 1

See my latest commit for more info.

@mosteo
Copy link
Member

mosteo commented Jan 17, 2023

Fixed in #1284

@mosteo mosteo closed this as completed Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants