Jump to: navigation, search



Admin: This information need to be wikified.

There are two paths to installing Wine on Gentoo. Compiling and installing Wine from source is the recommended method for Gentoo users, though instructions for portage are included.

Gentoo x86

Install from Source

Gentoo users are more familiar with compiling software than most Linux users. Compiling Wine is not difficult, as you download the source, and follow the simple instructions provided in the README file. The latest release from Wine is available under "Wine Source Downloads" here

Install with Portage

H. Bostick: I run Gentoo, and so I know that the last release marked stable in Portage (which is not the same as "the last release" available from the Wine project) is 20050111. This [alpha] release had [...] problems, although your actual error [posted to the mailing list] indicates a borked install. But since you've installed an old (and more-than-normally buggy) version of Wine, you might as well just upgrade anyway.

To obtain the latest release via portage, you should do the following:

Make sure that the directory /etc/portage exists. If not, get root access.

$ su

as root, type

mkdir /etc/portage

2a) After the directory has been made, to obtain the latest release of Wine, as root (assuming that you are running an x86 architecture) unmask Wine by typing in a terminal window

echo 'app-emulation/wine ~x86' >>/etc/portage/package.keywords

and hit enter. If you are running amd64, substitute amd64 for x86 after the ~ .(Wine is only available for x86 and amd64). This will unmask the 'unstable' versions of wine in Portage. You can then emerge the real last relase normally.

2b) Here is another way of doing the same thing: unmask Wine so we can use the newest version of it.

Making /etc/portage/package.* files

# mkdir -p /etc/portage
# touch /etc/portage/package.keywords

Now we edit the package.keywords file.

Editing /etc/portage/package.keywords

# nano -w /etc/portage/package.keywords

Now insert this to into the file;

app-emulation/wine              ~x86

3) Now we need to update portage

# emerge sync

4)Now we emerge wine

# emerge wine

5) Once done, we make the Wine config in your user account;

Making the .wine Directory

# source /etc/profile && env-update && exit
$ wine

Now you are done and ready to have fun with wine. If you need help, please make use of the Wine Users newsgroup or the talk area for support.

With Wine versions after July, run winecfg to set up your drives and configure wine. Then you should be good to go for most purposes, depending on what precisely you want to run.

Wine as installed by Gentoo [...]does provide notepad.exe (run 'wine notepad') and regedit (run 'wine regedit'). So try to run those to check your upgraded install by typing

wine notepad

Portage CVS

Segen [Mar 06] Gentoo users have a Wine ebuild to build from CVS, with version major '9999' Simply put, you install the latest Wine CVS like this:

emerge =wine-9999

and it also pulls all deps wine archive

Troubleshooting Portage


A user asked why no list of the DLLs that are loaded, was showing when using WINEDEBUG.

R. Klazes: Install a wine package that was not compiled excluding debug messages or compile wine yourself.

He reported back: That was indeed the problem. I'm somewhat new to the gentoo portage system also. I needed to add "debug" to the USE variable in /etc/make.conf and rebuild Wine. Once I did that then the expected debug information came archive


J. Earnst:Gentoo builds everything in some sandbox in /var/tmp and then copies everything in the right places. Wine seems to think files will stay in that directory altough they won't. However I'm quite sure everything will work as expected.[...Oct 05] everything is ok and Gentoo keeps bringing new releases of Wine much faster than any other distro I know of.

H. Bostick: [concerning a users 'borked install' of Wine] I presume this was a new install of Wine, so you have no previous installation files necessary to keep (registry and the like). If that is the case, just delete the ~/.wine directory, it will be recreated (correctly, we hope, but it works fine for me) when you run wine without parameters. If you do have registry entries from installed programs, just back up the *.reg files in the ~/.wine folder before wiping the folder, then put them back after the folder is recreated. Wine Archive

older versions of wine

