Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 2 Apr 2003 11:24:11 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Cc: Chet Ramey <chet@po.cwru.edu>
Subject: Re: Missing symbols when I compile bash-2.05b-9
Message-ID: <20030402092411.GW18138@cygbert.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com, Chet Ramey <chet@po.cwru.edu>
References: <F105Uqp2T0apMHi0SYN00002a1c@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <F105Uqp2T0apMHi0SYN00002a1c@hotmail.com>
User-Agent: Mutt/1.4.1i

On Tue, Apr 01, 2003 at 07:05:07PM -0500, Jocelyn Giroux wrote:
> Hi,
> 
> I am trying to compile bash and I always get errors at link time. There are 
> undefined reference to `_wcscoll' and `_wcwidth' symbol.

You're right.  The problem is that since the last time I compiled bash,
newlib has changed.  It now defines a lot of multibyte character
functions and has the appropriate headers but unfortunately it doesn't 
define *all* required functions so far.  Bash tests the existence of
three headers (wchar.h, wctype.h, langinfo.h) and two functions
(mbstowcs, wcwidth) to infer that multibyte support as a whole is
available.  Unfortunately, bash uses only the existence of mbstowcs
to switch on multibyte support and it does so in three different files :-(

Actually, as a workaround I suggest to patch these three files:

config-bot.h, line 110
include/shmbutil.h, line 36
lib/readline/rlmbutil.h, line 38

change

  #  if defined (HAVE_MBSTOWCS) /* system is supposed to support XPG5 */

to

  #  if defined (HAVE_WCWIDTH) /* system is supposed to support XPG5 */

This is only a temporary solution but the result is the same as today,
no multibyte support in Cygwin bash.  The long term should add wcscoll,
wcwidth and other still missing functions to newlib.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

