vcpkg 2023.02.24 Release: Default Triplet Changes, RISC-V support, Bug Fixes, and More…
The 2023.02.24 release of the vcpkg package manager is available. This blog post summarizes changes from January 10th, 2023 to February 24th, 2023 for the Microsoft/vcpkg, Microsoft/vcpkg-tool, and Microsoft/vcpkg-docs GitHub repos.
Some stats for this period:
- 47 new ports were added to the open-source registry. If you are unfamiliar with the term ‘port’, they are packages that are built from source and are typically C/C++ libraries.
- 607 updates were made to existing ports. As always, we validate each change to a port by building all other ports that depend on or are depended by the library that is being updated for our nine main triplets.
- There are now 2,153 total libraries available in the vcpkg public registry.
- 141 contributors submitted PRs, issues, or participated in discussions in the repo.
- The main vcpkg repo has over 5,200 forks and 18,000 stars on GitHub.
Notable changes for this release are summarized below:
Upcoming Default Triplet Changes
Starting with the September 2023 vcpkg tool release, the default triplet for vcpkg libraries for Windows users will change from x86-windows to a detected host triplet. The detected host triplet will be inferred from your CPU architecture and operating system name. For example, if your machine uses an x64 architecture, this will be x64-windows. Arm architecture devices will also use an arm or arm64 default host triplet. This mirrors the behavior we already have for macOS and Linux users.
Why is this change being made?
Over 75% of our users are not building their libraries for x86-windows and we have received user feedback that the current default is unreasonable. Switching to host triplets is a more reasonable default since users are likely to want their libraries to build and run on their machine. It also makes the behavior consistent across all host operating systems.
Who is impacted?
The following vcpkg commands require some triplet information and assume the default triplet if none is provided. Windows users who run these commands and do not specify triplet information are impacted (using the zlib port as an example):
vcpkg install zlib(classic mode)
vcpkg install(manifest mode)
vcpkg remove zlib
vcpkg build zlib
vcpkg export zlib --zip
vcpkg depend-info zlib
vcpkg upgrade zlib
vcpkg build-external zlib .\ports\zlib(builds a library from specified path)
vcpkg x-check-support(checks supports field for specified triplet)
vcpkg x-set-installed zlib
For now, vcpkg will emit the following warning when one of the above commands is run without a specified triplet:
warning: Starting with the September 2023 release, the default triplet for vcpkg libraries will change from x86-windows to the detected host triplet [TRIPLET]. To resolve this message, add --triplet x86-windows to keep the same behavior.
Users of vcpkg manifests and MSBuild or CMake won’t be affected by this change if they use the built-in integration vcpkg has with these build systems. This is because vcpkg already infers what triplet to use based on the active build configuration, and thus wouldn’t use a generalized default.
What does this mean for me?
If you are a Windows user currently running vcpkg builds (whether manually or via a build script) without specifying a triplet, vcpkg will not assume x86-windows anymore unless that is your host architecture. You should update your build scripts to specify the x86-windows triplet if you wish to maintain the current experience. Please review our Triplet files documentation for more details on how to use triplets to control how your dependencies are built.
PR: Microsoft/vcpkg-tool#881: Add warning message for change in default triplet to host triplet
Initial support for RISC-V
A community PR enables vcpkg to build on machines with RISC-V instruction set architecture.
PR: Microsoft/vcpkg-tool#894: Add initial risc-v support (thanks @dtcxzyw!)
Bug Fixes / Performance Improvements
- Removed markdown parser used for vcpkg artifacts commands to significantly improve performance when these commands are run; test with “vcpkg find artifact gcc” ran 1.8x faster after the change. (Microsoft/vcpkg-tool#870)
- Removed use of DUMPBIN from post-build checks. Post-build checks that relied on it should run faster, and users no longer need to provide a DUMPBIN if they are using, for example, MinGW as their compiler. (Microsoft/vcpkg-tool#834, Microsoft/vcpkg-tool#905)
- Warning messages when installing ports for unsupported triplets will no longer print multiple times in a row. (Microsoft/vcpkg-tool#899, thanks @autoantwort!)
- Changed a post-build check for ports so vcpkg no longer requires pkg-config (.pc) files that don’t have a “Lib:” line to be placed in share/pkgconfig. The locations lib/pkgconfig/ and debug/lib/pkgconfig are now accepted as well. (Microsoft/vcpkg-tool#906, thanks @autoantwort!)
- Error message when a user tries to add a port with an invalid version field in vcpkg.json now provides modern examples of acceptable version fields (Microsoft/vcpkg-tool#880, thanks @Pospelove!).
- Several improvements made to the vcpkg CI system to improve integrity of the curated registry:
- Microsoft/vcpkg-tool#898, thanks @autoantwort!
- Microsoft/vcpkg-tool#877, thanks @cnSchwarzer!
- Microsoft/vcpkg-tool#865, thanks @autoantwort!
- Microsoft/vcpkg-tool#856, thanks @autoantwort!
- Improved several diagnostic messages:
- Clarify what it means to be “unsupported” by a supports expression. Microsoft/vcpkg-tool#879
- Improve ‘expected a versioning field’ error message. Microsoft/vcpkg-tool#880, thanks @Pospelove!
- Print unsupported warnings only once. Microsoft/vcpkg-tool#899, thanks autoantwort!
- Unsupported platform added for env. Microsoft/vcpkg-tool#891, thanks soroshsabz!
- Fixed vcpkg upgrade command failing if a feature was removed for a port that is being upgraded. Microsoft/vcpkg-tool#873, thanks autoantwort!
Total Ports Available for Tested Triplets
While vcpkg supports a much larger variety of target platforms and architectures, the list above is validated exhaustively to ensure updated ports don’t break other ports in the catalog.
Thank You to Our Contributors
vcpkg couldn’t be where it is today without contributions from our open-source community. Thank you for your continued support! The following people contributed to the vcpkg, vcpkg-tool, or vcpkg-docs repos in this release:
- dg0yt (31 commits)
- chausner (30 commits)
- autoantwort (29 commits)
- Neumann-A (21 commits)
- xiaozhuai (16 commits)
- Pospelove (12 commits)
- Sibras (6 commits)
- RT222 (4 commits)
- AenBleidd (4 commits)
- talregev (3 commits)
- quyykk (3 commits)
- ahmedyarub (3 commits)
- myd7349 (3 commits)
- m-kuhn (2 commits)
- coryan (2 commits)
- horenmar (1 commit)
- longhuan2018 (1 commit)
- DragonJoker (1 commit)
- daschuer (1 commit)
- ZeeWanderer (1 commit)
- mathisloge (1 commit)
- Tradias (1 commit)
- luncliff (1 commit)
- SchaichAlonso (1 commit)
- past-due (1 commit)
- gjasny (1 commit)
- Osyotr (1 commit)
- kobykahane (1 commit)
- JackBoosY (1 commit)
- Thomas1664 (1 commit)
- soroshsabz (1 commit)
- cnSchwarzer (1 commit)
- WimLefrere (1 commit)
You can find the full 2023.02.24 release notes on GitHub for the main repo. Recent updates to the vcpkg tool can be viewed on the vcpkg-tool Releases page. If you’re new to vcpkg or curious about how a package manager can make your life easier as a C/C++ developer, check out the vcpkg website – vcpkg.io.
If you would like to contribute to vcpkg and its library catalog, or want to give us feedback on anything, check out our GitHub repo. Please report bugs or request updates to ports in our issue tracker or join more general discussion in our discussion forum. For an overview of our top priorities and backlog, take a look at our roadmap page.