[Pkg-zsh-devel] Bug#734765: zsh: FTBFS due to Inconsistent ifdefs in utils.c
Wookey
wookey at wookware.org
Thu Jan 9 17:59:28 UTC 2014
Source: zsh
Version: 5.0.5-1
Severity: normal
Tags: upstream
zsh failed to build, dying at Src/utils.c
with 'ucs4toutf8 not defined'.
The issue tuned out to be that the ifdefs round the function definition
for ucs4toutf8 are not the same as the ones round the function usage, so
it's possible to end up using when it's not defined.
# if defined(HAVE_NL_LANGINFO) && defined(CODESET) && !defined(__STDC_ISO_10646__)
/* Convert a character from UCS4 encoding to UTF-8 */
static size_t
ucs4toutf8(char *dest, unsigned int wval)
{
....
}
and later:
#if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) && defined(__STDC_ISO_10646__)
...
#else
# if defined(HAVE_NL_LANGINFO) && defined(CODESET)
...
count = ucs4toutf8(t, wval);
So on a machine with these defined:
HAVE_NL_LANGINFO
__STDC_ISO_10646__
CODESET
but not
HAVE_WCTOMB
then it tries to use ucs4toutf8 without defining it, which is wrong.
I'm not at all familiar with this code or subject so I'm not sure what
the right fix is, but this logic can't be right.
Now it turns out that I only hit this issue due a compiler bug causing
the HAVE_WCTOMB configure test to fail so it may be that this only
occurs on vanishingly rare occaisions, but it still looks like this
logic is broken so I'm reporting it.
Simply removing the "&& !defined(__STDC_ISO_10646__)" part of the
function definition test would make them match up, or adding it to the
function usage.
You may just wish to punt this upstream and let them work it out.
-- System Information:
Debian Release: 7.3
APT prefers stable
APT policy: (990, 'stable')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-kvm-i386-20110111 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
More information about the Pkg-zsh-devel
mailing list