CentOS 6 Compile Issue

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
kb9mfd
Posts: 6
Joined: Mon Mar 21, 2016 9:41 pm

CentOS 6 Compile Issue

Post by kb9mfd »

This is a CentOS 6 x64 mutiprocessor. It has Handbrake 9.5 installed but I need Blue-Ray support. This is what I get when I try to ./configure --launch it -

Code: Select all

 
[root@samuel HandBrake-0.10.5]# ./configure --launch
probe: host tuple...(pass) x86_64-unknown-linux-gnu
compute: available architectures...(pass) x86_64
find: ar...(pass) /usr/bin/ar
find: cp...(pass) /bin/cp
find: curl...(pass) /usr/bin/curl
find: gcc...(pass) /usr/bin/gcc
find: gmake...(pass) /usr/bin/gmake
find: m4...(pass) /usr/bin/m4
find: mkdir...(pass) /bin/mkdir
find: gpatch...(pass) /usr/bin/patch
find: rm...(pass) /bin/rm
find: ranlib...(pass) /usr/bin/ranlib
find: strip...(pass) /usr/bin/strip
find: gtar...(pass) /bin/gtar
find: wget...(pass) /usr/bin/wget
find: yasm...(pass) /usr/bin/yasm
find: autoconf...(pass) /usr/bin/autoconf
find: automake...(pass) /usr/bin/automake
find: cmake...(pass) /usr/bin/cmake
find: libtool...(pass) /usr/bin/libtool
find: pkg-config...(pass) /usr/bin/pkg-config
find: xcodebuild...(fail) not found
find: lipo...(fail) not found
select: fetch...(pass) wget (/usr/bin/wget)
compute: build tuple...(pass) x86_64-unknown-linux-gnu
probe: number of CPU cores...(pass) 4
probe: repo info...(fail) code 128
probe: version.txt...(fail)
compute: project data...Traceback (most recent call last):
  File "./make/configure.py", line 1529, in <module>
    action.run()
  File "./make/configure.py", line 274, in run
    self._action()
  File "./make/configure.py", line 821, in _action
    m = re.match( '^([0-9]+)\.([0-9]+)\.([0-9]+)-?(.*)?$', repo.tag )
  File "/usr/lib64/python2.6/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
  File "/usr/lib64/python2.6/re.py", line 245, in _compile
    raise error, v # invalid expression
sre_constants.error: nothing to repeat
User avatar
JohnAStebbins
HandBrake Team
Posts: 5722
Joined: Sat Feb 09, 2008 7:21 pm

Re: CentOS 6 Compile Issue

Post by JohnAStebbins »

It's missing the version information file. How did you get the source? You either need the source tar from our download page https://handbrake.fr/downloads.php or you need a full git clone.
kb9mfd
Posts: 6
Joined: Mon Mar 21, 2016 9:41 pm

Re: CentOS 6 Compile Issue

Post by kb9mfd »

Its there, here is a 'ls' of the source directory -

Code: Select all

[jeremy@samuel HandBrake-0.10.5]$ ls
AUTHORS    CREDITS         DoxyfileLibHb  libhb   pkg         THANKS
configure  doc             DoxyfileMac    macosx  README.pod  TRANSLATIONS
contrib    DoxyfileDotNet  gfx            make    scripts     version.txt
COPYING    DoxyfileGtk     gtk            NEWS    test        win
I downloaded it directly from handbrake.fr

Here is its contents:

Code: Select all

[jeremy@samuel HandBrake-0.10.5]$ cat version.txt 
URL=https://github.com/HandBrake/HandBrake.git
HASH=220568537099110b73c0bd29cb8ccb5cc341c3af
SHORTHASH=2205685
TAG=0.10.5
TAG_HASH=220568537099110b73c0bd29cb8ccb5cc341c3af
REV=0
BRANCH=
REMOTE=https://github.com/HandBrake/HandBrake.git
DATE=2016-02-11 20:14:05 +0000

kb9mfd
Posts: 6
Joined: Mon Mar 21, 2016 9:41 pm

Re: CentOS 6 Compile Issue

Post by kb9mfd »

