Handbrake Compilation story
Posted: Sun May 10, 2009 10:59 pm
I compiled Handbrake yesterday for the first time. I followed the wiki instructions to the letter, and apart from a very minor adjustment here and there, it worked without issues. I just wanted to leave a trace of what I did, in case it helps anyone There's 1 or 2 things that could be used to correct the wiki.
I did everything in a Virtual Machine (Virtual PC 2007 SP1): guest OS = 100% fresh Win XP SP3 with all security updates installed.
The surprise headlines (a.k.a: what I didn't read anywhere else)
- I used a separate Cygwin partition (a fixed size virtual HD), which I initially sized too small. You'll need at least ~3.0 GB (I first sized at 2.0 GB, but ran out of space during GCC compile. Resizing a VHD isn't a standard operation...).
- Visual C# 2008 SP1 Express Edition also needs around 800 MB I believe, most of it wants to go on drive C:
- You need time! All together, I believe the Cygwin preparation was maybe 3-4 hours (I went away at some point, esp. GCC compile takes time - I also lost time due to mistakes I made). The Handbrake CLI took around 2 hours to compile. No doubt it was slower for me using Virtual PC.
Disclaimer: I'm fairly technical in IT, and I do have a (theoretical) software dev training, but in this case, I'm a newb regarding all things involved.
GUI:
* the only thing not mentioned in wiki, was to install QuickTime. Without that, build failed with some errors/warnings about QTOControlLib and AxQTOControlLib (or so) missing.
CLI:
* I made a mistake in the Cygwin install, accidentally forgetting the mandatory bison and byacc. Wiki has a cygcheck command that can help you verify the cygwin install, but it's not complete. This one is (more) complete:
* I picked up some newer versions of the tools:
Wiki: YASM 0.7.1, Jam2.5, GMP4.2.3, MPFR 2.3.2, GCC 4.2.4
I used: YASM 0.8.0, Jam2.5, GMP4.3.0, MPFR 2.4.1, GCC 4.3.3
Here's download locations for each of these newer versions:
Note: I'm not saying it's a good idea to use these. I have no clue I'm saying they're newer, and I was able to build with them. I know there's a newer GCC 4.4.0, but I naively speculated that a .0 release might have a few undiscovered bugs more than a .3)
If you want to stick with the versions mentioned by wiki, note that the mpfr-2.4.0 link in wiki is dead. This one works:
* After building GMP, I ran a unit test, as (strongly) suggested on their website. Takes a long time though (~ 1 hour?)
* the wiki says to build the CLI with
That last command seemed to do nothing for me at that point. I found another README under "./doc" of the SVN code which offered this command instead. It worked
I've copied GUI and CLI into a folder, added cygwin1.dll, and it runs. I haven't actually run an encode, as I have a family visit
I did everything in a Virtual Machine (Virtual PC 2007 SP1): guest OS = 100% fresh Win XP SP3 with all security updates installed.
The surprise headlines (a.k.a: what I didn't read anywhere else)
- I used a separate Cygwin partition (a fixed size virtual HD), which I initially sized too small. You'll need at least ~3.0 GB (I first sized at 2.0 GB, but ran out of space during GCC compile. Resizing a VHD isn't a standard operation...).
- Visual C# 2008 SP1 Express Edition also needs around 800 MB I believe, most of it wants to go on drive C:
- You need time! All together, I believe the Cygwin preparation was maybe 3-4 hours (I went away at some point, esp. GCC compile takes time - I also lost time due to mistakes I made). The Handbrake CLI took around 2 hours to compile. No doubt it was slower for me using Virtual PC.
Disclaimer: I'm fairly technical in IT, and I do have a (theoretical) software dev training, but in this case, I'm a newb regarding all things involved.
GUI:
* the only thing not mentioned in wiki, was to install QuickTime. Without that, build failed with some errors/warnings about QTOControlLib and AxQTOControlLib (or so) missing.
CLI:
* I made a mistake in the Cygwin install, accidentally forgetting the mandatory bison and byacc. Wiki has a cygcheck command that can help you verify the cygwin install, but it's not complete. This one is (more) complete:
Code: Select all
cygcheck -c autoconf automake bash binutils bison byacc bzip2 cygutils diffutils \
gcc gcc-core gcc-java gcc-g++ gzip libbz2-devel libtool m4 make patch patchutils perl \
nasm subversion wget unzip zip
Wiki: YASM 0.7.1, Jam2.5, GMP4.2.3, MPFR 2.3.2, GCC 4.2.4
I used: YASM 0.8.0, Jam2.5, GMP4.3.0, MPFR 2.4.1, GCC 4.3.3
Here's download locations for each of these newer versions:
Code: Select all
wget http://www.tortall.net/projects/yasm/releases/yasm-0.8.0.tar.gz
wget ftp://ftp.perforce.com/jam/jam-2.5.zip
wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.3.0.tar.gz
wget http://www.mpfr.org/mpfr-2.4.1/mpfr-2.4.1.tar.gz
wget ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.3.3/gcc-4.3.3.tar.gz
If you want to stick with the versions mentioned by wiki, note that the mpfr-2.4.0 link in wiki is dead. This one works:
Code: Select all
wget http://www.mpfr.org/mpfr-2.4.0/mpfr-2.4.0.tar.gz
Code: Select all
cd gmp-4.3.0 && make check
Code: Select all
svn co svn://svn.handbrake.fr/HandBrake/trunk HandBrake
cd HandBrake
make
Code: Select all
./configure --launch