[Oct 05] A user reported an issue with portage. B. Vincent: GENTOO USERS: [after] typing emerge you'll need to make some small changes. As root, type "(echo '/usr/local/lib' >> /etc/ && ldconfig -v". [...] There were reports about 6 to 9 months ago of Gentoo having problems with Wine. Can you guys confirm everything is ok now? If so, we should just get that fixed in Gentoo's build process. IMO you should open a bug in gentoo's bugzilla telling them to apply a patch that removes this warning before to build wine as this warning doesn't apply to gentoo users. Altough it can seem crazy to compile everything from scratch, I never had to fix any paths in under gentoo; if something works well under gentoo, that'd be the emerge process configuration update tool.

H. Bostick Made a bug entry in gentoo's bugzilla: the bug on b.g.o. can be found here

If you don't want to go by, the bug has been downgraded from 'normal' to 'trivial' (which it rather is), and a suggestion has been made that, rather than writing a patch against the wine sources (and having tomaintain it), an einfo should be added to the ebuild telling users to ignore the message from the compilation process. Which seems a quite reasonable solution that I would expect will be implemented. Wine Archive

Gentoo AMD64

Forum Comments for compiling Gentoo AMD64

M.P. [May 06] : During the compilation of latest wine release from the CVS repository, I get the following warning message at the completion of the ./configure script wine archive:

*** Warning: Freetype or Fontforge is missing. *** Fonts will not be built. Dialog text may be invisible or unaligned.

I know for sure that my system has both freetype and fontforge installed:

[ebuild   R   ] media-gfx/fontforge-20060408  +X +gif +jpeg +png +svg
+tiff +truetype +unicode 0 kB
[ebuild   R   ] media-libs/freetype-2.1.9-r1  -bindist -doc +zlib 0 kB

However, I have a feeling, based on configure's output [...] that wine isn't finding freetype or something related to it. Of course, I can compile wine after this but like the warning hinted, fonts are messed up. [He then reported ]I fixed the problem by changing my build script. The latest version of that can be found here:

Compiling a Working Multilib Wine on AMD64

A. Woods: here are the steps to achieve this for Gentoo 2004.3:

  1. Move your /usr/include out of the way and replace with one from an ix86 box (might not be necessary if your distro has multilib includes)
  2. autoconf
  3. ./configure --x-libraries=<path_to_your_multilib_x_libs>
  4. make depend && make
  5. make install
  6. Don't forget to put your /usr/include back ;) 

Currently (Feb2004) there is a problem with the 2.6.10 kernel, but with 2.6.9 wine runs perfectly.

At this point in time multilib is in varying states on different distributions. You may need to create symbolics to some libraries if the compile complains about them not being found (eg libXext, libX11, libasound). You will also need a version of wine >= 20050211, which is the first version with the required patch in it for building a multilib wine.

Compiling a working multilib wine is an advanced task. However the benefits can be worth it, in that that a multilib wine optimised for AMD64 processors works very well.

Wine-Devel Archive Links: Ptrace problems on AMD64


Jan 10

Winehq Bugzilla entry 18296 reported a problem with key events that was tracked down to a bug in Xorg. However Xorg 7 is also available for Gentoo in ~arch and reportedly fixes this bug.

Jan 09

Bug 17097: was asked: Does it hang on a call to snd_pcm_open() on the capture device by any chance? Which version of alsa-lib are you using?

He replied: I just fixed the problem myself. I tried booting with kernel-2.6.26-r4, and it worked fine. So I edited my kernel .config file (2.6.27-r7) and set:


Recompiled my kernel, copied it to my boot directory, and rebooted, and now WINE works fine. Apparently WINE still wants kernel support for the old ALSA API? Just in case you're still wondering, though, I'm using alsa-lib-1.0.17a, and I'm using the relatively new xfi-drivers-1.00 for my Sound Blaster X-Fi card. Thank you again, and sorry for posting something that I caused and should have just fixed myself.

Jul 06

Segin reported wine archive:

