Hi Hans-Bernhard, On Aug 21 00:09, Hans-Bernhard Bröker wrote: > Hello everyone, > > FWIW, I can't get the current may git clone of Cygwin to build on the > current release version of itself: (64-bit "Current" on Win10): > > /home/hbbro/prg/cygwin/bld/x86_64-unknown-cygwin/newlib/libc/libc.a(lib_a-wcwidth.o): > In function `__wcwidth': > /home/hbbro/prg/cygwin/bld/x86_64-unknown-cygwin/newlib/libc/string/../../../../../newlib-cygwin/newlib/libc/string/wcwidth.c:301: > undefined reference to `__locale_cjk_lang' > /home/hbbro/prg/cygwin/bld/x86_64-unknown-cygwin/newlib/libc/citrin/../../../../../newlib-cygwin/newlib/libc/string/wcwidth.c:301:(.text+0xa4):relocation > truncated to fit: R_X86_64_PC32 against undefined symbol `__locale_cjk_lang' > collect2: error: ld returned 1 exit status > make: *** [Makefile:670: cygwin0.dll] Error 1 > > > Adding > > #include "../locale/setlocale.h" > > in libc/string/wcwidth.c appears to fix this. thanks for the report, but I can't reproduce this. I can build Cygwin fine natively as well as on Linux, with and without optimization. gcc -H shows how setlocale.h is already included via the inclusion of ./local.h --> ../ctype/local.h (simplified for readability): newlib/libc/string/wcwidth.c . newlib/libc/string/local.h .. newlib/libc/string/../ctype/local.h ... newlib/libc/string/../ctype/../locale/setlocale.h This even works for me when building from within the source dir, which isn't a supported build configuration. So why does this fail for you? I wonder if some compile time settings are responsible for this problem. How do you build Cygwin from the git repo? Do you use some special debug options or something like that? Btw., there *is* a minor glitch in string/local.h. The extern declaration of __locale_cjk_lang should have been removed when changing __locale_cjk_lang to an always inline function in setlocale.h, but it has no negative impact on my builds. I just removed the declaration. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat