Cannot compile HandBrake when following your instructinos.

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
taylorkh
Posts: 5
Joined: Thu Jun 27, 2019 3:12 pm

Cannot compile HandBrake when following your instructinos.

Post by taylorkh » Thu Jun 27, 2019 3:35 pm

Description of problem or question:

The instructions for building HandBrake on Linux https://handbrake.fr/docs/en/latest/dev ... linux.html tell me to clone the HandBrake repository from github. If I do this I find that I am unable to compile the application per the instructions provided. I get errors such as libvpx must be >= 1.4 (the latest is 1.3), Error 1, ERROR: opus not found using pkg-config etc.

If I download the tarball for the current version and unpack it on the same machine I can successfully build and install the HandBrake. If the intent of your instruction page is for users of of HandBrake to compile and install the program for use, it would be better to instruct them to download and unpack the tarball and work from there. Cloning from github is fine for those wishing to work with the code.

I simply wanted to install and use HandBrake. This has been a rather frustrating process.

Ken

Steps to reproduce the problem (If Applicable):




HandBrake version (e.g., 1.0.0):

1.2.2


Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

CentOS 7.6 with Gnome 3 desktop. Dependencies have been installed per your instructions https://handbrake.fr/docs/en/latest/dev ... entos.html


HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

Please replace this text with the contents of your log file between the two code tags - OR -  provide a pastebin URL in place of these 3 lines.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5410
Joined: Sat Feb 09, 2008 7:21 pm

Re: Cannot compile HandBrake when following your instructinos.

Post by JohnAStebbins » Thu Jun 27, 2019 4:00 pm

Did you read the "Installing dependencies" section before "Building HandBrake"?

User avatar
JohnAStebbins
HandBrake Team
Posts: 5410
Joined: Sat Feb 09, 2008 7:21 pm

Re: Cannot compile HandBrake when following your instructinos.

Post by JohnAStebbins » Thu Jun 27, 2019 4:10 pm

Also, CentOS supports flatpaks. You can install HandBrake from flathub (or download our nightly build flatpaks) rather than building it yourself.

taylorkh
Posts: 5
Joined: Thu Jun 27, 2019 3:12 pm

Re: Cannot compile HandBrake when following your instructinos.

Post by taylorkh » Thu Jun 27, 2019 4:25 pm

Thanks JohnAStebbins,
JohnAStebbins wrote:
Thu Jun 27, 2019 4:00 pm
Did you read the "Installing dependencies" section before "Building HandBrake"?
As I stated, the dependencies were installed per the HandBrake documentation page.

I am aware of the FlatPack. I have experimented with it in CentOS and Ubunut. In CentOS I have experienced some SE Linux issues which I do NOT see when running the traditionally installed version of HandBrake. I also see some disk space warnings with the FlatPack which I do not see with the installed version (CentOS and Ubuntu.)

Ken

User avatar
JohnAStebbins
HandBrake Team
Posts: 5410
Joined: Sat Feb 09, 2008 7:21 pm

Re: Cannot compile HandBrake when following your instructinos.

Post by JohnAStebbins » Thu Jun 27, 2019 4:51 pm

FYI, I build HandBrake routinely on Fedora, which has many similarities with CentOS. I've not seen any problem with building from git, but CentOS uses older versions of libraries. From the error you mentioned, it sounds like CentOS has too old of a version of libvpx for the version of ffmpeg that HandBrake git is using. So future versions of HandBrake will not build on the current version of CentOS (unless you build and install libvpx from source).

It's unfortunate that you can't use flatpaks. Problems like the above just don't happen since the application is built against a flatpak runtime that gets installed along with the application. Fedora also uses SELinux. I've not seen any problems with flatpak and SELinux, so hopefully CentOS will catch up with whatever policy changes are needed to make this work right in the not too distant future.

taylorkh
Posts: 5
Joined: Thu Jun 27, 2019 3:12 pm

Re: Cannot compile HandBrake when following your instructinos.

Post by taylorkh » Thu Jun 27, 2019 7:46 pm

Thanks again JohnAStebbins,

I am not sure that the libvpx "error" is valid. HandBrake 1.2.2 from the source tarball compiles, installs and runs fine with the 1.3.0 version of libvpx installed on CentOS. Is cloning the repo from github getting me the code for the latest stable release (1.1.2 which I want) or the in progress version which is being worked on (which I do not care about)?

As to the Flatpak... I have only tried it once. As I recall the SE Linux complaints has to do with ffmpeg which was apparently called from within HandBrake. I did not have time to dig into the issue but I am sure it could be fixed. As I understand Flatpack runs programs within its own environment (sandbox) and I suspect I have to configure it to use more disk space when running HandBrake to clear the space warning.

