Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Optimizing wine
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Zucca
Apprentice
Apprentice


Joined: 14 Jun 2007
Posts: 201
Location: Helsinki, Finland

PostPosted: Wed Jul 02, 2008 7:13 pm    Post subject: Optimizing wine Reply with quote

I'm not sure if this is the right category but anyway:
(This tip is still under construction. I posted this anyway if some of you tries and succeeds on what's told here.)
I found this.
Running Windows apps on Linux, especially with older hardware is (in most cases) slower than running those apps on windows. There have been few cases of what I've heard that Photoshop ran faster on Linux than on windows.
On the site there is nice howto how to optimize wine even more.
There's few other ways to set optimizations:
- by following the instructions on the page (the hard way)
- by setting a different CFLAGS (and CC too) when emerging wine
-- from command line
-- from a environment file
I quite a newbie with all the optimitizations... No, actually I just know the -Ox -flags. ;|

Before we can compile with these optimizations we need to install icc:
Code:
emerge -vaD icc

Portage will display a message after installion - you'll need to go to a web page and get a Intel's licence from the page. You will need a working email-address (you don't need to download anything, just fill the form and click ok). Check your mail and save the attached file *.lic (unrenamed) to /opt/intel/licenses/ -directory.
NOTE: ICC stands for "Intel C++ Compiler" of "Intel Compiler Collection" etc... This MAY mean that this won't work on AMD processors or at least as well as with Intel ones. I managed to compile wine with all the CFLAGS mentioned but leaving CC="icc" -part. I have NO idea if gcc can utilize those CFLAGS and I haven't tested if performance was any better than before.

(I almost gave up at this point, why there are this kind of licensing for free software? Well.. it's not free as freedom, but still...)
After you have licensed your icc we are ready to compile wine (and it's depencies).

Let's choose the method to set all the flags:

From command line
Code:
CC="icc" CFLAGS="-no-cxxlib -pch -O2 -static-libgcc -wd144 -wd177 -wd181 -wd188 -wd191 -wd193 -wd556 -wd593 -wd810 -wd869 -wd981 -wd1287 -wd1292 -wd1418 -wd10156" emerge -vaO wine
You must have all the depenciens for wine to be installed in your system to do this. So you need to run following if you haven't depencies already installed:
Code:
emerge -vao wine

As you already propably knew we don't want to compile wine's depencies with those CFLAGS. This is why we needed to run those seperate commands.
This... I haven't tested but it should work as "well" as using environment file.

From a environment file
All the special environment files are like make.conf (afaik, correct me if I'm wrong) file but you can choose the package which the environment file will affect. They are stored in /etc/portage/env/<category>/<package>
Start by creating and editing the file (in case of wine it is /etc/portage/env/app-emulation/wine):
Here's mine:
Code:
CC="icc"
CFLAGS="-no-cxxlib -pch -O2 -static-libgcc -wd144 -wd177 -wd181 -wd188 -wd191 -wd193 -wd556 -wd593 -wd810 -wd869 -wd981 -wd1287 -wd1292 -wd1418 -wd10156"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j6"

I added MAKEOPTS="-j6" there because I have twin core processor and 2Gb of ram, so that won't slow down (at least not too much) my machine and it make compiling a bit faster.
Next step would me just emerge wine.

I haven't had a success with icc yet. I'm missing someting and compiling fails:
Code:
 * Messages for package app-emulation/wine-0.9.61:

 *
 * ERROR: app-emulation/wine-0.9.61 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2403:  Called die
 * The specific snippet of code:
 *       emake all || die "all"
 *  The die message:
 *   all
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/app-emulation:wine-0.9.61:20080702-214424.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/wine-0.9.61/temp/environment'.
 *


With CC="icc" -line left out it compiles succesfully. But I belive gcc does not understand CFLAGS passed to it (expect of -O2 at least).

Well this is a start. Let's hope it will work soon. I try to keep compiling wine as easy as possible so it means that installing it with from portage is the priority no. 1. ;)
_________________
Threading support for your bash scripts.


Last edited by Zucca on Thu Jul 03, 2008 12:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2379
Location: Wisconsin (USA)

PostPosted: Thu Jul 03, 2008 6:18 am    Post subject: Reply with quote

You can set portage up to compile a specific package with different environment strings:

mkdir -p /etc/portage/env/app-emulation/

create a file "wine" inside that directory with the CFLAGS=, CXXFLAGS=, and anything else you would otherwise find in make.conf but would like changed from the defaults.

Hope that helps simplify things, especially during upgrades.

Side note: this is very useful for passing -m32 to compile a specific package (games-roguelike/ivan, I'm looking at you!) as 32 bit on a 64 bit system.
Back to top
View user's profile Send private message
Zucca
Apprentice
Apprentice


Joined: 14 Jun 2007
Posts: 201
Location: Helsinki, Finland

PostPosted: Thu Jul 03, 2008 12:08 pm    Post subject: Reply with quote

Yes.
I have CoreDuo. So my hardware is 32-bit. And as I've written I'm already using environment file for wine.
I propably have time investigate this next week.
_________________
Threading support for your bash scripts.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2379
Location: Wisconsin (USA)

PostPosted: Fri Jul 04, 2008 2:52 am    Post subject: Reply with quote

Whoa, I totally missed that, sorry for the useless post :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum