-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[gettext] Split, fixes, faster build, checked-in config cache #30429
Conversation
+1; I asked myself multiple times why cmake has its own port but make doesn't. Coincidentally, I worked a few weeks ago on optimizing make builds as well. I thought that using native binaries instead of msys2 could speed up configure/ build but I was only able to compile make for Windows. Unfortunately, I was unable to get successful builds with it. Next I tried bash which also didn't work because it is unable to find That being said, I highly appreciate your work. |
MSYS2 exists because no better sufficiently complete environment exists for doing autotools builds on Windows. Probably it is reasonable to assume that they do a fairly good job with regard to the trade-off between compatibility and performance. For
(For the tracing of configure, I piped the output into At the moment I'm reviewing the differences of the windows (MSVC) config caches, as available from the CI failure logs. Some findings are surprising (at least for me):
|
ports/gettext/portfile.cmake
Outdated
@@ -27,6 +27,27 @@ vcpkg_find_acquire_program(BISON) | |||
get_filename_component(BISON_PATH "${BISON}" DIRECTORY) | |||
vcpkg_add_to_path("${BISON_PATH}") | |||
|
|||
if(NOT DEFINED VCPKG_AUTOTOOLS_CONFIG_CACHE) |
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.
Defining VCPKG_AUTOTOOLS_CONFIG_CACHE
to a non-existing file (e.g. NONE
) may be used to disable an existing cache in custom triplet files.
ports/gettext/portfile.cmake
Outdated
file(READ "${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}" config_cache) | ||
string(REGEX REPLACE "\nac_cv_env[^\n]*" "" config_cache "${config_cache}") # Eliminate build type flags | ||
file(WRITE "${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}" "${config_cache}") | ||
vcpkg_config_cache_reuse() |
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.
Even in absence of an initial (checked-in) cache, this could generally speed up configuration for the second build type.
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.
No longer used in these ports.
|
With configuration caching, further tuning, libintl moved to a separate port and gettext-runtime tools moved to another feature: In total, build time is down from to 10.7 min to 6 min. But there are other benefits:
gettext[core] should now have everthing needed before running Switching downstream ports from gettext to libintl should be done separately. There are two many of them. Merge conflicts and regression would block a merge for too long. |
FTR the checked-in config.cache files were reviewed manually:
|
4cb4046
to
6b74ee8
Compare
gettext-libintlThe usage test passed (header files found):
gettextAll features are tested successfully in the following triplet:
mchehab-zbarAll features are tested successfully in the following triplet:
|
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.
Overall, I like the changes in this PR. That said, there are some things I would like to discuss with the team before going forward. Namely, the maintaining of autoconf configuration cache files and the "bashifying" configure.
Hi @dg0yt, I'd appreciate your opinion on the matter. Do you think it's necessary to include the Regarding the "bashifying" of the configure script, I think it's acceptable. So, unless you strongly believe that both the splitting out of Looking forward to your feedback. |
There is no problem with that. It was an important of forming this PR, but in the end it the PR is designed to allow make such cuts feasible. But there can be some some extra total build time in doing less config caching than before. |
Back to key benefits but without checked-in config cache.
|
Major contributions:
gettext-libintl
out ofgettext
.gettext-libintl
as being under LGPL, not GPL.gettext[tools]
without reinstalling ports which only needgettext-libintl
.To fully leverage the effect, downstream ports still need to switch dependencies.
In particlar, uses bash built-in evaluations instead of sub-shells, skips some subdirs, and enables concurrency in one large subdir.
(I won't try to upstream this. Upstream targets a larger set of platforms and tools and will refuse these changes. We have seen this for libunistring.)
Adds a script port which helps to maintain autoconf configuration cache files. This greatly reduces the time which is spent in the configure step on Windows.Removed from PR
gettext[core]
, removing some extra duties from portmchehab-zbar
.Fixes [gettext] Build error (conflict with libxml2) #30579, libxml2 installation order problem.
.
./vcpkg x-add-version --all
and committing the result.