Announcement

Collapse
No announcement yet.

x264 Needs fPIC?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • x264 Needs fPIC?

    I'm trying to install the pts/x264-2.0.0 test, but it's failing compilation, specifically...

    Code:
    gcc -o x264  x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o filters/video/depth.o input/avs.o input/thread.o input/lavf.o output/mp4_lsmash.o libx264.a -ldl  -llsmash -lm -L.  -lavformat -lavcodec -lavutil -lswscale  -lswscale -lavutil  -m64  -lm -lpthread
    /usr/bin/ld: libx264.a(cabac-a.o): relocation R_X86_64_32 against symbol `x264_cabac_range_lps' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: libx264.a(quant-a.o): relocation R_X86_64_32 against hidden symbol `x264_pb_01' can not be used when making a shared object
    /usr/bin/ld: libx264.a(dct-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_8000' can not be used when making a shared object
    /usr/bin/ld: libx264.a(deblock-a.o): relocation R_X86_64_32 against hidden symbol `x264_pb_1' can not be used when making a shared object
    /usr/bin/ld: libx264.a(mc-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_64' can not be used when making a shared object
    /usr/bin/ld: libx264.a(mc-a2.o): relocation R_X86_64_32 against hidden symbol `x264_pw_32' can not be used when making a shared object
    /usr/bin/ld: libx264.a(pixel-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_00ff' can not be used when making a shared object
    /usr/bin/ld: libx264.a(predict-a.o): relocation R_X86_64_32 against hidden symbol `x264_pb_1' can not be used when making a shared object
    /usr/bin/ld: libx264.a(dct-64.o): relocation R_X86_64_32 against hidden symbol `x264_hsub_mul' can not be used when making a shared object
    /usr/bin/ld: libx264.a(sad-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_8' can not be used when making a shared object
    /usr/bin/ld: libx264.a(trellis-64.o): relocation R_X86_64_32 against symbol `x264_cabac_entropy' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: final link failed: Nonrepresentable section on output
    collect2: error: ld returned 1 exit status
    make: *** [Makefile:202: x264] Error 1
    gcc -o x264  x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o filters/video/depth.o input/avs.o input/thread.o input/lavf.o output/mp4_lsmash.o libx264.a -ldl  -llsmash -lm -L.  -lavformat -lavcodec -lavutil -lswscale  -lswscale -lavutil  -m64  -lm -lpthread
    /usr/bin/ld: libx264.a(cabac-a.o): relocation R_X86_64_32 against symbol `x264_cabac_range_lps' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: libx264.a(quant-a.o): relocation R_X86_64_32 against hidden symbol `x264_pb_01' can not be used when making a shared object
    /usr/bin/ld: libx264.a(dct-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_8000' can not be used when making a shared object
    /usr/bin/ld: libx264.a(deblock-a.o): relocation R_X86_64_32 against hidden symbol `x264_pb_1' can not be used when making a shared object
    /usr/bin/ld: libx264.a(mc-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_64' can not be used when making a shared object
    /usr/bin/ld: libx264.a(mc-a2.o): relocation R_X86_64_32 against hidden symbol `x264_pw_32' can not be used when making a shared object
    /usr/bin/ld: libx264.a(pixel-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_00ff' can not be used when making a shared object
    /usr/bin/ld: libx264.a(predict-a.o): relocation R_X86_64_32 against hidden symbol `x264_pb_1' can not be used when making a shared object
    /usr/bin/ld: libx264.a(dct-64.o): relocation R_X86_64_32 against hidden symbol `x264_hsub_mul' can not be used when making a shared object
    /usr/bin/ld: libx264.a(sad-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_8' can not be used when making a shared object
    /usr/bin/ld: libx264.a(trellis-64.o): relocation R_X86_64_32 against symbol `x264_cabac_entropy' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: final link failed: Nonrepresentable section on output
    collect2: error: ld returned 1 exit status
    make: *** [Makefile:202: x264] Error 1
    So it looks like it needs to be compiled with PIC, but oddly enough at the top of the log, it says "PIC: no" for whatever reason.

  • #2
    It needs
    Code:
    ./configure --enable-shared
    I just untared the snapshot, changed the configure file to always set shared="yes" and zipped it up again. Installation went fine.

    Comment

    Working...
    X