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

is win 7 still supported? #29008

Closed
zlojvavan opened this issue Jan 17, 2023 · 10 comments · Fixed by #29054
Closed

is win 7 still supported? #29008

zlojvavan opened this issue Jan 17, 2023 · 10 comments · Fixed by #29054
Assignees
Labels
category:question This issue is a question

Comments

@zlojvavan
Copy link

Describe the bug
today tried to install new package and during standard procedures vcpkg decided to update powershell which failed to run on win7 due to end of support

Environment

  • OS: Windows 7
  • Compiler: doesn't matter

To Reproduce
Steps to reproduce the behavior:

  1. PS C:\project\libs\vcpkg> .\vcpkg install icu
  2. Computing installation plan...
    The following packages will be built and installed:
  • icu[core]:x64-windows -> 72.1
    icu[core]:x86-windows -> 72.1
    Additional packages () will be modified to complete this operation.
    Detecting compiler hash for triplet x64-windows...
    A suitable version of powershell-core was not found (required v7.3.1) Downloading portable powershell-core 7.3.1...
    Extracting powershell-core...
    error: Failed to run "C:\Project\Libs\vcpkg\downloads\tools\powershell-core-7.3.1-windows\pwsh.exe" to determine the pow
    ershell-core version.
    error: C:\Project\Libs\vcpkg\downloads\tools\powershell-core-7.3.1-windows\pwsh.exe failed with exit code: (255).
    Unhandled exception. System.TypeInitializationException: The type initializer for 'System.Management.Automation.Tracing.
    PSEtwLog' threw an exception.
    ---> System.TypeInitializationException: The type initializer for 'System.Management.Automation.Tracing.PSEtwLogProvide
    r' threw an exception.
    ---> System.DllNotFoundException: Unable to load DLL 'api-ms-win-eventing-provider-l1-1-0.dll' or one of its dependenci
    es: The specified module could not be found. (0x8007007E)
    at System.Diagnostics.Eventing.UnsafeNativeMethods.EventRegister(Guid& providerId, EtwEnableCallback enableCallback,
    Void
    callbackContext, Int64& registrationHandle)
    at System.Diagnostics.Eventing.EventProvider.EtwRegister()
    at System.Diagnostics.Eventing.EventProvider..ctor(Guid providerGuid)
    at System.Management.Automation.Tracing.PSEtwLogProvider..cctor()
    --- End of inner exception stack trace ---
    at System.Management.Automation.Tracing.PSEtwLog..cctor()
    --- End of inner exception stack trace ---
    at System.Management.Automation.Tracing.PSEtwLog.LogConsoleStartup()
    at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc)
    at Microsoft.PowerShell.ManagedPSEntry.Main(String[] args)

Additional context
PowerShell/PowerShell#18854
https://learn.microsoft.com/en-us/powershell/scripting/install/PowerShell-Support-Lifecycle?view=powershell-7.3
dotnet/core#7556

@LilyWangLL LilyWangLL added the category:question This issue is a question label Jan 18, 2023
@LilyWangLL
Copy link
Contributor

Thanks for posting this issue. It's not that vcpkg doesn't support win7, but the tools used by vcpkg like PowerShell or Python3.10 don't support win7. If you want to use vcpkg on win7, you can manually modify the tool version used by vcpkg in the following files, so that vcpkg can continue to work.

PowerShell:
https://github.com/microsoft/vcpkg/blob/master/scripts/vcpkgTools.xml#:~:text=%3Ctool%20name%3D%22powershell,%3C/tool%3E

Python3.10:
https://github.com/microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_find_acquire_program.cmake#:~:text=(download_sha512%202a1e539ed628c0cca5935d24d22cf3a7165f5c80e12a4003ac184deae6a6d0aa31f582f3e8257b0730adfc09aeec3a0e62f4732e658c312d5382170bcd8c94d8)-,elseif(program%20STREQUAL%20%22PYTHON3%22),endif(),-elseif(program%20STREQUAL

@zlojvavan
Copy link
Author

zlojvavan commented Jan 18, 2023

@LilyWangLL
thanks for your answer

If you want to use vcpkg on win7, you can manually modify the tool version used by vcpkg in the following files, so that vcpkg can continue to work

could you please suggest what exactly am I supposed to put there (in "tool name="powershell-core" os="windows"" section in c:\Project\Libs\vcpkg\scripts\vcpkgTools.xml) before trying to run vcpkg again?

thank you

@LilyWangLL
Copy link
Contributor

