Skip to content

[mingw] Use find_file to find compiler, fall back to unprefixed windres if the prefixed version doesn't exist#15179

Merged
vicroms merged 1 commit intomicrosoft:masterfrom
longnguyen2004:mingw-toolchain-fix
Dec 21, 2020
Merged

[mingw] Use find_file to find compiler, fall back to unprefixed windres if the prefixed version doesn't exist#15179
vicroms merged 1 commit intomicrosoft:masterfrom
longnguyen2004:mingw-toolchain-fix

Conversation

@longnguyen2004
Copy link
Copy Markdown
Contributor

Describe the pull request

  • What does your PR fix? Fixes [zlib] x64-mingw-dynamic build failure #14689
    This PR changes the compiler detection mechanism in the mingw toolchain to use find_file, to detect the absence of prefixed executable, and fall back to the unprefixed version.
  • Which triplets are supported/not supported? Have you updated the CI baseline?
    All mingw triplets
  • Does your PR follow the maintainer guide?
    Yes

@JackBoosY JackBoosY added 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 category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) and removed category:port-bug The issue is with a library, which is something the port should already support labels Dec 18, 2020
@JackBoosY
Copy link
Copy Markdown
Contributor

@vadi2 Can you please test this PR?

Thanks.

@vadi2
Copy link
Copy Markdown
Contributor

vadi2 commented Dec 18, 2020

Yes, happy to!

Copy link
Copy Markdown
Contributor

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

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

Unfortunately it fails on installing a dependency first, this is in the Github Actions environment:

[1/18] cmd.exe /C "cd /D D:\a\Mudlet\Mudlet\3rdparty\vcpkg\buildtrees\zlib\x64-mingw-dynamic-dbg && x86_64-w64-mingw32-windres.exe -D GCC_WINDRES -I D:/a/Mudlet/Mudlet/3rdparty/vcpkg/buildtrees/zlib/src/1.2.11-63309e48e5.clean -I D:/a/Mudlet/Mudlet/3rdparty/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -o D:/a/Mudlet/Mudlet/3rdparty/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg/zlib1rc.obj -i D:/a/Mudlet/Mudlet/3rdparty/vcpkg/buildtrees/zlib/src/1.2.11-63309e48e5.clean/win32/zlib1.rc"
FAILED: zlib1rc.obj 
cmd.exe /C "cd /D D:\a\Mudlet\Mudlet\3rdparty\vcpkg\buildtrees\zlib\x64-mingw-dynamic-dbg && x86_64-w64-mingw32-windres.exe -D GCC_WINDRES -I D:/a/Mudlet/Mudlet/3rdparty/vcpkg/buildtrees/zlib/src/1.2.11-63309e48e5.clean -I D:/a/Mudlet/Mudlet/3rdparty/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg -o D:/a/Mudlet/Mudlet/3rdparty/vcpkg/buildtrees/zlib/x64-mingw-dynamic-dbg/zlib1rc.obj -i D:/a/Mudlet/Mudlet/3rdparty/vcpkg/buildtrees/zlib/src/1.2.11-63309e48e5.clean/win32/zlib1.rc"
'x86_64-w64-mingw32-windres.exe' is not recognized as an internal or external command,
operable program or batch file.
ninja: build stopped: subcommand failed.

@longnguyen2004
Copy link
Copy Markdown
Contributor Author

It's working fine on my computer, have you pulled my branch?

Copy link
Copy Markdown
Contributor

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

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

You're right, wrong branch. Yours compiled zlib ok 👍

But zziplib was my real aim originally and that failed, filed as #15203.

@JackBoosY JackBoosY added the category:port-bug The issue is with a library, which is something the port should already support label Dec 21, 2020
@longnguyen2004
Copy link
Copy Markdown
Contributor Author

@JackBoosY Remove the port-bug tag please, I pushed to the wrong branch. That commit is now in a different PR #15215

@JackBoosY JackBoosY removed the category:port-bug The issue is with a library, which is something the port should already support label Dec 21, 2020
@JackBoosY JackBoosY added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Dec 21, 2020
@JackBoosY
Copy link
Copy Markdown
Contributor

LGTM in my side.

@vicroms vicroms merged commit 0e05a1f into microsoft:master Dec 21, 2020
@vicroms
Copy link
Copy Markdown
Member

vicroms commented Dec 21, 2020

Thanks for the PR!

@longnguyen2004 longnguyen2004 deleted the mingw-toolchain-fix branch December 22, 2020 00:42
ryukw7 pushed a commit to ryukw7/vcpkg that referenced this pull request Dec 24, 2020
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:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[zlib] x64-mingw-dynamic build failure

4 participants