mltframework / mlt-scripts

scripts to help build open source MLT apps

Home Page:https://www.mltframework.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

failed to build x265

morphological opened this issue · comments

Running Kubuntu 18.04, Kernel 4.15
I have installed all the 265 dev packages that are available, but I keep getting this error:

encoder/CMakeFiles/encoder.dir/build.make:446: recipe for target 'encoder/CMakeFiles/encoder.dir/api.cpp.o' failed
make[2]: *** [encoder/CMakeFiles/encoder.dir/api.cpp.o] Error 1
Reason: FAILURE Some kind of error occured: Unable to build x265

When trying to manually compile x265 with the latest git, I get that very same error.
https://github.com/videolan/x265

Here the output of cmake from when I manually tried to compile x265 from git:
All the dependencies appear to be met.

-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detected x86_64 target processor
-- Found NUMA: /usr  
-- Looking for numa_node_of_cpu
-- Looking for numa_node_of_cpu - found
-- libnuma found, building with support for NUMA nodes
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW - Success
-- Performing Test CC_HAS_NO_NARROWING
-- Performing Test CC_HAS_NO_NARROWING - Success
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS - Success
-- Performing Test CC_HAS_FAST_MATH
-- Performing Test CC_HAS_FAST_MATH - Success
-- Performing Test CC_HAS_STACK_REALIGN
-- Performing Test CC_HAS_STACK_REALIGN - Success
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG - Success
-- Found nasm: /usr/bin/nasm (found version "2.13.02") 
-- Found Nasm 2.13.02 to build assembly primitives
-- x265 version 0.0
-- The ASM_NASM compiler identification is NASM
-- Found assembler: /usr/bin/nasm
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Looking for include file getopt.h
-- Looking for include file getopt.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/frank/x265-master/source

We are getting the same failure on our daily builds since July 21. x265 project is notorious for introducing commits that break builds frequently from introducing C++ code into their C headers. Ultimately, this is not our bug except sometimes if the problem appears too long we will change the script to pin it to a certain version. See all these newly reported build bugs against the upstream x265 project:
https://bitbucket.org/multicoreware/x265/issues?status=new&status=open
https://bitbucket.org/multicoreware/x265/issues/425/build-fail-when-compiling-from-the-default
https://bitbucket.org/multicoreware/x265/issues/426/commit-b0d31e2-has-build-issues-on-linux
https://bitbucket.org/multicoreware/x265/issues/427/build-error-on-macos-since-commit-5d34bbf
https://bitbucket.org/multicoreware/x265/issues/428/commit-c258d21-breaks-build-on-linux-as

Thanks for the info.
I was able to compile version 2.5 from July 13th from the stable branch
https://github.com/videolan/x265/releases/tag/2.5

Now can I tell the script to clone this specific version?
The way it's set up with this REPOLOCS option, I can only enter the main git, --single-branch & -b are not available.

I wanna try the melt created by your script and then report back on our other issue, haha.

The top of the script simply and clearly makes it possible to use any git ref (tag, branch, or sha1sum) but not other git command line options. You are requiring a lot of help, and. I am no longer available to help you - too time-consuming.

I apologize, but x265 being broken is obviously not my fault.

I have successfully compiled mlt with your script and will test it now.
I hope that you will still be able to spare a minute for the results.

For anyone else who is facing this problem on 18.04
Simply replace X265_HEAD=1 with X265_HEAD=2
2 is the stable branch, but you can also use the tag for any version <2.5
Any version above 2.5 produces an error during compilation.

Later on in the script there will also be an autoconf error.
Do not use the 2.69-10 package from the official repo, it won't work.
Install from here instead:
https://github.com/Distrotech/autoconf

Finally, libtheora-dev 1.1 causes problems
Installing from this ppa solved it for me: https://launchpad.net/ubuntu/+source/libtheora