-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[vcpkg scripts]: Include --build in autoconf xcompile #43703
base: master
Are you sure you want to change the base?
Conversation
According to the autconf manual [1], when using the --host option, one should always also specify the --build option ("for historic reasons"). This commit ensures that vcpkg follows this recommendation by letting config.guess determine the build triplet to use. [1]: https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Specifying-Target-Triplets.html
All autoconf changes must go to |
@dg0yt the directory you mentioned seems to be about the installation of |
You are trying to change the unversioned script the vpckg owners were reluctant to change, requesting a versioned script port instead. |
... and in triggers a lot of CI activity for that. |
Okay after having read through the discussion in #31228 I now understand what you mean. Does this effectively mean that we just don't fix ports that are broken due to issues in those never-to-be-changed scripts? That's rather ridiculous imo. I'll redirect my changes to the port file then even though this means that the thing this was originally fixing now remains unfixed... 😕 |
Ports are fixed by making them use the shiny new maintainer functions from vcpkg-make. |
Hm. As I see it, I guess instead of calling this script, we could also just assemble the triplets based on Any thoughts on that? |
I have rough ideas... some elaboration might be needed.
*) In libffi, there is: vcpkg/ports/libffi/portfile.cmake Lines 44 to 47 in 74ec888
|
Good idea. On further thought however, I feel like given I think what I am going to do is to add a parameter to |
f7118a8
to
94eba20
Compare
94eba20
to
40f9b74
Compare
40f9b74
to
54d9957
Compare
elseif (VCPKG_HOST_IS_WINDOWS) | ||
set(build_triplet_opt "--build=${BUILD_ARCH}-pc-mingw32") | ||
elseif (VCPKG_HOST_IS_LINUX) | ||
set(build_triplet_opt "--build=${BUILD_ARCH}-pc-linux") | ||
elseif (VCPKG_HOST_IS_IOS OR VCPKG_HOST_IS_OSX) | ||
set(build_triplet_opt "--build=${BUILD_ARCH}-apple-darwin") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet sure whether doing this "estimated guessing" or just leaving it blank would be better. The latter would certainly be more conservative of a change 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In vcpkg, ports are meant to not build any binary for the host.* (Host binaries must be done via host dependencies,) The guess just needs to be good enough for running the build scripts correctly,
According to the autconf manual (source), when using the --host option, one should always also specify the --build option ("for historic reasons").
This commit ensures that vcpkg follows this recommendation by letting config.guess determine the build triplet to use.
This is a more general version of #28374 and it fixes the immediate issue observed in #41130 though. Whether the issue is fully fixed, I can't tell but I can tell that on a M1 Mac, trying to cross-compile to x64 Mac is still not possible but this is due to CPython not supporting that: python/cpython#90905 (though thanks to #27830 it might starting from 3.14).