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

[Basisu] Fix MinGW build failure #27760

Merged
merged 8 commits into from
Nov 15, 2022
Merged

Conversation

addowhite
Copy link
Contributor

Describe the pull request
Basisu won't build with mingw triplet due to not including libgen.h on Windows.
However, the libgen include is required on Windows when using MinGW as it's needed for definitions of dirname() and basename().
This PR modifies src/encoder/basisu_enc.h so that it will include libgen.h when compiled with MinGW

  • What does your PR fix?

    Fixes [Basisu] MinGW build failure #27759

  • Which triplets are supported/not supported? Have you updated the CI baseline?

    <all, x64-mingw-dynamic>,

  • Does your PR follow the maintainer guide?

    Yes

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

@addowhite
Copy link
Contributor Author

@microsoft-github-policy-service agree

#include <ostream>

-#ifndef _WIN32
+#if !defined(_WIN32) or defined(__MINGW32__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the real problem that _WIN32should be defined also with mingw?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_WIN32 is defined with MinGW, and this is exactly the problem, because the preprocessor directive will filter out the #include <libgen.h>, which is actually required when compiling with MinGW, but not with MSVC.

@LilyWangLL LilyWangLL changed the title Fix #27759 [Basisu] Fix MinGW build failure Nov 11, 2022
@LilyWangLL LilyWangLL added category:port-bug The issue is with a library, which is something the port should already support category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. labels Nov 11, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for basisu have changed but the version was not updated
version: 1.11#7
old SHA: dd7b75c3af3acb98ce852f1b2fda02f47dc1a08e
new SHA: 51ced1494614fa6f9577fa01db67e97c0d025d17
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***
error: checked-in files for fontconfig have changed but the version was not updated
version: 2.14.1
old SHA: 6e8409679e92c3870efcfeed43890c7f7bd92f43
new SHA: ddb70e87d9403156c85ca19ebca7c5d4232e49a3
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

@LilyWangLL
Copy link
Contributor

Thanks for your PR. Please also update port-version in vcpkg.json of fontconfig.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for basisu have changed but the version was not updated
version: 1.11#7
old SHA: dd7b75c3af3acb98ce852f1b2fda02f47dc1a08e
new SHA: b7f17543156874a50027986946b22f161902dabf
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***
error: checked-in files for fontconfig have changed but the version was not updated
version: 2.14.1
old SHA: 6e8409679e92c3870efcfeed43890c7f7bd92f43
new SHA: ddb70e87d9403156c85ca19ebca7c5d4232e49a3
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

@LilyWangLL
Copy link
Contributor

Ping @addowhite for response.

Thanks for your PR. Please also update port-version in vcpkg.json of fontconfig.

Will make the change to fontconfig in another branch
This reverts commit 6894e45.
@addowhite
Copy link
Contributor Author

Thanks for your PR. Please also update port-version in vcpkg.json of fontconfig.

I intended this PR to be for Basisu only, I'll fix fontconfig separately.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for basisu have changed but the version was not updated
version: 1.11#7
old SHA: dd7b75c3af3acb98ce852f1b2fda02f47dc1a08e
new SHA: 31adec97dda19e99a5745f46a5d2031981206bb1
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for basisu have changed but the version was not updated
version: 1.11#7
old SHA: 51ced1494614fa6f9577fa01db67e97c0d025d17
new SHA: 31adec97dda19e99a5745f46a5d2031981206bb1
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

@LilyWangLL LilyWangLL added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Nov 15, 2022
@BillyONeal
Copy link
Member

I believe upstream already has this change as BinomialLLC/basis_universal@b32a0c1

Thanks!

@BillyONeal BillyONeal merged commit 46690e2 into microsoft:master Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Basisu] MinGW build failure
4 participants