make[2]: Entering directory `/var/tmp/portage/wine-0.9.17/work/wine-0.9.17/dlls/gphoto2.ds'
../../tools/makedep -I. -I. -I../../include -I../../include -I/usr/include/gphoto2 -I/usr/include -I/usr/include/gphoto2
-I/usr/include -C. capability.c ds_ctrl.c ds_image.c gphoto2_main.c ui.c rsrc.rc
/usr/include/io.h:29: config.h must not be included by a header file
make[2]: *** [depend] Error 1
make[2]: Leaving directory
`/var/tmp/portage/wine-0.9.17/work/wine-0.9.17/dlls/gphoto2.ds' make[1]:*** [gphoto2.ds/__depend__] Error 2 make[1]: Leaving directory
`/var/tmp/portage/wine-0.9.17/work/wine-0.9.17/dlls' make: *** [dlls/__depend__] Error 2

Mar 06

A user reported a fonts problem. Bob: I am not an expert, however pls look into the latest version of fontforge being installed on your machine. No promises but it fixed the same problem indicated by your snapshots that I had on my system. wine archive

April 06

K. Blin: In order to create your fonts, you will need a recent version of fontforge. fontforge 20050803 works. NOTE TO GENTOO USERS: fontforge 20050624 does not work. Use fontforge 20060406 from the ~ARCH repository.

Segin: To enable ~ARCH fontforge without setting your whole system ~ARCH, do this (as root):

echo "=media-gfx/fontforge-20060406" >> /etc/portage/package.keywords

R. May suggested:

echo "=media-gfx/fontforge-20060406 ~x86" >> /etc/portage/package.keywords

(and ~x86 should be ~amd64 for those running 64-bit)

That would have the effect of only allowing that particular _unstable_ version of fontforge to be installed. Once a newer version was marked stable, that version would be superseded. [the discussion continued..] wine archive

March 06

A user reported a build failure with gentoo: build failure on Gentoo Linux[...].Kernel 2.6.15-gentoo-r7 ( glibc 2.3.6 (NTPL/NTPL only) Suggested fix: Include stdint.h in server/mailslot.c wine archive


sandbox violation A gentoo user noted a sandbox violation occoured when building from cvs - which didnt occour when he emerged using the official gentoo 0.9 version of wine.

V. Beron: It's most probably the call to "update-desktop-database" in tools/Makefile while doing the make install part. If using the Gentoo package, [...] ask them to add UPDATE_DESKTOP_DATABASE=/bin/true to the make install line in the rules. But then you'll need to run it sometime after if you want the connection between .exe and wine to be made.

Make Errors with Gentoo 2004.3

Typed "./configure" -> Success
Typed "make depend" -> Success
Typed "make" -> The following is the last of the make process:

gcc -m32 -c -I. -I. -I../../include -I../../include  -D__WINESRC__
-mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+
-Wpointer-arith  -g -O2 -o server.o server.c
gcc -m32 -c -I. -I. -I../../include -I../../include  -D__WINESRC__
-mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+
-Wpointer-arith  -g -O2 -o signal_i386.o signal_i386.c
signal_i386.c: In function `wine_sigaction':
signal_i386.c:114: error: `SYS_sigaction' undeclared (first use in this
signal_i386.c:114: error: (Each undeclared identifier is reported only
signal_i386.c:114: error: for each function it appears in.)
make[2]: *** [signal_i386.o] Error 1
make[2]: Leaving directory

A.Woods:This is a problem with building on Gentoo 2004.3. It's fixed in the 2005.0 development version, and is to do with the fact that the multilib headers are absent with from the 2004.3 binary emul-x86 package. This means you build against the x86_64 headers, which have totally different sigactions. Upgrading to 2005.0 will sort out the problem but can be quite problematic in itself ;) The other thing you can do is get the /usr/include directory from an x86 box and temporarily replace your /usr/include with that, then build wine. This is what I did before I got an answer from the Gentoo devs, and works fine. Wine Archive Link

External Links Gentoo - Installing Wine

Personal tools