VirtusLab / scala-cli

Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!)
https://scala-cli.virtuslab.org
Apache License 2.0
551 stars 129 forks source link

VCRuntime not installed with scalacli #660

Open mhammons-ledger opened 2 years ago

mhammons-ledger commented 2 years ago

Version(s)

0.1.1

Describe the bug

Installed on a fresh Windows 10 install, scala-cli complains that vcruntime140_1.dll is absent. If this is needed, then it should be bundled with the installer.

To Reproduce

Create a VM. Install Windows 10 Pro. Install scala-cli. Run it from the terminal. You'll get an error dialog that vcruntime140_1.dll is missing.

Expected behaviour It should run

alexarchambault commented 2 years ago

@mhammons-ledger Do you know how to get Windows VMs without vcruntime140_1.dll, to allow to test fixes for this? AFAIR, AWS Windows images and Microsoft provided VMs both have this file installed out-of-the-box. And it seems it's there on GitHub actions too.

mhammons-ledger commented 2 years ago

I just used a fresh windows 10 installation.

Mark Edgar Hammons II

Le 10 mai 2022 à 15:50, Alexandre Archambault @.***> a écrit :

 @mhammons-ledger Do you know how to get Windows VMs without vcruntime140_1.dll, to allow to test fixes for this? AFAIR, AWS Windows images and Microsoft provided VMs both have this file installed out-of-the-box. And it seems it's there on GitHub actions too.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

--

Les informations contenues dans ce message électronique ainsi que celles contenues dans les documents attachés sont strictement confidentielles et sont destinées à l'usage exclusif du (des) destinataire(s) nommé(s). Toute divulgation, distribution ou reproduction, même partielle, en est strictement interdite sauf autorisation écrite et expresse de l’émetteur. Si vous recevez ce message par erreur, veuillez le notifier immédiatement à son émetteur par retour, et le détruire ainsi que tous les documents qui y sont attachés.

The information contained in this email and in any document enclosed is strictly confidential and is intended solely for the use of the individual or entity to which it is addressed. Partial or total disclosure, distribution or reproduction of its contents is strictly prohibited unless expressly approved in writing by the sender. If you have received this communication in error, please notify us immediately by responding to this email, and then delete the message and its attached files from your system.

tgodzik commented 1 year ago

@mhammons-ledger does this still happen for you?

bishabosha commented 5 months ago

@tgodzik we're using a self-hosted Windows runner for GitHub actions at https://github.com/scala/scala3 and we got this error when testing the native windows launcher for scala-cli:

C:/actions-runner2/_work/scala3/scala3/dist/win-x86_64/target/pack/bin/scala-cli.exe:
error while loading shared libraries: VCRUNTIME140_1.dll: cannot open shared object file: No such file or directory
tgodzik commented 5 months ago

How did you install it? Looks like for winget we add a dependency https://github.com/microsoft/winget-pkgs/blob/a542a28386234cab0c833d5dde54f8e69e87c58e/manifests/v/VirtusLab/ScalaCLI/1.0.6/VirtusLab.ScalaCLI.installer.yaml#L10

Maybe try installing using winget?

bishabosha commented 5 months ago

no we are just directly executing the scala-cli.exe unzipped from scala-cli-x86_64-pc-win32.zip (as would be done if installing with coursier/SDKMAN)

tgodzik commented 5 months ago

Not sure if we can fix that other than making the users install it :/