http://bugs.winehq.org/show_bug.cgi?id=30980
Bug #: 30980 Summary: cross compiling with mingw64 is broken Product: Wine Version: 1.5.7 Platform: x86 OS/Version: Linux Status: NEW Keywords: download, source Severity: normal Priority: P2 Component: build-env AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com Classification: Unclassified
Created attachment 40661 --> http://bugs.winehq.org/attachment.cgi?id=40661 patch
make[1]: Entering directory `/home/austin/wine-git/build-mingw/dlls/crtdll' i686-w64-mingw32-gcc -c -I../../../wine-cross-temp/dlls/crtdll -I. -I../../../wine-cross-temp/include -I../../include -I../../../wine-cross-temp/include/msvcrt -D__WINESRC__ -D_REENTRANT -Wall -pipe -fno-strength-reduce -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wwrite-strings -fno-omit-frame-pointer -Wpointer-arith -Wlogical-op -g -O2 -D_WIN32 -fno-builtin -o crtdll_main.o ../../../wine-cross-temp/dlls/crtdll/crtdll_main.c In file included from ../../../wine-cross-temp/include/msvcrt/sys/stat.h:11:0, from ../../../wine-cross-temp/dlls/crtdll/crtdll_main.c:25: ../../../wine-cross-temp/include/msvcrt/crtdefs.h:195:16: error: redefinition of ���struct localeinfo_struct��� /usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/_mingw.h:649:16: note: originally defined here ../../../wine-cross-temp/include/msvcrt/crtdefs.h:199:3: error: conflicting types for ���_locale_tstruct��� /usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/_mingw.h:652:3: note: previous declaration of ���_locale_tstruct��� was here ../../../wine-cross-temp/include/msvcrt/crtdefs.h:199:21: error: conflicting types for ���_locale_t��� /usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/_mingw.h:652:20: note: previous declaration of ���_locale_t��� was here make[1]: *** [crtdll_main.o] Error 1 make[1]: Leaving directory `/home/austin/wine-git/build-mingw/dlls/crtdll' make: *** [dlls/crtdll] Error 2
I'll attach a workaround, though I'm not sure if we should prefer mingw or wine's definition here.
http://bugs.winehq.org/show_bug.cgi?id=30980
Jacek Caban jacek@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jacek@codeweavers.com Resolution| |UPSTREAM
--- Comment #1 from Jacek Caban jacek@codeweavers.com 2012-07-04 08:13:21 CDT --- Fixed upstream.
http://bugs.winehq.org/show_bug.cgi?id=30980
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Austin English austinenglish@gmail.com 2012-07-05 08:04:59 CDT --- Closing since it's fixed.
http://bugs.winehq.org/show_bug.cgi?id=30980
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh@gmail.com
--- Comment #3 from Jerome Leclanche adys.wh@gmail.com 2012-07-05 18:23:17 CDT --- Fix url: http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64?view=revision&revi...
http://bugs.winehq.org/show_bug.cgi?id=30980
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fgouget@codeweavers.com
--- Comment #4 from François Gouget fgouget@codeweavers.com 2012-07-28 02:22:30 CDT --- Just in case anyone is interested...
I have built updated mingw-w64-i686-dev and mingw-w64-x86-64-dev packages for Debian with the fix for bug 30980.
These are the packages one would use to cross-compile Wine to Windows PE executables, typically to produce 32 and 64 bit Windows Winetest binaries.
Note that I had to add a couple of patches to get Wine to compile: * crtdefs.h uses wchar_t but does not define it which was causing trouble depending on the order of the includes in the source. * One of the _mingw.h includes was causing trouble. Replacing it with a crtdefs.h include like the others fixed the issue. There is still a ton of these so I'm not sure these packages are a full fix. But Wine compiles at least.
You'll find the modified packages there: * http://fgouget.free.fr/tmp/mingw-w64/mingw-w64-i686-dev_2.0.3-2_all.deb http://fgouget.free.fr/tmp/mingw-w64/mingw-w64-x86-64-dev_2.0.3-2_all.deb
Packages to generate 32 and 64 bit PE binaries respectively. The other packages in the suite are unmodified so grab them from your usual Debian repository.
* http://fgouget.free.fr/tmp/mingw-w64/mingw-w64_2.0.3-2.debian.tar.gz http://fgouget.free.fr/tmp/mingw-w64/mingw-w64_2.0.3.orig.tar.gz
The package source in case you need to rebuild them.
* http://fgouget.free.fr/tmp/mingw-w64/wine1.patch http://fgouget.free.fr/tmp/mingw-w64/wine2.patch
The two extra patches I applied, the first one based on Jacek's r5227 SVN MinGW commit.