On 2026-11-17 I did:
>       * modules/uniwidth/*:  Bump required libunistring version.
>       * modules/unilbrk/*-width-linebreaks: Likewise.

and now, when building GNU gettext with the newest gnulib and with a
preinstalled libunistring-1.5, I get this link error:

/usr/bin/x86_64-linux-gnu-ld: 
./.libs/libgettextsrc.a(libgettextlib_la-u8-width-linebreaks.o): in function 
`u8_width_linebreaks_internal':
/GETTEXT/gettext/gettext-tools/gnulib-lib/unilbrk/u8-width-linebreaks.c:42:(.text+0x43):
 undefined reference to `u8_possible_linebreaks_loop'
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:5725: msgmerge] Error 1

The cause is that
  - Module unilbrk/u8-width-linebreaks is compiled from source (since it is
    marked with 1.6),
  - Module unilbrk/u8-possible-linebreaks is not compiled from source but
    taken from the preinstalled libunistring,
  - But since unilbrk/u8-width-linebreaks needs the symbol
    u8_possible_linebreaks_loop, which is not visible in the preinstalled
    libunistring (it is either renamed or has hidden ELF visibility), there
    is a link error.

This patch fixes it.


2026-12-02  Bruno Haible  <[email protected]>

        Fix link error when libunistring 1.5 is preinstalled (regr. 2026-11-17).
        * modules/unilbrk/u*-possible-linebreaks (configure.ac): Bump required
        libunistring version.
        * modules/unilbrk/u*-width-linebreaks (configure.ac): Add comment.

diff --git a/modules/unilbrk/u8-possible-linebreaks 
b/modules/unilbrk/u8-possible-linebreaks
index 1bd65c5bda..7c1f5381de 100644
--- a/modules/unilbrk/u8-possible-linebreaks
+++ b/modules/unilbrk/u8-possible-linebreaks
@@ -14,7 +14,7 @@ streq-opt
 bool
 
 configure.ac:
-gl_LIBUNISTRING_MODULE([1.5], [unilbrk/u8-possible-linebreaks])
+gl_LIBUNISTRING_MODULE([1.6], [unilbrk/u8-possible-linebreaks])
 
 Makefile.am:
 if LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS
diff --git a/modules/unilbrk/u8-width-linebreaks 
b/modules/unilbrk/u8-width-linebreaks
index ef1f4a0ea7..3a4e259779 100644
--- a/modules/unilbrk/u8-width-linebreaks
+++ b/modules/unilbrk/u8-width-linebreaks
@@ -12,6 +12,8 @@ uniwidth/width
 unistr/u8-mbtouc-unsafe
 
 configure.ac:
+# Note: When bumping this version number, you need to bump the one in
+# modules/unilbrk/u8-possible-linebreaks to the same value.
 gl_LIBUNISTRING_MODULE([1.6], [unilbrk/u8-width-linebreaks])
 
 Makefile.am:
diff --git a/modules/unilbrk/u16-possible-linebreaks 
b/modules/unilbrk/u16-possible-linebreaks
index ae1c7ceeca..1414fd8f51 100644
--- a/modules/unilbrk/u16-possible-linebreaks
+++ b/modules/unilbrk/u16-possible-linebreaks
@@ -14,7 +14,7 @@ streq-opt
 bool
 
 configure.ac:
-gl_LIBUNISTRING_MODULE([1.5], [unilbrk/u16-possible-linebreaks])
+gl_LIBUNISTRING_MODULE([1.6], [unilbrk/u16-possible-linebreaks])
 
 Makefile.am:
 if LIBUNISTRING_COMPILE_UNILBRK_U16_POSSIBLE_LINEBREAKS
diff --git a/modules/unilbrk/u16-width-linebreaks 
b/modules/unilbrk/u16-width-linebreaks
index 6a5d3f8abc..2bd8d8ee27 100644
--- a/modules/unilbrk/u16-width-linebreaks
+++ b/modules/unilbrk/u16-width-linebreaks
@@ -11,6 +11,8 @@ uniwidth/width
 unistr/u16-mbtouc-unsafe
 
 configure.ac:
+# Note: When bumping this version number, you need to bump the one in
+# modules/unilbrk/u16-possible-linebreaks to the same value.
 gl_LIBUNISTRING_MODULE([1.6], [unilbrk/u16-width-linebreaks])
 
 Makefile.am:
diff --git a/modules/unilbrk/u32-possible-linebreaks 
b/modules/unilbrk/u32-possible-linebreaks
index b4629f4697..a3cf9bddd4 100644
--- a/modules/unilbrk/u32-possible-linebreaks
+++ b/modules/unilbrk/u32-possible-linebreaks
@@ -13,7 +13,7 @@ streq-opt
 bool
 
 configure.ac:
-gl_LIBUNISTRING_MODULE([1.5], [unilbrk/u32-possible-linebreaks])
+gl_LIBUNISTRING_MODULE([1.6], [unilbrk/u32-possible-linebreaks])
 
 Makefile.am:
 if LIBUNISTRING_COMPILE_UNILBRK_U32_POSSIBLE_LINEBREAKS
diff --git a/modules/unilbrk/u32-width-linebreaks 
b/modules/unilbrk/u32-width-linebreaks
index 167c502f98..2fa3a8b2ea 100644
--- a/modules/unilbrk/u32-width-linebreaks
+++ b/modules/unilbrk/u32-width-linebreaks
@@ -10,6 +10,8 @@ unilbrk/u32-possible-linebreaks
 uniwidth/width
 
 configure.ac:
+# Note: When bumping this version number, you need to bump the one in
+# modules/unilbrk/u32-possible-linebreaks to the same value.
 gl_LIBUNISTRING_MODULE([1.6], [unilbrk/u32-width-linebreaks])
 
 Makefile.am:




Reply via email to