[FFmpeg-user] 2 problem with ffmpeg and x265
Kimio Miyamura
xanadu at apost.plala.or.jp
Thu Jul 3 12:44:53 CEST 2014
2014/07/03 8:58、David Favor <david at davidfavor.com> のメール:
> 宮村 公男 wrote:
>> Hi, I’m now trying to build ffmpeg with static x265. But configure script rejects with error. The error is "ERROR: x265 not found”
>> I’m using Mac OS X 10.9.2 and LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
>> Here’s a part of config.log
>> check_pkg_config x265 x265.h x265_encoder_encode
>> pkg-config --exists --print-errors x265
>> check_func_headers x265.h x265_encoder_encode -I/Volumes/ffmpeg_compile/include -L/Volumes/ffmpeg_compile/lib -lx265
>> check_ld cc -I/Volumes/ffmpeg_compile/include -L/Volumes/ffmpeg_compile/lib -lx265
>> check_cc -I/Volumes/ffmpeg_compile/include -L/Volumes/ffmpeg_compile/lib
>> BEGIN /var/folders/qk/x9k9r6f955d75dnv5dd2rgm00000gn/T//ffconf.EjOwyBdL.c
>> 1 #include <x265.h>
>> 2 long check_x265_encoder_encode(void) { return (long) x265_encoder_encode; }
>> 3 int main(void) { return 0; }
>> END /var/folders/qk/x9k9r6f955d75dnv5dd2rgm00000gn/T//ffconf.EjOwyBdL.c
>> gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -std=c99 -mdynamic-no-pic -fomit-frame-pointer -fPIC -pthread -I/Volumes/ffmpeg_compile/include -L/Volumes/ffmpeg_compile/lib -c -o /var/folders/qk/x9k9r6f955d75dnv5dd2rgm00000gn/T//ffconf.UUCyIpQ5.o /var/folders/qk/x9k9r6f955d75dnv5dd2rgm00000gn/T//ffconf.EjOwyBdL.c
>> clang: warning: argument unused during compilation: '-L/Volumes/ffmpeg_compile/lib'
>> gcc -Wl,-dynamic,-search_paths_first -I/Volumes/ffmpeg_compile/include -L/Volumes/ffmpeg_compile/lib -o /var/folders/qk/x9k9r6f955d75dnv5dd2rgm00000gn/T//ffconf.d9N4vA5m /var/folders/qk/x9k9r6f955d75dnv5dd2rgm00000gn/T//ffconf.UUCyIpQ5.o -lx265 -lm -lbz2 -lz -pthread
>> clang: warning: argument unused during compilation: '-pthread'
>> Undefined symbols for architecture x86_64:
>> "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
>> x265::ScanGenerator::GetNextIndex(unsigned int, unsigned int) in libx265.a(TComRom.cpp.o)
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> "std::__1::ios_base::getloc() const", referenced from:
>> x265::ScanGenerator::GetNextIndex(unsigned int, unsigned int) in libx265.a(TComRom.cpp.o)
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(unsigned long, char)", referenced from:
>> std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in libx265.a(TComRom.cpp.o)
>> "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:
>> std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in libx265.a(TComRom.cpp.o)
>> "std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char)", referenced from:
>> x265::ScanGenerator::GetNextIndex(unsigned int, unsigned int) in libx265.a(TComRom.cpp.o)
>> "std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from:
>> x265::ScanGenerator::GetNextIndex(unsigned int, unsigned int) in libx265.a(TComRom.cpp.o)
>> "std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> "std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from:
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> "std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(int)", referenced from:
>> x265::ScanGenerator::GetNextIndex(unsigned int, unsigned int) in libx265.a(TComRom.cpp.o)
>> "std::__1::cerr", referenced from:
>> x265::ScanGenerator::GetNextIndex(unsigned int, unsigned int) in libx265.a(TComRom.cpp.o)
>> "std::__1::ctype<char>::id", referenced from:
>> x265::ScanGenerator::GetNextIndex(unsigned int, unsigned int) in libx265.a(TComRom.cpp.o)
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> "std::__1::locale::~locale()", referenced from:
>> x265::ScanGenerator::GetNextIndex(unsigned int, unsigned int) in libx265.a(TComRom.cpp.o)
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> "std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> "std::__1::ios_base::clear(unsigned int)", referenced from:
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> "std::terminate()", referenced from:
>> ___clang_call_terminate in libx265.a(TComRom.cpp.o)
>> ___clang_call_terminate in libx265.a(bitcost.cpp.o)
>> ___clang_call_terminate in libx265.a(encoder.cpp.o)
>> ___clang_call_terminate in libx265.a(threadpool.cpp.o)
>> ___clang_call_terminate in libx265.a(frameencoder.cpp.o)
>> ___clang_call_terminate in libx265.a(TComPic.cpp.o)
>> ___clang_call_terminate in libx265.a(slicetype.cpp.o)
>> ...
>> "vtable for __cxxabiv1::__class_type_info", referenced from:
>> typeinfo for x265_encoder in libx265.a(encoder.cpp.o)
>> typeinfo for x265::FrameFilter in libx265.a(encoder.cpp.o)
>> typeinfo for x265::TComPicYuv in libx265.a(TComPicYuv.cpp.o)
>> typeinfo for x265::ThreadPool in libx265.a(threadpool.cpp.o)
>> typeinfo for x265::SEI in libx265.a(frameencoder.cpp.o)
>> typeinfo for x265::FrameFilter in libx265.a(frameencoder.cpp.o)
>> typeinfo for x265::TComBitIf in libx265.a(frameencoder.cpp.o)
>> ...
>> NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
>> "vtable for __cxxabiv1::__si_class_type_info", referenced from:
>> typeinfo for x265::Encoder in libx265.a(encoder.cpp.o)
>> typeinfo for x265::ThreadPoolImpl in libx265.a(threadpool.cpp.o)
>> typeinfo for x265::PoolThread in libx265.a(threadpool.cpp.o)
>> typeinfo for x265::SEIPictureTiming in libx265.a(frameencoder.cpp.o)
>> typeinfo for x265::SEIRecoveryPoint in libx265.a(frameencoder.cpp.o)
>> typeinfo for x265::SEIGradualDecodingRefreshInfo in libx265.a(frameencoder.cpp.o)
>> typeinfo for x265::SEIDisplayOrientation in libx265.a(frameencoder.cpp.o)
>> ...
>> NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
>> "vtable for __cxxabiv1::__vmi_class_type_info", referenced from:
>> typeinfo for x265::FrameEncoder in libx265.a(frameencoder.cpp.o)
>> typeinfo for x265::TEncSbac in libx265.a(TEncSbac.cpp.o)
>> typeinfo for x265::MotionEstimate in libx265.a(motion.cpp.o)
>> NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
>> "operator delete[](void*)", referenced from:
>> x265::BitCost::destroy() in libx265.a(bitcost.cpp.o)
>> x265::Encoder::create() in libx265.a(encoder.cpp.o)
>> x265::Encoder::destroy() in libx265.a(encoder.cpp.o)
>> x265::TComPicSym::destroy() in libx265.a(TComPicSym.cpp.o)
>> x265::FrameEncoder::destroy() in libx265.a(frameencoder.cpp.o)
>> x265::FrameEncoder::init(x265::Encoder*, int) in libx265.a(frameencoder.cpp.o)
>> x265::FrameEncoder::compressFrame() in libx265.a(frameencoder.cpp.o)
>> ...
>> "operator delete(void*)", referenced from:
>> _x265_encoder_open_15 in libx265.a(api.cpp.o)
>> x265::Encoder::~Encoder() in libx265.a(encoder.cpp.o)
>> x265::Encoder::create() in libx265.a(encoder.cpp.o)
>> x265::Encoder::destroy() in libx265.a(encoder.cpp.o)
>> x265::Encoder::encode(bool, x265_picture const*, x265_picture*, x265::NALUnitEBSP**) in libx265.a(encoder.cpp.o)
>> x265::FrameFilter::~FrameFilter() in libx265.a(encoder.cpp.o)
>> x265::TComPicSym::create(int, int, int, unsigned int, unsigned int) in libx265.a(TComPicSym.cpp.o)
>> ...
>> "operator new[](unsigned long)", referenced from:
>> x265::BitCost::setQP(unsigned int) in libx265.a(bitcost.cpp.o)
>> x265::BitCost::CalculateLogs() in libx265.a(bitcost.cpp.o)
>> x265::Encoder::create() in libx265.a(encoder.cpp.o)
>> x265::TComPicSym::create(int, int, int, unsigned int, unsigned int) in libx265.a(TComPicSym.cpp.o)
>> x265::FrameEncoder::init(x265::Encoder*, int) in libx265.a(frameencoder.cpp.o)
>> x265::FrameEncoder::compressFrame() in libx265.a(frameencoder.cpp.o)
>> x265::TComLoopFilter::create(unsigned int) in libx265.a(TComLoopFilter.cpp.o)
>> ...
>> "operator new(unsigned long)", referenced from:
>> _x265_encoder_open_15 in libx265.a(api.cpp.o)
>> x265::Encoder::create() in libx265.a(encoder.cpp.o)
>> x265::Encoder::encode(bool, x265_picture const*, x265_picture*, x265::NALUnitEBSP**) in libx265.a(encoder.cpp.o)
>> x265::TComPicSym::create(int, int, int, unsigned int, unsigned int) in libx265.a(TComPicSym.cpp.o)
>> x265::TComPicSym::allocSaoParam(x265::TComSampleAdaptiveOffset*) in libx265.a(TComPicSym.cpp.o)
>> x265::ThreadPool::allocThreadPool(int) in libx265.a(threadpool.cpp.o)
>> x265::FrameEncoder::compressFrame() in libx265.a(frameencoder.cpp.o)
>> ...
>> "___cxa_begin_catch", referenced from:
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> ___clang_call_terminate in libx265.a(TComRom.cpp.o)
>> ___clang_call_terminate in libx265.a(bitcost.cpp.o)
>> ___clang_call_terminate in libx265.a(encoder.cpp.o)
>> ___clang_call_terminate in libx265.a(threadpool.cpp.o)
>> ___clang_call_terminate in libx265.a(frameencoder.cpp.o)
>> ___clang_call_terminate in libx265.a(TComPic.cpp.o)
>> ...
>> "___cxa_end_catch", referenced from:
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> "___cxa_pure_virtual", referenced from:
>> vtable for x265::Thread in libx265.a(threading.cpp.o)
>> vtable for x265::WaveFront in libx265.a(wavefront.cpp.o)
>> "___dynamic_cast", referenced from:
>> x265::JobProvider::flush() in libx265.a(threadpool.cpp.o)
>> "___gxx_personality_v0", referenced from:
>> _x265_encoder_open_15 in libx265.a(api.cpp.o)
>> Dwarf Exception Unwind Info (__eh_frame) in libx265.a(api.cpp.o)
>> x265::ScanGenerator::GetNextIndex(unsigned int, unsigned int) in libx265.a(TComRom.cpp.o)
>> std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libx265.a(TComRom.cpp.o)
>> std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in libx265.a(TComRom.cpp.o)
>> Dwarf Exception Unwind Info (__eh_frame) in libx265.a(TComRom.cpp.o)
>> x265::BitCost::setQP(unsigned int) in libx265.a(bitcost.cpp.o)
>> ...
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> ERROR: x265 not found
>> And also, I can build ffmpeg with shared x265 but this time dyld: Library not loaded error occurred.
>> $ which ffmpeg
>> /Volumes/ffmpeg_compile/bin/ffmpeg
>> $ ffmpeg dyld: Library not loaded: libx265.15.dylib
>> Referenced from: /Volumes/ffmpeg_compile/bin/ffmpeg
>> Reason: image not found
>> Trace/BPT trap: 5
>> $ otool -L /Volumes/ffmpeg_compile/bin/ffmpeg
>> /Volumes/ffmpeg_compile/bin/ffmpeg:
>> /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit (compatibility version 1.0.0, current version 1.0.0)
>> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1056.13.0)
>> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.8.0)
>> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.14.0)
>> /System/Library/Frameworks/VideoDecodeAcceleration.framework/Versions/A/VideoDecodeAcceleration (compatibility version 1.0.0, current version 1.0.0)
>> libx265.15.dylib (compatibility version 15.0.0, current version 0.9.0)
>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
>> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.8.0)
>> /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
>> if I put libx265.15.dylib to /usr/local/lib, ffmpeg can execute.
>> My final aim is to build ffmpeg with static x265 library. But as a part of try and error, I have encountered 2 problems. Please solve them...
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> Post all the commands you use to build x265 + ffmpeg.
>
> Likely someone can help you.
I am 宮村 公男. Changed sender name to "Kimio Miyamura".
Well, I build x265 with following command:
$ hg clone https://bitbucket.org/multicoreware/x265
$ cd x265/source
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DENABLE_SHARED=NO .
$ make && make install
Note that you have to install mercuria to build x265.
And I build ffmpeg with following command:
$ git clone git://source.ffmpeg.org/ffmpeg.git
$ cd ffmpeg
$ export LDFLAGS="-L${TARGET}/lib $CFLAGS"
$ export CFLAGS="-I${TARGET}/include $LDFLAGS"
$ ./configure --prefix=${TARGET} --pkg-config-flags=--static --enable-gpl --enable-libx265
Most important point is add "--pkg-config-flags=--static". It can be rewrite with "pkg_config='pkg-config --static'".
This is mentioned on "[FFmpeg-user] Enabling libx265" thread too.
Additionally, executing error when build x265 as shared library is my fault. I forget to add "export DYLD_LIBRARY_PATH=path/to/dyld".
Best Regards,
// Miya
More information about the ffmpeg-user
mailing list