Building on Ubuntu 19.10 (eoan)
Posted: Fri Aug 23, 2019 3:52 pm
I know I know, it isn't out yet, so it wouldn't be supported. Nonetheless, my previous build of 1.2.2 stopped working as of the upgrade of some of its system dependencies this morning so I went to do a rebuild and it failed.
For those doing similar, this is how I fixed it.
(I'm building from source so I can. That's the only reason.)
The problem actually turned out to be the binutils package currently in eoan, which is an upstream snapshot. contrib/x265 doesn't like it. Or rather it doesn't like this command:
It says invalid option -- 'n'. Yes, I know. It seems very likely to me that this'll be resolved as a matter of course as eoan approaches its release date. But in the meantime...
The solution turned out to be to build my own binutils from source and use that, so eg:
Handbrake is checked out in $HOME/src/HandBrake
In $HOME/src I download the latest release binutils source from GNU: https://www.gnu.org/software/binutils/ unpack and do a straightforward make:
then back to HandBrake and configure-launch build as normal according to your chosen options.
Now actually I didn't quite do things in that order; instead I first tried building the master branch of HandBrake rather than tagged version 1.2.2, and resolved some issues regarding that too. (The above issue was unaffected - still occurred against master.) So having done that I felt committed to it. So the below is what I also had to do to build and run from the master branch as of today, and is probably not necessary to build 1.2.2.
It was missing some dependencies, so install libnuma-dev and libvpx-dev:
You could possibly use instead of installing libnuma-dev but I didn't see any particular reason to. (In fact later after I installed numatop too, I discovered that my (AMD) CPU doesn't actually support NUMA, so... [--disable-numa] probably would have been more appropriate after all.)
Another dependency: nvidia-encode-<version>. In fact this system doesn't have nvidia so in this case the right approach was to add to my configure options. Obviously if you do have nvidia you do the other thing.
It may count as a bug in the current master configure script that it doesn't disable the disable-able things by itself if they're not present. Presumably if you're building for distribution rather than just for your own system you'd be sure to have such things installed already?
For those doing similar, this is how I fixed it.
(I'm building from source so I can
Code: Select all
--enable-fdk-aac
The problem actually turned out to be the binutils package currently in eoan, which is an upstream snapshot. contrib/x265 doesn't like it. Or rather it doesn't like this command:
Code: Select all
/usr/bin/ar s contrib/x265/x265_3.1.2//libx265.a
The solution turned out to be to build my own binutils from source and use that, so eg:
Handbrake is checked out in $HOME/src/HandBrake
In $HOME/src I download the latest release binutils source from GNU: https://www.gnu.org/software/binutils/ unpack and do a straightforward make:
Code: Select all
cd $HOME/src
tar xvfz ../Downloads/binutils-2.32.tar.gz
mkdir binutils
cd $HOME/src/binutils-2.32
./configure --prefix=$HOME/src/binutils
make
make install
export PATH=$HOME/src/binutils/bin:$PATH
cd HandBrake
Now actually I didn't quite do things in that order; instead I first tried building the master branch of HandBrake rather than tagged version 1.2.2, and resolved some issues regarding that too. (The above issue was unaffected - still occurred against master.) So having done that I felt committed to it. So the below is what I also had to do to build and run from the master branch as of today, and is probably not necessary to build 1.2.2.
It was missing some dependencies, so install libnuma-dev and libvpx-dev:
Code: Select all
sudo apt install libnuma-dev libvpx-dev
Code: Select all
--disable-numa
Another dependency: nvidia-encode-<version>. In fact this system doesn't have nvidia so in this case the right approach was to add to my configure options
Code: Select all
--disable-nvenc
It may count as a bug in the current master configure script that it doesn't disable the disable-able things by itself if they're not present. Presumably if you're building for distribution rather than just for your own system you'd be sure to have such things installed already?