[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #57406] mbsinit.c fails to compile with GCC 9.2.0 on MinGW-w64 (i68

From: Martin Storsjö
Subject: [bug #57406] mbsinit.c fails to compile with GCC 9.2.0 on MinGW-w64 (i686)
Date: Tue, 17 Dec 2019 08:30:22 -0500 (EST)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.2 Safari/605.1.15

Follow-up Comment #6, bug #57406 (project gettext):

Hi Bruno,

[comment #5 comment #5:]
> OK, I've looked at this release and pushed a (probable) fix into gnulib:
> It will propagate into packages over time. So that you can test it now, I've
built a testdir from the gnulib sources:
> https://haible.de/bruno/gnu/testdir-posix-mingw.tar.gz

Awesome, thanks! The fix for this matter seems to work fine for me.

I'm running into some other build issues in the gltests subdirectory though,
in my clang/libc++/ucrt setup, but I'll investigate that closer so I
understand the root cause before making any more noise about it, and I'll file
that issue directly with gnulib when I understand it.

> > Since a couple years, mingw-w64 can be configured to use the new Windows
> I didn't know of this. I'm always using and testing what the mingw-w64
packages from Cygwin give me by default.

The UCRT support is tricky as it effectively alters the ABI for most things
that interacts with the crt, so it's hard to gradually enable it in an
existing setup, it's possible to use it primarily when building a new sysroot
from scratch and only building things from source.

> > Currently with UCRT, there's only a header inline definition of mbsinit
> Since
> 1) POSIX mandates and gnulib expects that functions are actually available
as function pointers,
> 2) Gnulib cannot attach a warning message to an inline function, only to
functions declared with an 'extern' prototype,
> this is likely to cause trouble.
> Possibly symptoms of this trouble are:
> - a syntax error in gnulib's wchar.h override,
> - a compilation failure in test-wchar.c or test-wchar-c++.cc.
> This trouble can be worked around in gnulib, of course, but it would be
better if it were not present in the first place.
> > If I make mingw-w64 provide an mbsinit function in libraries for UCRT (the
second patch above), the gnulib build breaks ...
> > I don't know off-hand what the best path forward would be.
> How about simply waiting one year or two, then only add the mbsinit function
in mingw-w64? This would give the packages (bison, coreutils, cpio, diffutils,
gettext, grep, sed, tar, ...) time to pick up the gnulib change from today and
prepare a new release.
> The 7.0.0 release is out of the door; therefore third-party software must
interoperate with it, regardless whether you add the mbsinit function now in
7.0.1 or later in 7.x.

That sounds good! I tested the mbsinit/ucrt change in mingw-w64 with the test
package you provided, and it seems to work fine, so I'll hold off of it for
now, but try to get it integrated a bit later, when more packages have picked
up newer gnulib versions.


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]