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

Installing vulkan-sdk fails after Choco upgrades from v2.0.0 to v2.1.0 #3251

Closed
4 tasks done
QuellaZhang opened this issue Jul 4, 2023 · 5 comments
Closed
4 tasks done

Comments

@QuellaZhang
Copy link

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.

What You Are Seeing?

Choco V2.0.0 installed vulkan-sdk successfully.

image

Choco V2.1.0 fails to install vulkan-sdk.

image

What is Expected?

Choco V2.1.0 installs vulkan-sdk successfully.

How Did You Get This To Happen?

  1. Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
  2. "C:\ProgramData\chocolatey\choco.exe" -v
  3. "C:\ProgramData\chocolatey\choco.exe" install -y -f --acceptlicense --allow-empty-checksums --no-progress --stoponfirstfailure vulkan-sdk --version 1.2.182.0

System Details

  • Operating System: Windows Server 2022 Datacenter
  • Windows PowerShell version:
  • Chocolatey CLI Version:
  • Chocolatey Licensed Extension version:
  • Chocolatey License type:
  • Terminal/Emulator:

Installed Packages

"C:\ProgramData\chocolatey\choco.exe" install -y -f --acceptlicense --allow-empty-checksums --no-progress --stoponfirstfailure vulkan-sdk --version 1.2.182.0

Output Log

C:\Windows\system32>"C:\ProgramData\chocolatey\choco.exe" install -y -f --acceptlicense --allow-empty-checksums --no-progress --stoponfirstfailure vulkan-sdk --version 1.2.182.0
Chocolatey v2.1.0
Installing the following packages:
vulkan-sdk
By installing, you accept licenses for the packages.

vulkan-sdk v1.2.182 (forced) [Approved]
vulkan-sdk package files install completed. Performing other installation steps.
Attempt to get headers for https://sdk.lunarg.com/sdk/download/1.2.182/windows/VulkanSDK-1.2.182-Installer.exe failed.
  The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://sdk.lunarg.com/sdk/download/1.2.182/windows/VulkanSDK-1.2.182-Installer.exe'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found."
Downloading vulkan-sdk
  from 'https://sdk.lunarg.com/sdk/download/1.2.182/windows/VulkanSDK-1.2.182-Installer.exe'
ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://sdk.lunarg.com/sdk/download/1.2.182/windows/VulkanSDK-1.2.182-Installer.exe'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found."
This package is likely not broken for licensed users - see https://docs.chocolatey.org/en-us/features/private-cdn.
The install of vulkan-sdk was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\vulkan-sdk\tools\chocolateyinstall.ps1'.
 See log for details.
vulkan-sdk not installed. An error occurred during installation:
 Stopping further execution as vulkan-sdk has failed install.
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 Could not find a part of the path 'C:\ProgramData\chocolatey\lib\vulkan-sdk\.chocolateyPending'.
This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 Could not find a part of the path 'C:\ProgramData\chocolatey\lib\vulkan-sdk\.chocolateyPending'.
Maximum tries of 3 reached. Throwing error.

Chocolatey installed 0/0 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Could not find a part of the path 'C:\ProgramData\chocolatey\lib\vulkan-sdk\.chocolateyPending'.

Additional Context

Correct link: https://sdk.lunarg.com/sdk/download/1.2.182.0/windows/VulkanSDK-1.2.182.0-Installer.exe
Incorrect link: https://sdk.lunarg.com/sdk/download/1.2.182/windows/VulkanSDK-1.2.182-Installer.exe

@QuellaZhang QuellaZhang added the Bug label Jul 4, 2023
@pauby pauby added Package Issue and removed Bug labels Jul 4, 2023
@pauby pauby closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2023
@pauby pauby reopened this Jul 4, 2023
@pauby pauby added Bug and removed Package Issue labels Jul 4, 2023
@TheCakeIsNaOH
Copy link
Member

So in the package script, the url is specified as
$url = "https://sdk.lunarg.com/sdk/download/$($env:ChocolateyPackageVersion)/windows/VulkanSDK-$($env:ChocolateyPackageVersion)-Installer.exe"

It looks like v2.1.0 is setting $env:ChocolateyPackageVersion to be the normalized package version (1.2.182) instead of the non-normalized package version (1.2.182.0), which is a breaking change from v2.0.0 to v2.1.0

This appears to be intentional, and was done as part of this issue, but was not labeled as a breaking change: #3174

@anchorlightforge
Copy link

anchorlightforge commented Jul 6, 2023

@TheCakeIsNaOH Thank you for linking this issue. I read over the thread and found that you can temporarily work around the problem with --noop --disable-repository-optimizations (EDIT: This is a bad idea. Don't do that. Read below.). After applying this on a custom fork of an affected repo, it was successfully able to complete a build again:

NVIDIAGameWorks/dxvk-remix@01279ba

I'm not familiar with the choco repository at all but assuming these commands don't have any severe drawbacks, this should be a good temporary fix.

@TheCakeIsNaOH
Copy link
Member

@anchorlightforge the --noop flag is short for no operation, so it is basically "just print out part of what would happen if I ran this command without the flag", and it does not actually install the package. In other words, --noop means that Chocolatey does not actually install the package. The reason that option was mentioned in the linked issue is because there was a bug when --noop was used, as compared to actually installing the package.

If the build worked without the vulkan sdk installed, then why not remove it entirely from the build process?

There is no workaround to this issue that I am aware of with Chocolatey CLI v2.1.0. Either the package will need to be changed to be compatible with v2.1.0, or you will need to downgrade to Chocolatey CLI v2.0.0

@anchorlightforge
Copy link

Thank you for correcting me on this @TheCakeIsNaOH. I assumed when I read that by "does nothing" it meant that the operation was placeholder, maybe as a result of outdated docs-- now I feel silly. I'll investigate to see if I can implement any of the fixes you suggested on the project's end.

@pauby
Copy link
Member

pauby commented Jul 7, 2023

I have raised an issue to have this documented. However, as this is a package issue, there is nothing more for us to do here. I'm going to go ahead and close this, but we can reopen it if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants