Skip to content

Conversation

florelis
Copy link
Member

@florelis florelis commented Jul 11, 2025

#5567 didn't actually fix the crash we were seeing.

The actual cause of the crash seems to be that I missed adding some compilation flags that we had added to the .vcxproj for cpprestsdk when I moved the dependencies to vcpkg (which does not use the .vcxproj). Specifically, I didn't set a flag to compile it without async support, so the library used async but winget wasn't prepared for that.

This PR adds the missing compilation flags for all ports, taken from the project files before the migration to vcpkg. I added the flags to the triplet files (conditionally) so that it applies the same regardless of whether a port comes from the official registry or a local overlay.

I noticed that for libyaml and jsoncpp I missed the flags to prepare for fuzzing, so I added a new triplet for those.

This PR also updates the pipeline to publish the compilation logs from vcpkg for easier debugging in the future.

Microsoft Reviewers: Open in CodeFlow

@florelis florelis merged commit 9681989 into master Jul 14, 2025
11 checks passed
@florelis florelis deleted the vcpkgFlags branch July 14, 2025 20:18
florelis added a commit to florelis/winget-cli that referenced this pull request Jul 14, 2025
microsoft#5567 didn't actually fix the crash we were seeing.

The actual cause of the crash seems to be that I missed adding some
compilation flags that we had added to the `.vcxproj` for cpprestsdk
when I moved the dependencies to vcpkg (which does not use the
`.vcxproj`). Specifically, I didn't set a flag to compile it without
async support, so the library used async but winget wasn't prepared for
that.

This PR adds the missing compilation flags for all ports, taken from the
project files before the migration to vcpkg. I added the flags to the
triplet files (conditionally) so that it applies the same regardless of
whether a port comes from the official registry or a local overlay.

I noticed that for `libyaml` and `jsoncpp` I missed the flags to prepare
for fuzzing, so I added a new triplet for those.

This PR also updates the pipeline to publish the compilation logs from
vcpkg for easier debugging in the future.
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/5587)
florelis added a commit that referenced this pull request Jul 14, 2025
…5589)

#5567 didn't actually fix the crash we were seeing.

The actual cause of the crash seems to be that I missed adding some
compilation flags that we had added to the `.vcxproj` for cpprestsdk
when I moved the dependencies to vcpkg (which does not use the
`.vcxproj`). Specifically, I didn't set a flag to compile it without
async support, so the library used async but winget wasn't prepared for
that.

This PR adds the missing compilation flags for all ports, taken from the
project files before the migration to vcpkg. I added the flags to the
triplet files (conditionally) so that it applies the same regardless of
whether a port comes from the official registry or a local overlay.

I noticed that for `libyaml` and `jsoncpp` I missed the flags to prepare
for fuzzing, so I added a new triplet for those.

This PR also updates the pipeline to publish the compilation logs from
vcpkg for easier debugging in the future.
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/5589)
florelis added a commit that referenced this pull request Jul 17, 2025
Yet another attempt to fix that crash we are seeing 🙃
See #5587

In the past we had added `_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR` globally
to fix a similar crash using `Directory.Build.props`, but that does not
flow from MSBuild to vcpkg. This change adds it to all the ports we use.
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/5592)
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

Successfully merging this pull request may close these issues.

2 participants