Skip to content
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

libxml2: fix build when pkg-config is present #197591

Merged
merged 2 commits into from
Nov 19, 2024
Merged

Conversation

ZhongRuoyu
Copy link
Member

@ZhongRuoyu ZhongRuoyu commented Nov 13, 2024

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

When pkg-config is present during build, checks for ICU libraries do not work correctly, causing the build to fail. See 1, 2 for more details. Let's apply the patch that fixes this issue.

Also, use pkg-config for stable builds too. When pkg-config is missing, build falls back to using icu-config for ICU checks, but that is deprecated upstream 3.

In addition, avoid hard-coding cellar paths that could invalidate dependents' pkg-config files after version bumps.

Footnotes

  1. https://github.com/orgs/Homebrew/discussions/5699#discussioncomment-11243333

  2. https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/289

  3. https://unicode-org.github.io/icu/userguide/icu/howtouseicu.html#notes-on-icu-config

@ZhongRuoyu ZhongRuoyu added the CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. label Nov 13, 2024
@github-actions github-actions bot added icu4c ICU use is a significant feature of the PR or issue CI-linux-self-hosted-deps Test dependents on Linux self-hosted runner labels Nov 13, 2024
@ZhongRuoyu ZhongRuoyu force-pushed the libxml2-icu-fix branch 2 times, most recently from 2de9503 to ae30d77 Compare November 13, 2024 19:13
@ZhongRuoyu ZhongRuoyu marked this pull request as draft November 13, 2024 20:11
@ZhongRuoyu ZhongRuoyu marked this pull request as ready for review November 15, 2024 16:13
@ZhongRuoyu ZhongRuoyu added CI-no-fail-fast-deps Continue dependent tests despite failing GitHub Actions matrix tests. long dependent tests Set a long timeout for dependent testing labels Nov 16, 2024
When `pkg-config` is present during build, checks for ICU libraries do
not work correctly, causing the build to fail. See [1], [2] for more
details. Let's apply the patch that fixes this issue.

Also, use `pkg-config` for stable builds too. When `pkg-config` is
missing, build falls back to using `icu-config` for ICU checks, but
that is deprecated upstream [3].

In addition, avoid hard-coding cellar paths that could invalidate
dependents' pkg-config files after version bumps.

[1]: https://github.com/orgs/Homebrew/discussions/5699#discussioncomment-11243333
[2]: https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/289
[3]: https://unicode-org.github.io/icu/userguide/icu/howtouseicu.html#notes-on-icu-config
@ZhongRuoyu ZhongRuoyu added ready to merge PR can be merged once CI is green and removed ready to merge PR can be merged once CI is green labels Nov 17, 2024
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Nov 19, 2024
@BrewTestBot BrewTestBot added this pull request to the merge queue Nov 19, 2024
Merged via the queue into master with commit c89ad69 Nov 19, 2024
15 checks passed
@BrewTestBot BrewTestBot deleted the libxml2-icu-fix branch November 19, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-linux-self-hosted-deps Test dependents on Linux self-hosted runner CI-no-fail-fast-deps Continue dependent tests despite failing GitHub Actions matrix tests. CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. icu4c ICU use is a significant feature of the PR or issue long dependent tests Set a long timeout for dependent testing ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants