How to recompile Wine on ARM
i'm still interested in a link to a text telling you to delete a context...
for your new problem i wonder if your target supports thumb. Missing thumb support can lead to problems with some toolchains.
You should also specify the target to configure.
like that:
./configure --host=arm-linux-gnueabi --with-wine-tools=../wine-tools --without-freetype CFLAGS=" -mcpu=arm7tdmi" LDFLAGS=" -mcpu=arm7tdmi"
for your new problem i wonder if your target supports thumb. Missing thumb support can lead to problems with some toolchains.
You should also specify the target to configure.
like that:
./configure --host=arm-linux-gnueabi --with-wine-tools=../wine-tools --without-freetype CFLAGS=" -mcpu=arm7tdmi" LDFLAGS=" -mcpu=arm7tdmi"
Alright I dug through my internet history and found the link: http://www.winehq.org/wwn/285#Cross-Com ... 20Wine|WWN. In it Steve Edwards gives a basic example of how to recompile wine for the arm, but what he says is "Note there is no support for arm in Wineserver, kernel32 or ntdll so winelib won't run yet. Most everything else should compile as Winelib works on i386, PPC and SPARC. You might be able to get by, by stubbing the set_thread_context stuff out for simple apps." Which I misinterpreted as "delete the context," so that ones my bad. Some how when I got the error last night that was what came to my head. Also thanks for your response earlier, I will definitely give that a try!
Adding -mcpu=arm7tdmi to CFLAGS and LDFLAGS creates a nice new (worrying) error:André H. wrote:./configure --host=arm-linux-gnueabi --with-wine-tools=../wine-tools --without-freetype CFLAGS=" -mcpu=arm7tdmi" LDFLAGS=" -mcpu=arm7tdmi"
Code: Select all
ccache arm-linux-gnueabi-gcc -c -I/home/test/wine-git/dlls/user32 -I. -I/home/test/wine-git/include -I../../include -D__WINESRC__ -D_USER32_ -D_WINABLE_ -D_REENTRANT -fPIC -Wall -pipe -fno-strength-reduce -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith -Wlogical-op -g -O0 -mcpu=arm7tdmi -o message.o /home/test/wine-git/dlls/user32/message.c
/home/test/wine-git/dlls/user32/message.c: In function ‘handle_internal_message’:
/home/test/wine-git/dlls/user32/message.c:1886:1: error: unrecognizable insn:
(insn 10 9 11 3 /home/test/wine-git/dlls/user32/message.c:1844 (set (reg:SI 166)
(plus:SI (reg:SI 165)
(const_int 2147483648 [0x80000000]))) -1 (nil))
/home/test/wine-git/dlls/user32/message.c:1886:1: internal compiler error: in extract_insn, at recog.c:2103
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.5.1-7ubuntu1) 4.5.1
KenSharp, take this for what it is worth but I'm using the Sourcery G++ Lite 2008q3-72 found here http://www.codesourcery.com/sgpp/lite/a ... iption3057 and have had success with it in the past for projects on the arm. That being said even if you install and use this cross compiler you're going to run into the problems I'm having with the acledit dll. The only upside is that the problems I'm running into on my x86 box that I use for cross compiling, I also run when I try to compile natively on the arm device.
The full error is:
make[1]: Entering directory `/home/****/ARM_Wine/wineForArm/dlls/acledit'
/home/****/wine-git/wine-tools/tools/winegcc/winegcc -b arm-linux-gnueabi -B/home/****/wine-git/wine-tools/tools/winebuild --sysroot=../.. -fasynchronous-unwind-tables -shared ../../../dlls/acledit/acledit.spec main.o -o acledit.dll.so ../../libs/port/libwine_port.a -mcpu=arm7tdmi
winebuild: arm-linux-gnueabi-as failed with status 1
winegcc: /home/****/wine-git/wine-tools/tools/winebuild/winebuild failed
make[1]: *** [acledit.dll.so] Error 2
make[1]: Leaving directory `/home/****/ARM_Wine/wineForArm/dlls/acledit'
make: *** [dlls/acledit] Error 2
-------------------------------------------------------------------------------------
Andre as to your suggestion about whether the device supports "thumb," I assumed you were talking about gthumb which I downloaded to the native device and then tried to recompile wine which ended up being a no go. (But we may be talking about two different things, so if you would please clarify exactly what you're referring to as "thumb") One of my colleagues suggested that the error might actually be between my gcc and winegcc, because one maybe compiling in a different format that the assembler cannot understand, but I haven't tested this yet. Again thanks for your help!
The full error is:
make[1]: Entering directory `/home/****/ARM_Wine/wineForArm/dlls/acledit'
/home/****/wine-git/wine-tools/tools/winegcc/winegcc -b arm-linux-gnueabi -B/home/****/wine-git/wine-tools/tools/winebuild --sysroot=../.. -fasynchronous-unwind-tables -shared ../../../dlls/acledit/acledit.spec main.o -o acledit.dll.so ../../libs/port/libwine_port.a -mcpu=arm7tdmi
winebuild: arm-linux-gnueabi-as failed with status 1
winegcc: /home/****/wine-git/wine-tools/tools/winebuild/winebuild failed
make[1]: *** [acledit.dll.so] Error 2
make[1]: Leaving directory `/home/****/ARM_Wine/wineForArm/dlls/acledit'
make: *** [dlls/acledit] Error 2
-------------------------------------------------------------------------------------
Andre as to your suggestion about whether the device supports "thumb," I assumed you were talking about gthumb which I downloaded to the native device and then tried to recompile wine which ended up being a no go. (But we may be talking about two different things, so if you would please clarify exactly what you're referring to as "thumb") One of my colleagues suggested that the error might actually be between my gcc and winegcc, because one maybe compiling in a different format that the assembler cannot understand, but I haven't tested this yet. Again thanks for your help!
Hi,
That's from 2005, i started the ARM Port 2009, so that's basically too old.
But that's not the Problem, i think i found the real Bug in winegcc and winebuild, i'll send a patch and let you know.
Cool, thx for the link!jim11 wrote:Alright I dug through my internet history and found the link: http://www.winehq.org/wwn/285#Cross-Com ... 20Wine|WWN.
That's from 2005, i started the ARM Port 2009, so that's basically too old.
see http://en.wikipedia.org/wiki/ARM_Thumb#Thumbjim11 wrote: André as to your suggestion about whether the device supports "thumb," I assumed you were talking about gthumb which I downloaded to the native device and then tried to recompile wine which ended up being a no go. (But we may be talking about two different things, so if you would please clarify exactly what you're referring to as "thumb") One of my colleagues suggested that the error might actually be between my gcc and winegcc, because one maybe compiling in a different format that the assembler cannot understand, but I haven't tested this yet. Again thanks for your help!
But that's not the Problem, i think i found the real Bug in winegcc and winebuild, i'll send a patch and let you know.
Most likely, please do what the output says.KenSharp wrote:Compiler broken?Code: Select all
Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.5.1-7ubuntu1) 4.5.1
i sent a patchset, you already can try it out if you want:
http://www.winehq.org/pipermail/wine-pa ... 01306.html
http://www.winehq.org/pipermail/wine-pa ... 01307.html
see http://wiki.winehq.org/FAQ#head-ce0f398 ... b020e234bb just in case you wonder how to apply them
In latest git:
Code: Select all
ccache arm-linux-gnueabi-gcc -c -I/home/test/wine-git/dlls/msvcrt -I. -I/home/test/wine-git/include -I../../include -D__WINESRC__ -D_MT -D_REENTRANT -fPIC -Wall -pipe -fno-strength-reduce -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith -Wlogical-op -g -O0 -mcpu=arm7tdmi -o wcs.o /home/test/wine-git/dlls/msvcrt/wcs.c
In file included from /home/test/wine-git/dlls/msvcrt/wcs.c:38:0:
/home/test/wine-git/dlls/msvcrt/printf.h: In function ‘create_positional_ctx_a’:
/home/test/wine-git/dlls/msvcrt/printf.h:610:13: error: incompatible type for argument 9 of ‘pf_printf_a’
/home/test/wine-git/dlls/msvcrt/printf.h:338:5: note: expected ‘va_list’ but argument is of type ‘void *’
In file included from /home/test/wine-git/dlls/msvcrt/wcs.c:40:0:
/home/test/wine-git/dlls/msvcrt/printf.h: In function ‘create_positional_ctx_w’:
/home/test/wine-git/dlls/msvcrt/printf.h:610:13: error: incompatible type for argument 9 of ‘pf_printf_w’
/home/test/wine-git/dlls/msvcrt/printf.h:338:5: note: expected ‘va_list’ but argument is of type ‘void *’
/home/test/wine-git/dlls/msvcrt/wcs.c: In function ‘MSVCRT_vsprintf_p_l’:
/home/test/wine-git/dlls/msvcrt/wcs.c:886:17: error: incompatible type for argument 9 of ‘pf_printf_a’
/home/test/wine-git/dlls/msvcrt/printf.h:338:5: note: expected ‘va_list’ but argument is of type ‘void *’
/home/test/wine-git/dlls/msvcrt/wcs.c: In function ‘MSVCRT_vswprintf_p_l’:
/home/test/wine-git/dlls/msvcrt/wcs.c:940:17: error: incompatible type for argument 9 of ‘pf_printf_w’
/home/test/wine-git/dlls/msvcrt/printf.h:338:5: note: expected ‘va_list’ but argument is of type ‘void *’
One more thing I want to say. There is a component of qemu, which name is TCG, and it is able, for example, to translate x86 assembly instructions into ARM ones at runtime. Currently, TCG is far from being ready to use it in Wine, lacking performance optimizations.
Also, you may chance upon the TCG Interpreter (TCI) - this is not what Wine needs. As far as I got, it is just a mechanism implemented on the top of the original TCG to run bytecode in VM's and is much slower.
Useful links:
http://tomoyo.sourceforge.jp/cgi-bin/lx ... kvm-0.12.3
http://lists.gnu.org/archive/html/qemu- ... 01337.html
http://vm-kernel.org/blog/2009/07/08/qe ... emulation/
http://wiki.qemu.org/Documentation/TCG/frontend-ops
Also, you may chance upon the TCG Interpreter (TCI) - this is not what Wine needs. As far as I got, it is just a mechanism implemented on the top of the original TCG to run bytecode in VM's and is much slower.
Useful links:
http://tomoyo.sourceforge.jp/cgi-bin/lx ... kvm-0.12.3
http://lists.gnu.org/archive/html/qemu- ... 01337.html
http://vm-kernel.org/blog/2009/07/08/qe ... emulation/
http://wiki.qemu.org/Documentation/TCG/frontend-ops
I once had a similiar idea and asked Pierre d'Herbemont, who tried to integrate qemu in darwine(Wine for PowerPC) and he spotted me to something like http://qemu-omap3.googlecode.com/svn/tr ... /qruncom.c but meanwhile it seems to me qemu has dropped libqemu and now that you told me about TCG i guess i know why.
now we talked about all three points of porting Wine to ARM as of http://wiki.winehq.org/ARM
- winelib
- WineCE
- having a chance of making some translation to run x86 Win Apps
As of now winelib works very good, but i always only get asked for the other two "goals"
now we talked about all three points of porting Wine to ARM as of http://wiki.winehq.org/ARM
- winelib
- WineCE
- having a chance of making some translation to run x86 Win Apps
As of now winelib works very good, but i always only get asked for the other two "goals"
Re: How to recompile Wine on ARM
Cross-compile Wine for ARM
While i give Make i get the following Error,Can any body tell the solution to overcome this,
path.c: In function ‘PATH_Arc’:
/usr/include/bits/mathinline.h:741:1: error: impossible constraint in ‘asm’
/usr/include/bits/mathinline.h:759:1: error: impossible constraint in ‘asm’
make[1]: *** [path.o] Error 1
make[1]: Leaving directory `/home/yash4/Vinayak/ARM_Build_WINE/ARM_Build/wine-arm-build/dlls/gdi32'
make: *** [dlls/gdi32] Error 2
Thanks
Logesh
While i give Make i get the following Error,Can any body tell the solution to overcome this,
path.c: In function ‘PATH_Arc’:
/usr/include/bits/mathinline.h:741:1: error: impossible constraint in ‘asm’
/usr/include/bits/mathinline.h:759:1: error: impossible constraint in ‘asm’
make[1]: *** [path.o] Error 1
make[1]: Leaving directory `/home/yash4/Vinayak/ARM_Build_WINE/ARM_Build/wine-arm-build/dlls/gdi32'
make: *** [dlls/gdi32] Error 2
Thanks
Logesh
Re: How to recompile Wine on ARM
You only give us limited information, how should we help you?Logesh wrote:Cross-compile Wine for ARM
While i give Make i get the following Error,Can any body tell the solution to overcome this,
On which platform are you building? What about configure?
it seems like you are using the native gcc for crosscompiling on x86(_64), but that's just a guess
PS: That path made me smile:
ARM_Build_WINE/ARM_Build/wine-arm-build/