If you need a particular version of wine to run a particular windows programme, you may well need to build wine from source. Most windows programmes need 32-bit wine so you can't simply build the package from source on your 64-bit installation of debian. The multi-arch feature of debian has matured a lot however there are still packages which can't have the 32-bit and 64-bit versions simultaneously installed. Because of this, you will need to build the 32-bit wine packages inside some kind of chroot environment. I am going to show you a fairly straightforward way of doing this with the help of lxc (Linux Containers).<\/p>\n
Find and download source packages<\/a> for your version of wine at http:\/\/snapshot.debian.org\/package\/wine-unstable\/<\/a><\/p>\n Install build dependencies,<\/a> possibly substituting package versions if you're not running debian unstable.<\/p>\n Build 64-bit wine<\/a> as normal.<\/p>\n Set up a 32-bit container<\/a>, install build dependencies and build wine in it.<\/p>\n Find the version of wine you require at http:\/\/snapshot.debian.org\/package\/wine-unstable\/<\/a> and download the three files that make up the make up the source package. There should be an orig.tar.bz2, a .dsg and an .xz. For example, wine-unstable_1.7.17-1.debian.tar.xz, wine-unstable_1.7.17-1.dsc and wine-unstable_1.7.17.orig.tar.bz2. For the rest of this post I shall use 1.7.17 as an example, but feel free to substitute any particular version of wine that you might prefer.<\/p>\n The version of wine in debian stable at the time of writing is 1.4 and the build dependencies have changed somewhat between that package and recent versions of wine-unstable. If you do \"apt-get build-dep wine\" it will install a lot of the build dependencies of wine-unstable but it won't get all of them, so you will have to install some manually. (If you are running debian unstable then you can probably just do apt-get build-dep wine-unstable and get all of them directly, but if you're running debian unstable I would question why you need help from this article!)<\/p>\n To find out the packages that are required to build wine-unstable, you can unpack the archive and look for the Build-Depends line in debian\/control, or you can just attempt to build the package and wait for any error message!<\/p>\n The build dependencies may vary from version to version of wine so I can't give you exact instructions here. In this case, none of the three packages exist in the version of debian that I have installed. I substituted libgphoto2-2-dev, an earlier version (2.4.9) of libfreetype6-dev, and libgstreamer-plugins-base0.10-dev. Close enough. Remember the packages you install here as you will also be installing them to build the 32-bit version of wine.<\/p>\n <\/a> <\/p>\n <\/a><\/p>\n Unfortunately, having the 64-bit wine packages aren't enough as most windows programmes are compiled against 32-bit windows, so you will need to build the 32-bit packages. You can set up a chroot environment by hand with debootstrap and do this, or you can use lxc to set up a container for you. Containers are somewhere between a chroot and a virtual machine. The advantage of using lxc is that it takes exactly one command to set it up:<\/p>\n This will set up a basic 32-bit debian environment in \/var\/lib\/lxc\/32bitwine\/rootfs. Copy the 3 wine source packages to the location within this environment that you will build them - for example the \/root folder. Then enter the container:<\/p>\n You will see a basic debian system booting, and you will be able to login as root with the password that was displayed at the end of the lxc-create command output. Set up your 32-bit build environment by addding a deb-src line to \/etc\/apt\/sources.list and running apt-get update.<\/p>\n You may need to run \"dpkg-reconfigure locale\" if you see a lot of errors about LC_ALL like this:<\/p>\n You will need to set up your 32-bit build dependencies as before. So I would recommend running \"apt-get build-dep wine\" to get most of the dependencies installed, then install 32-bit versions of the same packages that you had to install to get 64-bit wine built.<\/p>\n Then extract the source archives (that you previously copied into the container) and build the package:<\/p>\n If all has gone well, you can shut down the container with \"sudo lxc-stop -n32bitwine\" then copy the 32-bit packages out of your container filesystem. The 32-bit packages you need to install are wine32-unstable and libwine-unstable, while the 64-bit packages you need are wine-unstable, wine64-unstable and libwine-unstable.<\/p>\n Install those packages along with the 64-bit wine packages manually and you are good to go!<\/p>\n If you need a particular version of wine to run a particular windows programme, you may well need to build wine from source. Most windows programmes need 32-bit wine so you can't simply build the package from source on your 64-bit installation of debian. The multi-arch feature of debian has matured a lot however there are still […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[3],"tags":[15,16],"_links":{"self":[{"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/posts\/339"}],"collection":[{"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/comments?post=339"}],"version-history":[{"count":10,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/posts\/339\/revisions"}],"predecessor-version":[{"id":425,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/posts\/339\/revisions\/425"}],"wp:attachment":[{"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/media?parent=339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/categories?post=339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/tags?post=339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<\/a>Download source packages<\/h2>\n
<\/a>Build dependencies<\/h2>\n
$ dpkg-source -x wine-unstable_1.7.17-1.dsc\n$ cd wine-unstable-1.7.17\n$ dpkg-buildpackage \ndpkg-buildpackage: source package wine-unstable\ndpkg-buildpackage: source version 1.7.17-1\ndpkg-buildpackage: source changed by Michael Gilbert <mgilbert@debian.org>\ndpkg-buildpackage: host architecture amd64\n dpkg-source --before-build wine-unstable-1.7.17\ndpkg-checkbuilddeps: Unmet build dependencies: libgphoto2-dev libfreetype6-dev (>= 2.5.1) libgstreamer-plugins-base1.0-dev\ndpkg-buildpackage: warning: build dependencies\/conflicts unsatisfied; aborting\ndpkg-buildpackage: warning: (Use -d flag to override.)<\/pre>\n
\nYou can now build the 64-bit version of the package with the -d option to ignore the build dependency problem:<\/p>\ndpkg-buildpackage -d<\/pre>\n
<\/a>Building 32-bit wine<\/h2>\n
sudo lxc-create -n32bitwine -t debian -- --arch i386<\/pre>\n
sudo lxc-start -n32bitwine<\/pre>\n
perl: warning: Setting locale failed.\nperl: warning: Please check that your locale settings:\nLANGUAGE = \"en_GB:en\",\nLC_ALL = (unset),\nLC_TIME = \"en_GB.utf8\",\nLANG = \"en_GB.utf8\"\nare supported and installed on your system.\nperl: warning: Falling back to the standard locale (\"C\").<\/pre>\n
$ dpkg-source -x wine-unstable_1.7.17-1.dsc\n$ cd wine-unstable-1.7.17\n$ dpkg-buildpackage -n<\/pre>\n
sudo dpkg -i libwine-unstable_1.7.17-1_amd64.deb libwine-unstable_1.7.17-1_i386.deb wine32-unstable_1.7.17-1_i386.deb wine64-unstable_1.7.17-1_amd64.deb wine-unstable_1.7.17-1_amd64.deb<\/pre>\n","protected":false},"excerpt":{"rendered":"