[vcpkg] Always use an autotools build triplet#18130
[vcpkg] Always use an autotools build triplet#18130BillyONeal merged 4 commits intomicrosoft:masterfrom
Conversation
|
Hmm why? shouldn't _csc_AUTOCONFIG not decide here? Which port is affected by this change? |
It happened a few days ago on a different computer. Let's try here anyway: $ grep -l vcpkg_configure_make ports/*/portfile.cmake | while read I; do grep "AUTOCONFIG" || echo $I; done
ports/apr/portfile.cmakeNow I remember: Port apr normally doesn't use
If it is present, yes. But the documenation doesn't give me the impression that this option is mandatory when building a project based on autotools, or that it is related to triplets:
Perhaps
But it isn't use very often: $ grep -l vcpkg_configure_make ports/*/portfile.cmake | while read I; do grep -q "DETERMINE_BUILD_TRIPLET" $I && echo $I ; done
ports/gettext/portfile.cmake
ports/libiconv/portfile.cmake
ports/libpq/portfile.cmake
ports/mp3lame/portfile.cmakeLast not least the |
|
IIRC, |
it is also required if the configure script was generated with an old version of autotools/libtool |
|
This does smell very weird; I don't see why MinGW should be special here. |
So it is up to community support to add |
For |
Mechanically, why is this? And then, why should we not always cross build? |
You left out the context before my statement:
When This PR is the result of building with mingw on Windows. |
|
(Wrong button.) The alternative is to always set the proper mingw |
|
Any other comments how to generally ensure proper triplet when building mingw on windows? |
|
Could you please help take a look? |
|
Ping. |
@ras0219-msft Could you please help leave some comments for this? |
|
Given that we don't have any experts on mingw on our team, and the expert on mingw says this is important, could we merge as "strictly better and also on a community triplet"? cc @ras0219, opinions? |
|
It seems like the correct fix for this is to yank out a (Unfortunately, |
|
I observe that in the conditional if (_csc_AUTOCONFIG AND NOT _csc_BUILD_TRIPLET OR _csc_DETERMINE_BUILD_TRIPLET OR VCPKG_CROSSCOMPILING AND NOT _csc_BUILD_TRIPLET)the variable Perhaps we should try that approach as a more minimal change that doesn't introduce further diversification? |
Why is that? is the environment not correctly setup? Or is it choosing the MSYS compilers? Also there is the undocumented triplet variable |
|
This is a fairly simple change from May. It makes ports pass a crucial setting to
Who knows? Perhaps some ports didn't properly read the environment? If you don't want to make this a general behaviour, we will have to make individual changes to all ports which fail due to missing For more fundamental long-term changes, coordinate with #19753 or #20165 audits by @JackBoosY. Possibly including the flip from opt-in |
ras0219-msft
left a comment
There was a problem hiding this comment.
I've pushed the simplification I suggested above -- LGTM if it passes :)
Thanks!
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Thanks and sorry it took a while to review! |
What does your PR fix?
This PR ensures that
vcpkg_configure_makealways determines autotools tripletwhen building for mingw. This fixes the case when both vcppkg target triplet and vcpkg host triplet are set to the same mingw triplet, i.e. building on a Windows PC without MSVC.Which triplets are supported/not supported? Have you updated the CI baseline?
all (but targeting mingw), no
Does your PR follow the maintainer guide?
yes
If you have added/updated a port: Have you run
./vcpkg x-add-version --alland committed the result?-/-
PS: I didn't want to add yet another expression to the if clause following that change.