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

Peng Gao peng at multicorewareinc.com
Tue Sep 12 15:11:15 EEST 2023


Thanks,

 The link error means this error is reported when doing the link stage on
compiling OpenCV.
 The error shows it requires a flag(-fPIC) to recompile ffmpeg, it's a
compiler flag, not a link flag.

 no errors when I use the following command to configure ffmpeg.
  ./configure --enable-shared --enable-nonfree --enable-pic --prefix=
~/wk/install/ffmpeg  --enable-gpl --enable-libx264

Thanks again for help.

On Tue, Sep 12, 2023 at 5:22 PM Reindl Harald <h.reindl at thelounge.net>
wrote:

>
>
> 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 \
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list