configure: detect ICU via icu-uc/icu-i18n pkg-config modules to easily build on Debian - #597
Open
hugo-hur wants to merge 8 commits into
Open
configure: detect ICU via icu-uc/icu-i18n pkg-config modules to easily build on Debian#597hugo-hur wants to merge 8 commits into
hugo-hur wants to merge 8 commits into
Conversation
icu-config was deprecated and removed in ICU 63+, so it is absent on modern Debian/Ubuntu where only libicu-dev with pkg-config support is shipped. The pkg-config fallback used the monolithic "icu" module name, which those distros no longer provide, so configure failed to find ICU even when it was installed. Try the split modules "icu-uc" and "icu-i18n" (used since ICU 58) first, falling back to the legacy "icu" module for older systems. Also fall back to "pkg-config --modversion icu-uc" for the --enable-icu-6x version check when icu-config is unavailable. The icu-config path is still tried first, so older distros that still provide it continue to work unchanged.
Author
|
After this change the build is as easy as on Debian Trixie |
6 tasks
6 tasks
XV02
requested changes
Aug 5, 2026
XV02
left a comment
Contributor
There was a problem hiding this comment.
Great fix, thanks for working on this since it solves the root cause that made a dummy icu-config necessary. With this change a cleanup follow up is needed in the documentation and some workflows to maintain the codebase consistent with it.
The README.md on the root folders contains references to the old icu-config workaround on lines 292, 294 and 300 that should be removed.
Also the sudo cp instructions for copying the custom icu-config workaround should be removed from both build.sh and codeql-analysis.yml files since they're no longer needed.
Would appreciate your help with the cleanup.
ICU is now detected via the icu-uc/icu-i18n pkg-config modules, so the dummy icu-config workaround (issue LinearTapeFileSystem#153) is no longer needed. Remove the '(Need icu-config)' annotations from the Ubuntu 20.04 / Debian 10 build rows and the sentence pointing at the workaround.
ICU is now found via pkg-config (icu-uc/icu-i18n), so copying the dummy icu-config into /usr/bin is no longer required to configure the build.
ICU is now found via pkg-config (icu-uc/icu-i18n), so the CodeQL build no longer needs the dummy icu-config copied into /usr/bin.
Nothing references .github/workflows/icu-config after the pkg-config-based ICU detection landed and the build.sh / CodeQL copies were removed.
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.
icu-config was deprecated and removed in ICU 63+, so it is absent on modern Debian/Ubuntu where only libicu-dev with pkg-config support is shipped. The pkg-config fallback used the monolithic "icu" module name, which those distros no longer provide, so configure failed to find ICU even when it was installed.
Try the split modules "icu-uc" and "icu-i18n" (used since ICU 58) first, falling back to the legacy "icu" module for older systems. Also fall back to "pkg-config --modversion icu-uc" for the --enable-icu-6x version check when icu-config is unavailable.
The icu-config path is still tried first, so older distros that still provide it continue to work unchanged.
Summary of changes
This pull request includes following changes or fixes.
Description
No other dependencies affected. Just the icu library search on build.