GIT source build failure: wcwidth.c::_wcwidth misses __locale_cjk_lang()

Hans-Bernhard Bröker HBBroeker@t-online.de
Mon Aug 22 01:31:00 GMT 2016


[Now subscribed to newlib list to follow this there, too]

Hi Corinna, hi everyone on both lists

Am 21.08.2016 um 20:15 schrieb Corinna Vinschen:
> [CC newlib mailing list since it affects newlib in the first place]

> On Aug 21 14:28, Hans-Bernhard Bröker wrote:
>> Am 21.08.2016 um 12:30 schrieb Corinna Vinschen:

>> And while I'm at it: what _is_ the dependency handling here, anyway?  I
>> can't seem to find any.  Which could indeed explain the problem.

> That's because dependency handling is basically non-existing in newlib.

> Nobody added a patch yet to do that.  Newlib being open-source, there's
> of course nothing keeping anybody from adding it (*nudge*, *nudge*).

That wouldn't be so much a patch as a redesign, I'm afraid, because it's 
strongly tied to the following:

> A big problem for many people keeping them from provide patches to the
> configury is that newlib's build system still requires the automake
> --cygnus option, which isn't supported by automake for quite some time.

And one of the effects of --cygnus is: to enables option 
"no-dependencies", thus turning off dependency tracking.  Hrmpf.

So let's see how far I get trying to un--cygnusify newlib (as part of 
Cygwin):

1) Get rid of for'cygnus' options. In all 134 Makefile.am replace

	AUTOMAKE_OPTIONS = cygwin
by 	AUTOMAKE_OPTIONS = foreign no-installinfo no-dist
and delete cygnus from one or two AM_INIT([]) calls, too

2) autoupdate in newlib, using autoconf-2.69 and automake-1.15
3) autoreconf in newlib, using autoconf-2.69 and automake-1.15
4) run "make" in my build dir
5) touch libc/locale/setlocale.h
6) run "make" again

Et voila!  Step 6 now recompiles 4 files that depend on setlocale.h, 
then re-builds the libraries using them

7) Get a rough glimpse of what I did:

$ git diff --stat newlib | tail -1
  438 files changed, 264967 insertions(+), 101151 deletions(-)

Well, that's what you get for having generated files like Makefile.in, 
configure and aclocal.m4 in version control...


> The trick is to use an older versions of automake for rebuilding the
> configury.  I'm having goods results with this script, which can be
> called from newlib or the libc/libm subdirs:
>
>   #!/bin/bash
>   aclocal-1.12.2 -I. -I..
>   autoconf
>   automake-1.12.2 --cygnus --no-force

Side note: in a cygwin environment (or any that uses Gentoo's 
automake/autoconf wrapper scripts), this should be reducible to:

	WANT_AUTOMAKE=1.12 autoreconf -I. -I..

But I'm afraid the time this approach worked reliably may be nearing its 
end.  Automake-1.11/1.12 appears to be no longer fully compatible with 
current versions of Perl.  At least I don't remember having had error 
messages like this back when 1.12 or 1.11 were still on point:

main::scan_file() called too early to check prototype at 
/usr/bin/aclocal-1.11 line 644.

> The autoconf version actually doesn't matter much so I'm using 2.69.

That did not work for me. config/override.m4 insisted rather strictly 
that only 2.64 is allowed to be used.  I shredded lines 30ff. from that 
file to get past that one.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list