Skip to content

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
LinearTapeFileSystem:release/v2.4.9.0from
hugo-hur:fix-icu-debian
Open

configure: detect ICU via icu-uc/icu-i18n pkg-config modules to easily build on Debian#597
hugo-hur wants to merge 8 commits into
LinearTapeFileSystem:release/v2.4.9.0from
hugo-hur:fix-icu-debian

Conversation

@hugo-hur

@hugo-hur hugo-hur commented Jun 8, 2026

Copy link
Copy Markdown

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.

  • Fixed configure having problems finding icu libraries automatically

Description

No other dependencies affected. Just the icu library search on build.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have confirmed my fix is effective or that my feature works

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.
@hugo-hur

hugo-hur commented Jun 8, 2026

Copy link
Copy Markdown
Author

After this change the build is as easy as

apt install libicu-dev libxml2-dev uuid-dev libfuse-dev fuse build-essential automake libtool pkg-config
git submodule update --init --recursive
./autogen.sh
./configure
make

on Debian Trixie

@hugo-hur hugo-hur mentioned this pull request Jul 3, 2026
6 tasks
@vandelvan
vandelvan changed the base branch from main to release/v2.4.9.0 July 3, 2026 20:53

@Piloalucard Piloalucard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@XV02 XV02 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@hugo-hur
hugo-hur requested a review from XV02 August 8, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants