[vlc-devel] X265 contrib link error against master generation

Rémi Denis-Courmont remi at remlab.net
Fri Oct 6 22:49:29 CEST 2017


Le perjantaina 6. lokakuuta 2017, 21.00.53 EEST Gilles Sabourin a écrit :
> Le samedi 30 septembre 2017, 06:12:11 CEST Sean McGovern a écrit :
> > Hi Gilles,
> > 
> > On Sat, Sep 30, 2017 at 2:45 AM, Gilles Sabourin
> > 
> > <gilles.sabourin at free.fr> wrote:
> > > Hello team,
> > > 
> > > Shortly after the beginning, vlc master compilation is failing with this
> > > link error:
> > > 
> > > /usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld:
> > > /usr/
> > > src/packages/BUILD/vlc-beta-3.0.0/contrib/x86_64-suse-linux/lib/libx265.
> > > a
> > > (cpu- a.asm.o): relocation R_X86_64_PC32 against symbol
> > > `x265_intel_cpu_indicator_init' can not be used when making a shared
> > > object; recompile with -fPIC
> > > /usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld:
> > > final link failed: Bad value
> > > collect2: error: ld returned 1 exit status
> > > Makefile:16940: recipe for target 'libx265_plugin.la' failed
> > > make[4]: *** [libx265_plugin.la] Error 1
> > > 
> > > X265 contrib itself compile well : no error.
> > > 
> > > The issue has been here for more then 7 days, this was the case, last
> > > 23rd.
> > 
> > I have seen the same issue.
> > 
> > It has been this way for much longer than 7 days. I've resorted to
> > using the x265 package from my distribution.
> > 
> > I suspect that x265_intel_cpu_indicator_init() is not supposed to be
> > externally visible -- it's not in the API.
> > 
> > -- Sean McG.
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> 
> Sean,
> 
> There has been no version bump for x265 and this issue has appeared
> recently. Last Saturday 16th, vlc still compiled successfully...
> 
> So I have a look at vlc master tree and I found this commit:
> 
> 
> Author: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> Date:   Mon Sep 18 10:22:52 2017 +0200
> 
>     modules: x265 is a C++ module
> 
> diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am
> index 10eb160d36..da49a0704f 100644
> --- a/modules/codec/Makefile.am
> +++ b/modules/codec/Makefile.am
> @@ -475,9 +475,9 @@ endif
> 
>  ### X26x encoders ###
> 
> -libx265_plugin_la_SOURCES = codec/x265.c
> +libx265_plugin_la_SOURCES = codec/x265.c dummy.cpp
>  libx265_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
> -libx265_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_x265)
> +libx265_plugin_la_CXXFLAGS = $(AM_CFLAGS) $(CFLAGS_x265)
>  libx265_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_x265) -rpath '$
> (codecdir)'
>  libx265_plugin_la_LIBADD = $(LIBS_x265)
>  EXTRA_LTLIBRARIES += libx265_plugin.la
> 
> I reverted it and I was able to link successfully with x265. I think this
> commit is wrong : x265 team has developed his library using C++, but this
> does not imply that their API is only reachable using C++...

Yeah, this commit looks wrong to me too (and probably violates distribution 
policies on linking). A library using C++ internal but not externally should 
ensure the proper static link flags (e.g. -lstdc++), but does not need 
explicit C++ dependencies.


-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list