[FFmpeg-trac] #1713(build system:closed): Linkage fails due to relocations

FFmpeg trac at avcodec.org
Fri Dec 7 08:52:51 CET 2012


#1713: Linkage fails due to relocations
-------------------------------------+-------------------------------------
             Reporter:  Krieger      |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:  build
              Version:  git-master   |  system
             Keywords:               |               Resolution:  invalid
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by cehoyos):

 Replying to [comment:3 rminsk]:
 > Replying to [comment:1 Krieger]:
 > > This is fixed by adding -Wl,-Bsymbolic to last linkage command:
 > > {{{
 > > gcc -fPIC -shared -o mylib.so mylib.o -Wl,-Bdynamic
 $FFMPEG_PATH/libav{format,codec,util}.a
 > > }}}
 >
 > Sorry about commenting on a closed case.  I have the exact same problem.
 I have compiled static libraries for ffmpeg with --enable-pic.  Adding
 -Wl,-Bdynamic did not help.

 That would indicate that you do not have the same problem, but ...

 > {{{
 > g++ -fPIC -L/tools/shed/opensource/ffmpeg/1.0.1/payload/lib64
 -L../../lib -shared audio.o lqt_ffmpeg.o params.o video.o -o lqt_ffmpeg.so
 -Wl,-Bdynamic -lquicktime -lavformat -lavcodec -lswscale -lavutil -Wl
 ,--no-whole-archive
 > /usr/bin/ld:
 /tools/shed/opensource/ffmpeg/1.0.1/payload/lib64/libavcodec.a(h264_cabac.o):
 relocation R_X86_64_PC32 against `ff_h264_cabac_tables' can not be used
 when making a shared object; recompile with -fPIC
 > /usr/bin/ld: final link failed: Bad value
 > collect2: ld returned 1 exit status
 > make: *** [lqt_ffmpeg.so] Error 1
 > }}}

 ... please add the output if you add -Wl,-Bsymbolic to the command.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1713#comment:4>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list