[x265] Problem with linking x265 and ffmpeg
Steve Borho
steve at borho.org
Tue Apr 22 19:29:02 CEST 2014
On Tue, Apr 22, 2014 at 12:13 PM, 宮村 公男 <xanadu at apost.plala.or.jp> wrote:
<snip>
> But with "--pkg-config-flags=—static” option, I encountered “x265 not found”
> error. This time,
> config.log tells "ld: library not found for
> -l/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/lib/darwin/libclang_rt.osx.a”.
> The line is written in Libs.private: of x265.pc.
> By comment outing
> "-l/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/lib/darwin/libclang_rt.osx.a”
> line in Libs.private: of x265.pc, I can configure and build ffmpeg
> successfully.
>
> I have 2 question.
> 1.Why x265.pc have line which is not need? Or in other word, why there is a
> line which may cause an error?
Libs.private is populated at compile time from
CMAKE_CXX_IMPLICIT_LINK_LIBRARIES, which is how we learn the proper
name of the stdc++ library and other possible link requirements. In
other words, statically linking with libx265 should require linking
against that library.
Does libclang_rt.osx.a exist at that path?
I don't know why ffmpeg fails to link with it; perhaps the linker does
not like absolute paths. Perhaps you're compiling ffmpeg with gcc but
compiled libx265 with clang and statically linking them together is
problematic. Perhaps we should blacklist libclang_rt.osx.a.
> 2.Even though other third party libraries does not require to be add
> "--pkg-config-flags=—static” option, why x265 only need to be added?
Probably for the same reason the x265 cli did not work at first,
libx265.16.dylib was not found in $DYLD_LIBRARY_PATH
--
Steve Borho
More information about the x265-devel
mailing list