ICU-5628 Fix using install-sh in out-of-source builds - #4109
Open
dg0yt wants to merge 1 commit into
Open
Conversation
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
dg0yt
commented
Aug 7, 2026
| INSTALL="\\\$(top_srcdir)/${ac_install_sh}" | ||
| fi | ||
| # If using the included install-sh, make INSTALL work from any build dir. | ||
| if test "${ac_install_sh}" = "${INSTALL}"; then |
Author
There was a problem hiding this comment.
Unchanged guard, and matching an effect in AC_PROG_INSTALL.
| # If using the included install-sh, make INSTALL work from any build dir. | ||
| if test "${ac_install_sh}" = "${INSTALL}"; then | ||
| case "$srcdir" in | ||
| .|./*|../*) INSTALL="\\\$(top_builddir)/${ac_install_sh}" ;; |
Author
There was a problem hiding this comment.
Guard based on srcdir, similar to original code. I believe srcdir makes sense because it is used to construct the search path - and thus becomes part of the value - for install-sh.
Now any relative path instead of just ., and now prepending top_builddir instead of top_srcdir.
dg0yt
marked this pull request as ready for review
August 7, 2026 18:40
Author
|
Disclaimer: I did not test this with in-source builds. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cf. microsoft/vcpkg#53279:
icu's
configure.acusesAC_PROG_INSTALLwhich tries to find a fast binaryinstalland uses a slowinstall-shscript as fallback. Via@INSTALL@, the result is baked intoicudefs.mkin the toplevel build directory.When the fallback is used, icu prepends
$(top_srcdir)for in-source builds (i.e.${srcdir} = "."). (I assume this was meant as a fix for ICU-525 which is the same error for in-source builds.)For out-of-source builds, nothing is prepended, and so the value of
INSTALLis valid only for the toplevel build dir. This leads to errors when it is actually used in subdirs.This change prepends
$(top_builddir)instead, so that a valid path is construct for every possible case. Prepending is scoped to situations wheresrcpathis relative.To reproduce the original issue, rename /usr/bin/install and similar candidates before running
../path/to/icu/source/configure.The change from this PR is in
configure.ac.configureis generated from that file.Checklist