Activity log for bug #1826172

Date Who What changed Old value New value Message
2019-04-24 09:45:13 Gwendolyn Haller bug added bug
2019-04-24 09:48:11 Gwendolyn Haller description Compilation against latest GIT version fails at the following step: CC qga/commands.o In file included from qga/commands.c:13: C:/Tempy-chan/qemu/include/qemu/osdep.h:97: error: "__USE_MINGW_ANSI_STDIO" redefined [-Werror] #define __USE_MINGW_ANSI_STDIO 1 In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h:9, from C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_stdarg.h:14, from C:/msys64/mingw64/x86_64-w64-mingw32/include/stdarg.h:140, from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/8.3.0/include/stdarg.h:1, from C:/Tempy-chan/qemu/include/qemu/osdep.h:88, from qga/commands.c:13: C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h:431: note: this is the location of the previous definition #define __USE_MINGW_ANSI_STDIO 0 /* was not defined so it should be 0 */ cc1.exe: all warnings being treated as errors make: *** [/c/Tempy-chan/qemu/rules.mak:69: qga/commands.o] Error 1 Passing --extra-cflags="-D__USE_MINGW_ANSI_STDIO" to configure resolves the error. Digging deeper in x86_64-w64-mingw32/include/_mingw.h, it looks like __USE_MINGW_ANSI_STDIO is only defined for _GNU_SOURCE in C++ compilation. With C only code it's ignored and doesn't define __USE_MINGW_ANSI_STDIO as expected: /* We are activating __USE_MINGW_ANSI_STDIO for various define indicators. Note that we enable it also for _GNU_SOURCE in C++, but not for C case. */ #if (defined (_POSIX) || defined (_POSIX_SOURCE) || defined (_POSIX_C_SOURCE) \ || defined (_ISOC99_SOURCE) \ || defined (_XOPEN_SOURCE) || defined (_XOPEN_SOURCE_EXTENDED) \ || (defined (_GNU_SOURCE) && defined (__cplusplus)) \ || defined (_SVID_SOURCE)) \ && !defined(__USE_MINGW_ANSI_STDIO) /* Enable __USE_MINGW_ANSI_STDIO if _POSIX defined * and If user did _not_ specify it explicitly... */ # define __USE_MINGW_ANSI_STDIO 1 #endif Compilation against GIT master fails at the following step:   CC qga/commands.o In file included from qga/commands.c:13: C:/Tempy-chan/qemu/include/qemu/osdep.h:97: error: "__USE_MINGW_ANSI_STDIO" redefined [-Werror]  #define __USE_MINGW_ANSI_STDIO 1 In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h:9,                  from C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_stdarg.h:14,                  from C:/msys64/mingw64/x86_64-w64-mingw32/include/stdarg.h:140,                  from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/8.3.0/include/stdarg.h:1,                  from C:/Tempy-chan/qemu/include/qemu/osdep.h:88,                  from qga/commands.c:13: C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h:431: note: this is the location of the previous definition  #define __USE_MINGW_ANSI_STDIO 0 /* was not defined so it should be 0 */ cc1.exe: all warnings being treated as errors make: *** [/c/Tempy-chan/qemu/rules.mak:69: qga/commands.o] Error 1 Passing --extra-cflags="-D__USE_MINGW_ANSI_STDIO" to configure resolves the error. Digging deeper in x86_64-w64-mingw32/include/_mingw.h, it looks like __USE_MINGW_ANSI_STDIO is only defined for _GNU_SOURCE in C++ compilation. With C only code it's ignored and doesn't define __USE_MINGW_ANSI_STDIO as expected: /* We are activating __USE_MINGW_ANSI_STDIO for various define indicators.    Note that we enable it also for _GNU_SOURCE in C++, but not for C case. */ #if (defined (_POSIX) || defined (_POSIX_SOURCE) || defined (_POSIX_C_SOURCE) \      || defined (_ISOC99_SOURCE) \      || defined (_XOPEN_SOURCE) || defined (_XOPEN_SOURCE_EXTENDED) \      || (defined (_GNU_SOURCE) && defined (__cplusplus)) \      || defined (_SVID_SOURCE)) \     && !defined(__USE_MINGW_ANSI_STDIO) /* Enable __USE_MINGW_ANSI_STDIO if _POSIX defined  * and If user did _not_ specify it explicitly... */ # define __USE_MINGW_ANSI_STDIO 1 #endif
2019-05-09 16:31:45 Peter Maydell qemu: status New Fix Committed
2019-08-16 05:16:11 Thomas Huth qemu: status Fix Committed Fix Released