Debian Bug report logs - #734765
zsh: FTBFS due to Inconsistent ifdefs in utils.c

version graph

Package: src:zsh; Maintainer for src:zsh is Debian Zsh Maintainers <pkg-zsh-devel@lists.alioth.debian.org>;

Reported by: Wookey <wookey@wookware.org>

Date: Thu, 9 Jan 2014 18:03:01 UTC

Severity: normal

Tags: moreinfo, upstream

Found in version zsh/5.0.5-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Zsh Maintainers <pkg-zsh-devel@lists.alioth.debian.org>:
Bug#734765; Package src:zsh. (Thu, 09 Jan 2014 18:03:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wookey <wookey@wookware.org>:
New Bug report received and forwarded. Copy sent to Debian Zsh Maintainers <pkg-zsh-devel@lists.alioth.debian.org>. (Thu, 09 Jan 2014 18:03:06 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Wookey <wookey@wookware.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: zsh: FTBFS due to Inconsistent ifdefs in utils.c
Date: Thu, 09 Jan 2014 17:59:28 +0000
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



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Zsh Maintainers <pkg-zsh-devel@lists.alioth.debian.org>:
Bug#734765; Package src:zsh. (Tue, 11 Mar 2014 23:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Axel Beckert <abe@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Zsh Maintainers <pkg-zsh-devel@lists.alioth.debian.org>. (Tue, 11 Mar 2014 23:33:04 GMT) Full text and rfc822 format available.

Message #10 received at 734765@bugs.debian.org (full text, mbox):

From: Axel Beckert <abe@debian.org>
To: Wookey <wookey@wookware.org>, 734765@bugs.debian.org
Subject: Re: [Pkg-zsh-devel] Bug#734765: zsh: FTBFS due to Inconsistent ifdefs in utils.c
Date: Wed, 12 Mar 2014 00:31:40 +0100
Control: tag -1 + moreinfo

Hi Wookey,

Wookey wrote:
> zsh failed to build, dying at Src/utils.c
> with 'ucs4toutf8 not defined'.
[...]
> -- 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)

Am I right that this happened to you on Debian Wheezy? Or was it on a
different machine than the report was written? (If so, which
distribution and which architecture?)

I can't reproduce this on Sid amd64. And Wheezy doesn't have the
proper build-dependencies, namely texinfo >= 5 -- but this can be
tweaked by removing one patch IIRC. Never tried though since I added
that build-dependency and the according patch.

I'll soon upload 5.0.5-2 which fixes another FTBFS. Maybe this will
bring some more details to daylight.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



Added tag(s) moreinfo. Request was from Axel Beckert <abe@debian.org> to 734765-submit@bugs.debian.org. (Tue, 11 Mar 2014 23:33:04 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 15:36:10 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.