[FFmpeg-user] No compiled with -fPIC for libavcodec/aarch64/vp9mc_16bpp_neon.S

Reindl Harald h.reindl at thelounge.net
Tue Sep 12 12:22:16 EEST 2023



Am 12.09.23 um 07:19 schrieb Peng Gao:
>   There are some link errors when I compiled the OpenCV(4.6.0)  With the
> following configuration :
> cmake .. -D WITH_OPENCL=ON -D WITH_FFMPEG=ON  -D CMAKE_BUILD_TYPE=Release ,
> 
>   following is the error:
>   /ffmpeg/lib/libavcodec.a(vp9mc_16bpp_neon.o): relocation
> R_AARCH64_ADR_PREL_PG_HI21 against symbol `ff_vp9_subpel_filters' which may
> bind externally can not be used when making a shared object; recompile with
> -fPIC
> /ffmpeg/lib/libavcodec.a(vp9mc_16bpp_neon.o): In function
> `ff_vp9_avg_sharp4_v_12_neon':
> libavcodec/aarch64/vp9mc_16bpp_neon.S:606:(.text+0x230c): dangerous
> relocation: unsupported relocation.
> 
> It shows ffmpeg should be compiled with -fPIC,  this is also enabled in the
> configuration when compiling the ffmpeg , so I don't know why it is and I
> try to get help from the community 

you talk about linker errors but only set compiler flags

cat /rpmbuild/SPECS/ffmpeg.spec  | grep -i pic
  --extra-cflags="%{optflags} %{O3_flags} -fPIC -flto=%{?_smp_tasks} -w" \
  --extra-ldflags="-Wl,--as-needed -Wl,-z,now -Wl,-z,relro 
-Wl,-z,noexecstack %{optflags} %{O3_flags} -fPIC -flto=%{?_smp_tasks} -w" \
  --enable-pic \



More information about the ffmpeg-user mailing list