Alex Rivera | Logout

ffmpeg install on CentOS 64-bit 'install with -fPIC' error

Asked 2012-02-29T20:23:55.453
9

I get this error when attempting to compile ffmpeg on a 64bit CentOS machine.

Here are my ./configure options:

./configure --enable-shared --enable-gpl --enable-nonfree --enable-postproc --enable-swscale --enable-pthreads --enable-libx264 --enable-libxvid --enable-libvorbis --enable-libfaac --enable-libmp3lame --enable-libvpx

make

I get the following error when compiling the source:

/usr/bin/ld: /usr/local/lib/libvpx.a(vpx_codec.c.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libvpx.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libavcodec/libavcodec.so.54] Error 1

How do I get around this error, and get libvpx up and running with the latest ffmpeg on my 64-bit CentOS box?

Edit
Report

1 Answer

11

Since you configured FFMPEG with "--enable-shared", you also need to configure some of it's other libraries with "--enable-shared" also, and they must all use the same setting.

This error message is basically telling you to compile libvpx again with "--enable-shared" added to the configure command, then try compiling FFMPEG again (also configured with "--enable-shared"). Chances are that you will then get the same error but it will say "libx264" or "libmp3lame" instead of "libvpx", so you will also need to recompile those libs with "--enable-shared" in the configure command.

answered 2012-05-18T12:40:50.837

Your Answer