I can now compile and install HandBrake. My next trick will be to build my development virtual machine without forcing in CentOS 6 and Fedora packages as described on the dependencies page. I believe I have found native CentOS 7 sources for all the packages in question. I want to also configure yum priorities for the various repos so I do not break the thing when updating. If I get all this working I will try to figure out how to build a .rpm package to install on my "production" PC.

If that does not work out, or when I get a little time, I will definitely delve further into Flatpak.

Ken

p.s. The ancient version "HandBrake-gui x86_64 0.9.9-5.el7.nux" which I had installed from nux-dextop does more than I can ever figure out.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5410
Joined: Sat Feb 09, 2008 7:21 pm

Re: Cannot compile HandBrake when following your instructinos.

Post by JohnAStebbins » Thu Jun 27, 2019 8:17 pm

I see why git fails to compile for you. Previously, we downloaded and linked to a private copy of libvpx. This is what is happening in the 1.2.2 tarball version. git HEAD now uses the version of libvpx installed on the system. Since your system version is too old, it is failing.

git clone gets you everything. But the default branch after clone completes is master (i.e. current development). You can switch to a release tag with e.g. "git checkout 1.2.2".

HandBrake does not "call ffmpeg". The ffmpeg command line executable is not used by HandBrake. We statically link to the ffmpeg libraries to create one self-contained executable. So I'm not sure what SELinux problem you might have had. But if you try it again some day and still have problems, feel free to post the error messages here and I'll try to help.

taylorkh
Posts: 5
Joined: Thu Jun 27, 2019 3:12 pm

Re: Cannot compile HandBrake when following your instructinos.

Post by taylorkh » Fri Jun 28, 2019 2:05 pm

Good morning JohnAStebbins,
JohnAStebbins wrote:
Thu Jun 27, 2019 8:17 pm
Previously, we downloaded and linked to a private copy of libvpx.
After reading this I looked at your avatar and see that you are a member of the HandBrake team. I definitely owe you a DOUBLE thank you. First for your help in this post and second for helping to produce this great program. You have motivated me to take another look at the FlatPak. The FlatPak web site was a little confusing for a first time user. It said "...just download our repo file and install it." I downloaded it but it was not obvious how to install it. I read the man pages and fumbled around. I finally found an example of how to download and install the repo in a single step. Installing the HandBrake Flatpak and launching it... not straight forward for a first time user. I probably messed up something on my original try.

I just tried again from scratch with a clean CentOS 7.6 virtual machine. I followed these steps which I had collected during my prior experiments

Code: Select all

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak install flathub fr.handbrake.ghb
flatpak run fr.handbrake.ghb/x86_64/stable
It worked perfectly. I mounted an nfs export on the host computer to provide working space. I am currently transcoding an .mp4 to an .mkv just as a test. No SE Linux warnings and no disk space warnings. GREAT!

I will still try to build an .rpm package just to see if I can. However, the FlatPak is definitely a viable option.

Thanks once more,

Ken

User avatar
JohnAStebbins
HandBrake Team
Posts: 5410
Joined: Sat Feb 09, 2008 7:21 pm

Re: Cannot compile HandBrake when following your instructinos.

Post by JohnAStebbins » Fri Jun 28, 2019 3:03 pm

Yeah, it seems like they've regressed a little in their documentation. Those command line instructions you posted used to be front and center when you clicked flathub's "Quick Setup" link. Now they just give a weak "Download and install this!" link that's kind of useless if your system isn't set up to automatically recognize repo file types and launch the software center to install it. Even fedora 30 doesn't handle this smoothly yet. On fedora, once the repo is set up, the apps can be installed from the normal software center GUI.

Another useful tip if you don't want to pollute your root filesystem or don't have root access is the "--user" option to flatpak. You can install the repo and install apps using "--user" without root permissions. Everything is owned by and only accessible by the user installing it.

I'm glad it's working for you. I'm very interested in any issues you might run across with the flatpak since that's the primary distribution method I'm pushing for HandBrake on linux. So please let me know if you experience any problems with it.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5410
Joined: Sat Feb 09, 2008 7:21 pm

Re: Cannot compile HandBrake when following your instructinos.

Post by JohnAStebbins » Fri Jun 28, 2019 3:08 pm

FYI, if you rip BDs or DVDs, you can also install MakeMKV from flathub. It's not being published by the official MakeMKV author, but he seems to be keeping up with new releases fairly well. He's just one point release behind right now.

taylorkh
Posts: 5
Joined: Thu Jun 27, 2019 3:12 pm

Re: Cannot compile HandBrake when following your instructinos.

Post by taylorkh » Fri Jun 28, 2019 4:04 pm

Thanks for the tip.

Post Reply