[x264-devel] trouble with shared object, fPIC and relocation of R_X86_64_PC32
Jason Garrett-Glaser
darkshikari at gmail.com
Mon Feb 15 10:22:17 CET 2010
On Sun, Feb 14, 2010 at 11:11 PM, Matt W <mwood23 at gmail.com> wrote:
> Hi--
>
> I am getting this error on compiling x264 with shared object output (I
> need a recent lib of x264 to build ffmpeg with x264 support):
>
> gcc -shared -o libx264.so.84 common/mc.o common/predict.o
> common/pixel.o common/macroblock.o common/frame.o common/dct.o
> common/cpu.o common/cabac.o common/common.o common/mdate.o
> common/set.o common/quant.o common/vlc.o encoder/analyse.o
> encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o
> encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o
> common/x86/mc-c.o common/x86/predict-c.o common/x86/cabac-a.o
> common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o
> common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o
> common/x86/quant-a.o common/x86/sad-a.o common/x86/cpu-a.o
> common/x86/dct-64.o -Wl,-soname,libx264.so.84 -lm -lpthread -s
>
> /usr/bin/ld: common/x86/cabac-a.o: relocation R_X86_64_PC32 against
> `x264_cabac_range_lps' 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: *** [libx264.so.84] Error 1
>
>
> I don't see much help online when searching for info on solving this.
> one person said to enable PIC in configure, and I did even though I
> had already seen it in the compilation output beforehand. Another
> mentioned that VLC needs "-Bsymbolic" in those cases, and that didn't
> help me either.
I think -Bsymbolic is an ld flag, not a cflag.
Dark Shikari
More information about the x264-devel
mailing list