bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #65346] Five test failures in gettext-0.22.5


From: Bruno Haible
Subject: [bug #65346] Five test failures in gettext-0.22.5
Date: Sat, 24 Feb 2024 17:25:09 -0500 (EST)

Follow-up Comment #6, bug#65346 (group gettext):

Usually the gl_LIBUNISTRING_MODULE and libunistring-optional.m4 logic
determines correctly whether to use the installed libunistring or not. But it
can produce a wrong decision in complex situations:

In FreeBSD 14.0, I had a libunistring 1.1 installed in /usr/local and a
libunistring 1.2 installed in /some/prefix. Due to the way the -I options got
accumulated, /some/prefix/include came before /usr/local/include; and due to
the way the linker searches for libraries, /usr/local/lib came before
/some/prefix/lib. So, at configure time, when <unistring/version.h> was
tested, it found libunistring 1.2, i.e. LIBUNISTRING_VERSION_MAJOR=1 and
LIBUNISTRING_VERSION_MINOR=2. The test from modules/unictype/ctype-alnum

gl_LIBUNISTRING_MODULE([1.2], [unictype/ctype-alnum])

thus set the LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_ALNUM conditional to false.
The source file gettext-tools/gnulib-lib/unictype/ctype_alnum.c was thus not
being compiled. Thus libgnu.a did not contain a definition of the symbol
uc_is_alnum. Then, when linking the program test-ctype_alnum, since this
symbol was not found in libgnu.a, the linker took it from libunistring.so. But
this happened to be /usr/local/lib/libunistring.so. And so, at runtime, the
combination of a unit test for Unicode 15.1.0 with a uc_is_alnum function at
the Unicode 15.0.0 level caused a test failure.

Basically, the build system did do the right thing when confronted with an
include file that says "this is libunistring 1.2" together with a libunistring
1.1 library.

In order to do the right thing, it should have looked at the value of the
_libunistring_version constant (when not cross-compiling). Just an idea in
case this gets reported more often...


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65346>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]