Discussion:
stdint broken on mingw
(too old to reply)
T J
2016-12-29 11:29:49 UTC
Permalink
Raw Message
Hello,

Stdint.h fails to compile on mingw-w64/MSYS2. Please see the attached log.

https://ci.appveyor.com/project/fontforge/fontforge/build/1.0.349

In particular, this is the generated from stdint.h:

> /* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
wint_t. */
> #if
> # undef WINT_MIN
> # undef WINT_MAX
> # define WINT_MIN 0x0U
> # define WINT_MAX 0xffffffffU
> #endif

The `#if` statement is invalid.

I believe this is related to this thread: https://lists.gnu.org/archive/html/bug-gnulib/2016-12/msg00090.html

Thanks,
Jeremy
Bruno Haible
2016-12-30 13:51:23 UTC
Permalink
Raw Message
Hi,

> In particular, this is the generated from stdint.h:
>
> > /* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
> wint_t. */
> > #if
> > # undef WINT_MIN

I don't understand how, given the existing code, @GNULIB_OVERRIDES_WINT_T@ can
be substituted with an empty string.

Can you please show the result of

$ grep -n GNULIB_OVERRIDES_WINT_T config.status lib/Makefile

Thanks.

Bruno
T J
2016-12-31 01:49:58 UTC
Permalink
Raw Message
Hi Bruno,



This is the output:



$grep -n GNULIB_OVERRIDES_WINT_T config.status lib/Makefile

lib/Makefile:2041: -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \

lib/Makefile:2722: -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \



Thanks,

Jeremy



From: Bruno Haible<mailto:***@clisp.org>
Sent: Friday, 30 December 2016 9:51 PM
To: T J<mailto:***@outlook.com>; bug-***@gnu.org<mailto:bug-***@gnu.org>
Subject: Re: stdint broken on mingw



Hi,

> In particular, this is the generated from stdint.h:
>
> > /* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
> wint_t. */
> > #if
> > # undef WINT_MIN

I don't understand how, given the existing code, @GNULIB_OVERRIDES_WINT_T@ can
be substituted with an empty string.

Can you please show the result of

$ grep -n GNULIB_OVERRIDES_WINT_T config.status lib/Makefile

Thanks.

Bruno
T J
2016-12-31 04:37:49 UTC
Permalink
Raw Message
With some further investigation, I think I know what is happening now.

In my build script, I include the path /mingw32/share/aclocal as an aclocal search path. It so happens that this contains wint_t.m4, and this version does not have the GNULIB_OVERRIDES_WINT_T section in it. So bootstrap is actually including this file instead of the one provided by gnulib.

Some further digging shows that this file is installed by gettext:

$pacman -Qo /mingw32/share/aclocal/wint_t.m4
/mingw32/share/aclocal/wint_t.m4 is owned by mingw-w64-i686-gettext 0.19.7-1


Thanks,
Jeremy
From: T J<mailto:***@outlook.com>
Sent: Saturday, 31 December 2016 9:50 AM
To: Bruno Haible<mailto:***@clisp.org>; bug-***@gnu.org<mailto:bug-***@gnu.org>
Subject: RE: stdint broken on mingw


Hi Bruno,



This is the output:



$grep -n GNULIB_OVERRIDES_WINT_T config.status lib/Makefile

lib/Makefile:2041: -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \

lib/Makefile:2722: -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \



Thanks,

Jeremy



From: Bruno Haible<mailto:***@clisp.org>
Sent: Friday, 30 December 2016 9:51 PM
To: T J<mailto:***@outlook.com>; bug-***@gnu.org<mailto:bug-***@gnu.org>
Subject: Re: stdint broken on mingw



Hi,

> In particular, this is the generated from stdint.h:
>
> > /* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
> wint_t. */
> > #if
> > # undef WINT_MIN

I don't understand how, given the existing code, @GNULIB_OVERRIDES_WINT_T@ can
be substituted with an empty string.

Can you please show the result of

$ grep -n GNULIB_OVERRIDES_WINT_T config.status lib/Makefile

Thanks.

Bruno
Bruno Haible
2016-12-31 09:47:55 UTC
Permalink
Raw Message
Hi Jeremy,

> With some further investigation, I think I know what is happening now.
>
> In my build script, I include the path /mingw32/share/aclocal as an aclocal search path. It so happens that this contains wint_t.m4, and this version does not have the GNULIB_OVERRIDES_WINT_T section in it. So bootstrap is actually including this file instead of the one provided by gnulib.

This explains indeed why GNULIB_OVERRIDES_WINT_T can come
out as empty. Thanks for this confirmation that it is not
a bug in gnulib.

Generally, in 'aclocal' invocations, use -I options to
specify:
- first, the directory(ies) containing *.m4 files of
your package and the directory containing *.m4 files
coming from gnulib,
- *after that*, directories outside your package.
This is optional: when automake was installed with
--prefix=/foo, it will automatically search
/foo/share/aclocal/. See
https://www.gnu.org/software/automake/manual/html_node/Macro-Search-Path.html

Bruno
Loading...