Skip to contentSkip to conversation

configure: additionally get icu-uc from pkg-config

PATCH New Alyssa Ross 1 participant 1 message Feb 14, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 configure: additionally get icu-uc from pkg-config

Upstream libicu changed its pkgconfig files[0] in version 76 to require callers to call out to each .pc file they need for the libraries they want to link against. This apparently reduces overlinking, at a cost of needing the world to fix themselves up.

This patch fixes the following build error with icu 76, also seen by Fedora[1]:

/bin/ld: unicrash.o: undefined reference to symbol 'uiter_setString_76' /bin/ld: /lib/libicuuc.so.76: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [../include/buildrules:65: xfs_scrub] Error 1 make[1]: *** [include/buildrules:35: scrub] Error 2

---
Changes since v1:

• Expand patch description with Darrick's suggestion.

v1: https://lore.kernel.org/linux-xfs/[email protected]/

 m4/package_icu.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
m4/package_icu.m4 +1 -1
index 3ccbe0cc..6b89c874 100644
@@ -1,5 +1,5 @@
 AC_DEFUN([AC_HAVE_LIBICU],
-  [ PKG_CHECK_MODULES([libicu], [icu-i18n], [have_libicu=yes], [have_libicu=no])
+  [ PKG_CHECK_MODULES([libicu], [icu-i18n icu-uc], [have_libicu=yes], [have_libicu=no])
     AC_SUBST(have_libicu)
     AC_SUBST(libicu_CFLAGS)
     AC_SUBST(libicu_LIBS)

base-commit: 90d6da68ee54e6d4ef99eca4a82cac6036a34b00

Signature · 1 line
2.47.0