could you please suggest what exactly am I supposed to put there (in "tool name="powershell-core" os="windows"" section in c:\Project\Libs\vcpkg\scripts\vcpkgTools.xml) before trying to run vcpkg again?

You could modify this file in your vcpkg, its path is [VCPKG_ROOT]/scripts/vcpkgTools.xml. You can install port after modifying this file.

@zlojvavan
Copy link
Author

You could modify this file in your vcpkg, its path is [VCPKG_ROOT]/scripts/vcpkgTools.xml. You can install port after modifying this file.

I know the path to mine vcpkgTools.xml, it is specified above. the question was what to put there instead of

<tool name="powershell-core" os="windows">
    <version>7.3.1</version>
    <exeRelativePath>pwsh.exe</exeRelativePath>
    <url>https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/PowerShell-7.3.1-win-x86.zip</url>
    <sha512>0a2324a668b448271f3f4f74034d4e3ac636c50e4c228a3ddad3472d97b149016855f3bce96f96a04cb74dd3d8c1ee23e9bccbdc4396b15a8039f87fb212d832</sha512>
    <archiveName>PowerShell-7.3.1-win-x86.zip</archiveName>
</tool>

BillyONeal added a commit to BillyONeal/vcpkg that referenced this issue Jan 19, 2023
Note that we will still be installing the latest powershell in the build labs, but we will leave the tool accepting 7.2.

Resolves microsoft#29008
@LilyWangLL
Copy link
Contributor

I know the path to mine vcpkgTools.xml, it is specified above. the question was what to put there instead of

@zlojvavan Billy open a PR #29054 will roll back the version of PowerShell to 7.2.x, it will resolve this issue.

@zlojvavan
Copy link
Author

zlojvavan commented Jan 19, 2023

Billy open a PR #29054 will roll back the version of PowerShell to 7.2.x, it will resolve this issue.

@LilyWangLL
good to know, thank you! you also mentioned Python in your original answer

BillyONeal added a commit that referenced this issue Jan 19, 2023
Note that we will still be installing the latest powershell in the build labs, but we will leave the tool accepting 7.2.

Resolves #29008
@BillyONeal
Copy link
Member

@LilyWangLL good to know, thank you! you also mentioned Python in your original answer

The difference is that vcpkg itself deploys things that use PowerShell, but you only get Python dependencies if you use a port that actually needs Python. vcpkg itself is, for now, intended to work on Win7, but that does not mean everything in the catalog will care about it.

Given that Win7 has been out of support for 3 years now, I would not assume that things will keep working with it for much longer. We did a 'panic' revert of PowerShell to restore functionality here, but I strongly suggest looking at updating to Win10 or later as the day where we won't be able to do that is not far away. At least be making plans for it if not pulling the trigger yet.

@sergeevabc
Copy link

sergeevabc commented Feb 1, 2023

Here you can take the latest Python running under Windows 7. Fortunately, we still have savvy persons out there who could analyze creepy changes coming from Silicon Valley cubicles and find out that sometimes it is enough to patch just one file to resume operations, e.g. api-ms-win-core-path-l1-1-0.dll.

Perhaps, someone will create a patch for PowerShell 7.3+ too (or for .NET 7 if that matters) as there is no real need to upgrade to Windows 10, it's far-fetched. We don't get anything significant, whereas the upgrade in previous years enabled a transition to a more robust NTFS filesystem and expanded a memory limit thanks to 64-bits.

Lots of us don't care Windows 7 is not officially supported despite years of direct and indirect fearmongering via systray and media outlets. Actually it has been working fine at homes and offices. I have inherited a garage full of tools made decades ago with expired warranty, but they still perform, e.g. the hammer still hammers.

@greenozon
Copy link

greenozon commented Jul 29, 2024

regarding the statement above:

Given that Win7 has been out of support for 3 years now

This is not technically correct!

the real end of life for old good golden Windows 7 SP1 was in 2023!

https://learn.microsoft.com/en-us/troubleshoot/windows-client/windows-7-eos-faq/windows-7-extended-security-updates-faq

and....... ta-da

some special Windows 7 are supported even in 2024 !!!

https://learn.microsoft.com/en-us/lifecycle/products/windows-embedded-posready-7

@BillyONeal
Copy link
Member

You can purchase ESU for the express purpose of "keeping your old stuff that you aren't changing running". For all practical development purposes, ESU changes nothing about what's in support, and should change nothing about what one should be targeting in their products.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants