How to recompile Wine on ARM
How to recompile Wine on ARM
I am trying to Recomiple the Wine 1.3.8 for the Arm.
I configured as follows,
> export CC=arm_v5t_le-gcc
> ./configure --prefix=/usr/local/Wine_Arm --host=arm --with-wine-tools=$PWD --without-freetype
then,
> make
config.status: creating tools/Makefile
make[1]: Entering directory `/home/Kanna/wine-1.3.8/tools'
arm_v5t_le-gcc -c -I. -I. -I../include -I../include -D__WINESRC__ -Wall -pipe -fno-strength-reduce -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wwrite-strings -Wpointer-arith -g -O2 -o makedep.o makedep.c
arm_v5t_le-gcc -g -O2 -o makedep makedep.o
/home/Kanna/wine-1.3.8/tools/makedep -C. -S.. -T.. fnt2bdf.c fnt2fon.c make_ctests.c makedep.c relpath.c sfnt2fnt.c
/home/Kanna/wine-1.3.8/tools/makedep: /home/Kanna/wine-1.3.8/tools/makedep: cannot execute binary file
I am getting the above error, because i am using x86 for cross-compiling the wine to ARM, the makedep is compiled for ARM, so it cannot run on the x86.
Please help to compile the Wine for ARM Platform.
Regards,
Kannadasan S.
I configured as follows,
> export CC=arm_v5t_le-gcc
> ./configure --prefix=/usr/local/Wine_Arm --host=arm --with-wine-tools=$PWD --without-freetype
then,
> make
config.status: creating tools/Makefile
make[1]: Entering directory `/home/Kanna/wine-1.3.8/tools'
arm_v5t_le-gcc -c -I. -I. -I../include -I../include -D__WINESRC__ -Wall -pipe -fno-strength-reduce -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wwrite-strings -Wpointer-arith -g -O2 -o makedep.o makedep.c
arm_v5t_le-gcc -g -O2 -o makedep makedep.o
/home/Kanna/wine-1.3.8/tools/makedep -C. -S.. -T.. fnt2bdf.c fnt2fon.c make_ctests.c makedep.c relpath.c sfnt2fnt.c
/home/Kanna/wine-1.3.8/tools/makedep: /home/Kanna/wine-1.3.8/tools/makedep: cannot execute binary file
I am getting the above error, because i am using x86 for cross-compiling the wine to ARM, the makedep is compiled for ARM, so it cannot run on the x86.
Please help to compile the Wine for ARM Platform.
Regards,
Kannadasan S.
Re: How to recompile Wine on ARM
If you cross-compiling you'll need to point Wine to x86 build directory. Ex:eyedasan wrote:I am getting the above error, because i am using x86 for cross-compiling the wine to ARM, the makedep is compiled for ARM, so it cannot run on the x86.
Code: Select all
mkdir /home/Kanna/wine-linux-build
mkdir /home/Kanna/wine-arm-build
cd /home/Kanna/wine-linux-build
../wine-1.3.8/configure && make
cd /home/Kanna/wine-arm-build
../wine-1.3.8/configure --host=arm --with-wine-tools=../wine-linux-build
make
Hi Vitamin
Thanks for the information, i followed the steps as you told.
but I am getting the Following Error,
Please provide the Information.
Regards,
Kannadasan S.
but I am getting the Following Error,
Code: Select all
v
../../wine-linux-build//tools/widl/widl -b arm -I../../wine-1.3.8/include -I. -I../../wine-1.3.8/include -I../include -t -T stdole2.tlb ../../wine-1.3.8/include/stdole2.idl
error: Invalid target specification 'arm'
make[1]: *** [stdole2.tlb] Error 2
make[1]: Leaving directory `/home/Kanna/wine-arm-build/include'
make: *** [include] Error 2
Regards,
Kannadasan S.
Re: How to recompile Wine on ARM
Hi Vitamin,
After compiling the wine to ARM, can we able to run the windows exe directly or we need the Source of that particular windows application?
Regards,
Kannadasan S.
After compiling the wine to ARM, can we able to run the windows exe directly or we need the Source of that particular windows application?
Regards,
Kannadasan S.
Re: Hi Vitamin
File a bug.eyedasan wrote:Code: Select all
../../wine-linux-build//tools/widl/widl -b arm -I../../wine-1.3.8/include -I. -I../../wine-1.3.8/include -I../include -t -T stdole2.tlb ../../wine-1.3.8/include/stdole2.idl error: Invalid target specification 'arm'
No, Wine does not emulate CPU. You will only be able to run winelib apps.eyedasan wrote:After compiling the wine to ARM, can we able to run the windows exe directly or we need the Source of that particular windows application?
How to recompile Wine on ARM
Hi Vitamin,
Our Target specification as follows,
ARM9 Core 300 MHz Processor
128 MB RAM
128 MB Flash
Is it possible to port the Wine on the above platform?
What is the Minimun Memory Footprint required to port wine on any platform?
Regards,
Kannadasan S.
Our Target specification as follows,
ARM9 Core 300 MHz Processor
128 MB RAM
128 MB Flash
Is it possible to port the Wine on the above platform?
What is the Minimun Memory Footprint required to port wine on any platform?
Regards,
Kannadasan S.
@Eyedasan
Sorry to disappoint you, but what Vitamin was saying is that Wine can only run on an x86 processor. It does not have the code to emulate an x86 processor on the ARM platform, or the PPC platform, or anything else. This code would need to be added, which is very serious work. That is why Wine stands for Wine Is Not an Emulator.
What Wine does is it intercepts API calls that Windows executables make and translates the Windows API call into an API call that works on Linux or Mac. But whether it's Linux or Mac, the processor must be x86. That's why Wine will not run on older Power Macs, but it will on newer x86 Macs.
Sorry to disappoint you, but what Vitamin was saying is that Wine can only run on an x86 processor. It does not have the code to emulate an x86 processor on the ARM platform, or the PPC platform, or anything else. This code would need to be added, which is very serious work. That is why Wine stands for Wine Is Not an Emulator.
What Wine does is it intercepts API calls that Windows executables make and translates the Windows API call into an API call that works on Linux or Mac. But whether it's Linux or Mac, the processor must be x86. That's why Wine will not run on older Power Macs, but it will on newer x86 Macs.
I didn't say that, because it's isn't true. Wine can run on architectures other then x86. However in such setup Wine will not be able to run x86 Windows programs. It can still run winelib programs (programs recompiled with winegcc).rygle wrote:Sorry to disappoint you, but what Vitamin was saying is that Wine can only run on an x86 processor.
eyedasan, I'm not sure what you need Wine for. On such a hardware it will consume all 100% of resources just by itself. Regardless you still need Xorg to have functioning Wine, which leaves nothing at all for the app itself.
So let's have a look at:
i have a (not fully working) crosscompiling setup which looks like:
../configure --host=arm-linux-gnueabi --with-wine-tools=../164/ --without-freetype host_alias=arm-linux-gnueabi
this doesn't even need a "export CC", but FWIW it would be arm-linux-gnueabi-gcc
Further i have no good experience with crosscompiling Wine for ARM, i normally build directly on the ARM system(which is quite more fun with dual-core ARM at 1GHz).
You can recompile existing apps for winelib and run them on ARM, i e.g. did that with putty as you can see here: http://dawncrow.de/arm4.png
What device is that?
--host=arm is the wrong way, as explained in the bug, also arm_v5t_le-gcc scares me. that shouldn't look like that IMHO.> export CC=arm_v5t_le-gcc
> ./configure --prefix=/usr/local/Wine_Arm --host=arm --with-wine-tools=$PWD --without-freetype
i have a (not fully working) crosscompiling setup which looks like:
../configure --host=arm-linux-gnueabi --with-wine-tools=../164/ --without-freetype host_alias=arm-linux-gnueabi
this doesn't even need a "export CC", but FWIW it would be arm-linux-gnueabi-gcc
Further i have no good experience with crosscompiling Wine for ARM, i normally build directly on the ARM system(which is quite more fun with dual-core ARM at 1GHz).
No you won't as vitamin already said, but he is also right about winelib.After compiling the wine to ARM, can we able to run the windows exe directly or we need the Source of that particular windows application?
You can recompile existing apps for winelib and run them on ARM, i e.g. did that with putty as you can see here: http://dawncrow.de/arm4.png
Yes, it is. But I'm afraid your user experience will not be that great with 300 MHz.ARM9 Core 300 MHz Processor
128 MB RAM
128 MB Flash
Is it possible to port the Wine on the above platform?
What device is that?
Re: How to recompile Wine on ARM
Also you should try a more recent version of Wine, e.g. Wine 1.3.17eyedasan wrote:I am trying to Recomiple the Wine 1.3.8 for the Arm.
Every time I try to cross-compile in Ubuntu Maverick I get a different result! Something is obviously broken and I doubt it's Wine, but it is a bloody nuisance.
At the moment, I seem to be getting a consistent failure, as above.
Code: Select all
ccache arm-linux-gnueabi-gcc -c -I/home/test/wine-git/dlls/winex11.drv -I. -I/home/test/wine-git/include -I../../include -I/usr/include -D__WINESRC__ -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 -o x11drv_main.o /home/test/wine-git/dlls/winex11.drv/x11drv_main.c
/home/test/wine-git/dlls/winex11.drv/x11drv_main.c: In function ‘process_attach’:
/home/test/wine-git/dlls/winex11.drv/x11drv_main.c:534:33: error: ‘SONAME_LIBX11’ undeclared (first use in this function)
/home/test/wine-git/dlls/winex11.drv/x11drv_main.c:534:33: note: each undeclared identifier is reported only once for each function it appears in
make: *** [x11drv_main.o] Error 1
Well, until I can figure that one out I decided to just build with --without-x which completed successfully. But...
Ugh! I'm sure I had a partial build that worked at least that much before, but as I have said... result definitely do vary.
Out of interest what is host_alias=arm-linux-gnueabi for?
Code: Select all
$ qemu-arm ./wine --version
Unknown binary format
Error -1 while loading ./wine
Out of interest what is host_alias=arm-linux-gnueabi for?
Ugh! Good point!
I get the --host= but I don't know where host_alias= is used.
Pffft. And there isn't, it's looking in the wrong place. How can I make it look in the correct place?
I don't understand why I'm having such a hard time with this. I wonder if this will be easier when upgraded to Natty.
I get the --host= but I don't know where host_alias= is used.
Code: Select all
$ qemu-arm ./wine --version
/lib/ld-linux.so.3: No such file or directory
I don't understand why I'm having such a hard time with this. I wonder if this will be easier when upgraded to Natty.
if host_alias makes no different, then it's most likely some obsolete stuff i copied from somewhere.
for qemu, try the qemu stuff from http://wiki.winehq.org/ARM in reverse
for qemu, try the qemu stuff from http://wiki.winehq.org/ARM in reverse
This one looks genuine:
Code: Select all
ccache arm-linux-gnueabi-gcc -c -I/home/test/wine-git/dlls/ntdll -I. -I/home/test/wine-git/include -I../../include -D__WINESRC__ -D_NTSYSTEM_ -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 -o signal_arm.o /home/test/wine-git/dlls/ntdll/signal_arm.c
{standard input}: Assembler messages:
{standard input}:575: Error: selected processor does not support Thumb mode `stmib r0,{r0-pc}'
{standard input}:577: Error: selected processor does not support Thumb mode `stmib r0,{r1}'
i just sent a fix:
http://www.winehq.org/pipermail/wine-pa ... 01093.html
http://www.winehq.org/pipermail/wine-pa ... 01093.html
With patch:
Code: Select all
ccache arm-linux-gnueabi-gcc -c -I/home/test/wine-git/dlls/ntdll -I. -I/home/test/wine-git/include -I../../include -D__WINESRC__ -D_NTSYSTEM_ -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 -o signal_arm.o /home/test/wine-git/dlls/ntdll/signal_arm.c
{standard input}: Assembler messages:
{standard input}:590: Error: r15 not allowed here -- `str PC,[r0,#0x40]'
similar error
I apologise if this is a dumb question, but I am attempting to do the same thing (i.e. compiling wine for ARM except this is an ARMv7) I have followed the configuration commands (./configure --host=arm-linux-gnueabi --with-wine-tools=../wine-tools [<- compiled these from a separate tree] --without-freetype) and now I am using the make command. I keep getting this error:
In file included from ../../../include/windef.h:252,
from ../../../include/wine/library.h:27,
from ../../../libs/wine/config.c:36:
../../../include/winnt.h error: redefinition of ‘struct _CONTEXT’
../../../include/winnt.h error: conflicting types for ‘CONTEXT’
../../../include/winnt.h note: previous declaration of ‘CONTEXT’ was here
make[1]: *** [config.o] Error 1
make[1]: Leaving directory `/home/****/wine-git/wineOnArm/libs/wine'
make: *** [libs/wine] Error 2
-----------------------------------------------------------------------------------
At first I thought it was a left over config from another branch I made, but after I ran a make distclean on my previous branches. The error persists. I think I read in Vitamin's Blog entry about having to erase some CONTEXTs is this what he's talking about? Other important info, I am using CodeSourcery 2009-q27 cross-compilers. The objective is to get wine running on a gumstix. (Even if all I can do is recompile programs from source with the winelibs) Sorry to hijack the blog, but this seemed like the most appropriate place. Also would anyone have a working wine tarball that I could just deploy, or is the only way to compile from source. I have done a lot of google hunting, but came up with null...so I figured I would ask the source. Anyways thanks in advance for any help and your time!
In file included from ../../../include/windef.h:252,
from ../../../include/wine/library.h:27,
from ../../../libs/wine/config.c:36:
../../../include/winnt.h error: redefinition of ‘struct _CONTEXT’
../../../include/winnt.h error: conflicting types for ‘CONTEXT’
../../../include/winnt.h note: previous declaration of ‘CONTEXT’ was here
make[1]: *** [config.o] Error 1
make[1]: Leaving directory `/home/****/wine-git/wineOnArm/libs/wine'
make: *** [libs/wine] Error 2
-----------------------------------------------------------------------------------
At first I thought it was a left over config from another branch I made, but after I ran a make distclean on my previous branches. The error persists. I think I read in Vitamin's Blog entry about having to erase some CONTEXTs is this what he's talking about? Other important info, I am using CodeSourcery 2009-q27 cross-compilers. The objective is to get wine running on a gumstix. (Even if all I can do is recompile programs from source with the winelibs) Sorry to hijack the blog, but this seemed like the most appropriate place. Also would anyone have a working wine tarball that I could just deploy, or is the only way to compile from source. I have done a lot of google hunting, but came up with null...so I figured I would ask the source. Anyways thanks in advance for any help and your time!
Re: similar error
Do you have a link?jim11 wrote:I think I read in Vitamin's Blog entry
The fact that the compiler warns about a duplicated CONTEXT struct tell's me that there are most likely both defines: __x86_64__ and __arm__jim11 wrote:about having to erase some CONTEXTs is this what he's talking about?
You're correct about the defines, when I checked this morning the __x86_64__ had already been defined, so it came into conflict when I tried to compile the other wine under ARM. Hence why I restarted with a fresh chain and was able to get further this morning. As far as a link to the Blog entry I haven't been able to relocate, I may have been getting confused with some other ARM research I have been doing in addition to this. But now I have a completely new make error, I'm getting a winebuild:
arm-linux-gnueabi-as failed with status 1
winegcc: /home/***/wine-git/wine-tools/tools/winebuild/winebuild failed make[1]: *** [acledit.dll.so] Error2
I think it has something to do with the wine compiler (hence the error message , so when I find sometime today I think I am going to try to manual cross compile the acledit.dll with the CodeSourcery tools. That is unless you have an easier method? Of course I really don't know how much of this I need, because I am just trying to compile and run a single command line windows application. Thanks for any help in advance!
arm-linux-gnueabi-as failed with status 1
winegcc: /home/***/wine-git/wine-tools/tools/winebuild/winebuild failed make[1]: *** [acledit.dll.so] Error2
I think it has something to do with the wine compiler (hence the error message , so when I find sometime today I think I am going to try to manual cross compile the acledit.dll with the CodeSourcery tools. That is unless you have an easier method? Of course I really don't know how much of this I need, because I am just trying to compile and run a single command line windows application. Thanks for any help in advance!