https://bugs.winehq.org/show_bug.cgi?id=54263
Bug ID: 54263 Summary: Build of 7.22 fails with mingw-w64 10.0 (multiple symbol redefinitions) Product: Wine Version: 7.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: ilg@livius.net Distribution: ---
I have severl build scripts that I use to create the wine-xpack distribution (https://github.com/xpack-dev-tools/wine-xpack/), and I successfully compiled 6.17, 6.23 and 7.22 with gcc 11.3 & mingw-w64 9.0.
When I tried to build 7.22 with the latest gcc 12.2 & mingw-w64 10.0, I got multiple redefinition errors, for symbols from the sprintf family.
For example:
/home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/dlls/ntdll/printf.c:56:11: error: redefinition of '_vsnprintf' 56 | int CDECL _vsnprintf( char *str, size_t len, const char *format, va_list args ) | ^~~~~~~~~~ In file included from /home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/dlls/ntdll/printf.c:27: /home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/include/msvcrt/stdio.h:174:27: note: previous definition of '_vsnprintf' with type 'int(char *, size_t, const char *, char *)' {aka 'int(char *, long long unsigned int, const char *, char *)'} 174 | static inline int __cdecl _vsnprintf(char *buffer, size_t size, const char *format, va_list args) | ^~~~~~~~~~ /home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/dlls/ntdll/printf.c:69:11: error: redefinition of '_vsnwprintf' 69 | int CDECL _vsnwprintf( WCHAR *str, size_t len, const WCHAR *format, va_list args ) | ^~~~~~~~~~~ In file included from /home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/include/msvcrt/stdio.h:11: /home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/include/msvcrt/corecrt_wstdio.h:99:27: note: previous definition of '_vsnwprintf' with type 'int(wchar_t *, size_t, const wchar_t *, char *)' {aka 'int(short unsigned int *, long long unsigned int, const short unsigned int *, char *)'} 99 | static inline int __cdecl _vsnwprintf(wchar_t *buffer, size_t size, const wchar_t *format, va_list args) | ^~~~~~~~~~~ /home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/dlls/ntdll/printf.c:82:11: error: redefinition of '_vscprintf' 82 | int CDECL _vscprintf( const char *format, va_list valist ) | ^~~~~~~~~~ /home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/include/msvcrt/stdio.h:201:27: note: previous definition of '_vscprintf' with type 'int(const char *, char *)' 201 | static inline int __cdecl _vscprintf(const char *format, va_list args) | ^~~~~~~~~~ /home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/dlls/ntdll/printf.c:91:11: error: redefinition of '_vscwprintf' 91 | int CDECL _vscwprintf( const wchar_t *format, va_list args ) | ^~~~~~~~~~~ /home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/include/msvcrt/corecrt_wstdio.h:195:27: note: previous definition of '_vscwprintf' with type 'int(const wchar_t *, char *)' {aka 'int(const short unsigned int *, char *)'} 195 | static inline int __cdecl _vscwprintf(const wchar_t *format, va_list args) | ^~~~~~~~~~~ /home/ilg/Work/wine-xpack.git/build/linux-x64/sources/wine-7.22/dlls/ntdll/printf.c:115:13: error: redefinition of '_snwprintf' 115 | int WINAPIV _snwprintf( WCHAR *str, size_t len, const WCHAR *format, ... ) | ^~~~~~~~~~
I patched ntdll/printf.c to omit the new definitions and the builds advanced, but later failed in string.c with other set of multiple definitions, later in wcstring.c, and so on.
I gave up and returned to the older toolchain.
Am I missing something when configuring the build, or the wine sources are not yet updated for mingw-w64 10.0?