Ok, instead of the download I got it via git and that one would get past the error. I am compiling it now so I guess Ill see if it finishes...
kb9mfd
Posts: 6
Joined: Mon Mar 21, 2016 9:41 pm

Re: CentOS 6 Compile Issue

Post by kb9mfd »

I gave up, I needed GTK3 and that is not available for Centos 6 and a royal paint to install so I will just have to upgrade to Centos 7.
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: CentOS 6 Compile Issue

Post by nhyone »

I encountered the same error on RHEL 6.7. I downloaded the 0.10.5 tar.bz file from HB directly, of course.

Code: Select all

...
select: fetch...(pass) wget (/usr/bin/wget)
compute: build tuple...(pass) x86_64-unknown-linux-gnu
probe: number of CPU cores...(pass) 32
probe: repo info...(fail) code 128
probe: version.txt...(fail)
compute: project data...Traceback (most recent call last):
  File "./make/configure.py", line 1529, in <module>
    action.run()
  File "./make/configure.py", line 274, in run
    self._action()
  File "./make/configure.py", line 821, in _action
    m = re.match( '^([0-9]+)\.([0-9]+)\.([0-9]+)-?(.*)?$', repo.tag )
  File "/usr/lib64/python2.6/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
  File "/usr/lib64/python2.6/re.py", line 245, in _compile
    raise error, v # invalid expression
sre_constants.error: nothing to repeat
The problem is with '^([0-9]+)\.([0-9]+)\.([0-9]+)-?(.*)?$'. Python thinks it is illegal. I was able to make it work by removing the last ?: '^([0-9]+)\.([0-9]+)\.([0-9]+)-?(.*)$', which has the same meaning, actually.

The other minor problem is that the CPU cores is capped at 32. I ran this on a system with 40 cores. Only 32 are detected.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: CentOS 6 Compile Issue

Post by BradleyS »

HandBrake's build system requires Python 2.7 or greater.
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: CentOS 6 Compile Issue

Post by nhyone »

BradleyS wrote:HandBrake's build system requires Python 2.7 or greater.
As far as I can tell, Python 2.7 does not allow this RE, either.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: CentOS 6 Compile Issue

Post by BradleyS »

It does, at least 2.7.10 on OS X.

It appears some versions of Python exhibit a bug where something that can potentially be null can't be repeated. In this case, (.*)? is the culprit; Python is basically saying an optional series of characters * can't be made more optional with ?. Anyway, your change should work fine, but (.+)? is more correct since it does not result in an empty 4th match.

Of course, you will need GTK3 to build the GUI...
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: CentOS 6 Compile Issue

Post by nhyone »

I see, I tested with 2.7.3 on the same machine.

I'm compiling the command-line version only. It's good enough for me. :D
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: CentOS 6 Compile Issue

Post by BradleyS »

Fixed on master in 71ed73b and 0.10.x in a6f62a4. We probably won't be doing another 0.10.x release; nevertheless, it's on the branch.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: CentOS 6 Compile Issue

Post by BradleyS »

I have also increased the CPU cap on master in 12ffa79
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: CentOS 6 Compile Issue

Post by nhyone »

I finally got around to build HB 1.0.2 for RHEL 6.x. There are 4 issues:
  • lame
  • opus
  • jansson
  • harfbuzz
JohnAStebbins has given most of the solution in the thread for openSUSE -- edit make/include/main.defs and move these lines out of the if block (line 44).

Code: Select all

    MODULES += contrib/jansson
    MODULES += contrib/lame
    MODULES += contrib/libopus
    MODULES += contrib/x264
I was not able to use the included harfbuzz. I had to download it (1.4.2), build and install it separately.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: CentOS 6 Compile Issue

Post by BradleyS »

There exists CentOS/RHEL 6 and 7 documentation for compiling the CLI: https://handbrake.fr/docs/en/1.0.0/deve ... entos.html

1.0.0 and later should work without modifications if the dependencies are installed per the article.
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: CentOS 6 Compile Issue

Post by nhyone »

Oops, I missed that. :P

I'm glad HB CLI still works for an archaic OS such as RHEL 6. :D
Post Reply