Search This Blog

Compiling a Wine WoW64 build on Ubuntu Precise AMD64

If the title of this post doesn't mean anything to you, you should probably stop reading.

I'm going to start by assuming you know what Wine is, and pretty much everything else I talk about throughout the post. This is simply intended to be instructional and not educational.

I noticed that there isn't really a full instruction set in the Wine Wiki for how to build a full WoW64 setup within Ubuntu 12.04 64-bit, so I thought I should try and figure these things out for myself. I don't consider this post suitable to be added to the Wiki as it's a bit of a jumble, but I may look into it later. (Feel free to give a helping hand!) It may take a few glances to realise what is being done and why.

The first steps are:
  1. Install all the build requirements on your machine.
  2. Install an i386 chroot (I used Precise again). A fakeroot installation failed miserably but you might have more luck.
  3. Install all the build requirements in the chroot.
Next, you should build Wine64 outside of the chroot.

The 32/64 build will require access to both 32- and 64-bit libraries. This is why it fails in the first place: Ubuntu have screwed up their multilib. You can copy all the files into their respective folder inside the chroot but this will use up more space, and they won't be updated when needed. Soft links won't work and hard links might create problems when running an update. Bind is your answer.

You will need to create the relevant directories inside your chroot:
(Some directories may already exist and be empty - that's fine).

mkdir /usr/lib/x86_64-linux-gnu
mkdir /lib64
mkdir /lib/x86_64-linux-gnu
mkdir ~/wine64
mkdir ~/wine3264

You then need to bind these directories so that the chroot can see them.
(In some cases it would be prudent to bind a directory read-only, unfortunately that fails and you have to mount -o remount,ro /foo/bar if you feel this necessary).

mount -B ~/wine-git /path/to/chroot/~/wine-git
mount -B /usr/lib/x86_64-linux-gnu /path/to/chroot/usr/lib/x86_64-linux-gnu
mount -B /lib64 /path/to/chroot/lib64
mount -B /lib/x86_64-linux-gnu /path/to/chroot/lib/x86_64-linux-gnu
mount -B ~/wine64 /path/to/chroot/~/wine64
mount -B /path/to/chroot/~/wine3264 ~/wine3264

Where you will need to expand the ~ to point to the correct directories.

The final mount being so that you can access the build from your host environment.

I also mounted /tmp as the /tmp inside the chroot will not be cleared on reboot.

mount -B /tmp /path/to/chroot/tmp

Now you can build the WoW64 Wine.
Inside the chroot:

cd ~/wine3264
~/wine-git/configure --with-wine64=$HOME/wine64
make

Remember to add any other options you wish to add.

Once compiled you can run the whole setup from your host environment from the build tree (which has been bind-mounted), or make install and run that way. I highly recommend that you script as much as you can. If you're planning on rebuilding or running regression tests then you will spend a lot of time typing in the same commands over and over.
Similarly, you should consider ccache and distcc. You should read up on how to share your .ccache, and make sure that the distcc servers have the relevant libs too (you could use sshfs mount to work around any missing dependencies).
Also I have added the above mounts to my /etc/fstab so that I don't have to worry about mounting them all the time.

You should now have a working WoW64 build of Wine.

As I have said, this is a quickly thrown together instructional post, so if you get stuck then feel free to ask for help. I highly recommend using irc://irc.freenode.net/#winehq as the people on there are extremely knowledgeable on the subject. If the problem is a little more involved you should probably use the forums.

References:
1. https://www.winehq.org/pipermail/wine-devel/2009-December/080375.html

YouTube does listen to copyright claims

I'm sure YouTube users are familiar with the blanket copyright notices that are sent whenever music is added to a video.

My video, a fly-by of the Lancaster Bomber at the Sunderland Air Show 2012, had the music "The Dam Busters March" playing throughout. The link being, of course, that the Lancaster was used by the real dam busters and used famously in the film of the same name. I did not add this music: it was playing while the video was being recorded.

Within hours of uploading the video I received a copyright notice via e-mail, and had to defend my use of the audio track. There are a few concerns with this that I will highlight in a moment.

My argument was that the movie "The Dam Busters" was actually released in 1955, and under U.K. copyright law the theme to this film is now in the public domain.

YouTube listened. Actually, YouTube have nothing to do with it. The faceless corporation making the claim agreed, and removed said claim.

This is nice, and everything, but if I hadn't bothered to do the research then my video would have been silenced.

  • Why do I need to do the research? The people claiming to own the copyrights should know that they have no claim! Claiming that they do is an offence.
  • How often does this occur? Are companies creating false claims all the time in order to drive people to their websites to increase revenue?
  • Why are YouTube letting this happen? It seems anyone can make a copyright claim, and this certainly isn't the first time that this has occurred.


Why hasn't anyone told me about BT Wifi?

First and foremost I have to admit something quite embarrassing: although I had heard of BT Openzone I had not taken any notice of what it actually was, and I had no idea what BT Fon was either.

I shall assume you are as ignorant as I, and try to explain why I find this fascinating.

This is no less than an Internet revolution.

Granola testing

Intrigued by various articles on https://grano.la/ I thought I would test it out. It is free after all.

The concept is very simple: you install the client, and it controls the power of your computer so that it's always using the minimum amount of energy required for a specific set of tasks. I may have read between the lines there but you can read it for yourself if you don't believe me.

The site itself does not talk about stability, but I found that all my applications remained stable and I have not experienced any software problems.

Except:

Under Ubuntu I use a nice little widget called the CPU Frequency Scaling Monitor which allows me to easily switch the processors into certain frequencies or scheduler modes.











Unfortunately since installing Granola the frequency scaling does whatever the Hell it likes and I often find it stuck at full speed (as opposed to on demand). So it appears it has made permanent changes despite the fact I have now removed it. Looks like I'll have to bury myself among the man pages to find out how to resolve this. Permanently. Again.

The nice people over at Granola do ask for feedback. So, I can now send them this!

Also, I'm a bit dubious about statistics for my laptop between 02:00 and 18:00 on the 17th of June that claims my power usage was only 3 watts total. Seems unlikely - I'm sure the hard drive alone uses more than that and it never gets the chance to spin down (background processes).

Over to Granola... (I'll update once resolved).
My profile on StackExchange