http://bugs.winehq.org/show_bug.cgi?id=31790
Bug #: 31790 Summary: Compiling with -m32 fails in 64-bit ubuntu 12.04 Product: Wine Version: 1.5.13 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: jesse.pepper@thinkbottomup.com.au Classification: Unclassified
Use a 64-bit Linux, and save following as main.c:
#include <windows.h> int main(int argc, char **argv) { MessageBoxA(0,"test","app",0); return 0; }
This problem occurs in wine1.4 and wine1.5.
$ winegcc main.c -m32 -o main.exe.so /usr/bin/ld: Relocatable linking with relocations from format elf64-x86-64 (/usr/lib/x86_64-linux-gnu/wine/libwinecrt0.a(exe_entry.o)) to format elf32-i386 (main.0Ipbo4.o) is not supported winebuild: /usr/bin/ld failed with status 1 winegcc: winebuild failed
Apparently due to distros placing 32-bit libs in /usr/lib/i386-linux-gnu/ instead of /usr/lib32/
See also http://bugs.winehq.org/show_bug.cgi?id=24470