Ubuntu 13.04 - fresh install, I installed for the sole purpose of working out any kinks when installing OpenCV.
Following the guide here for OpenCV:
http://opencv.willowgarage.com/wiki/FFMPEG
And here for ffmpeg,x264, and some other requirements
https://trac.ffmpeg.org/wiki/UbuntuCompilationGuide
I had no errors in any of the installs, until I ran make for OpenCV
Code:
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/bitstrm.cpp.o
Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/bin/ld: /home/user/ffmpeg_build/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/home/user/ffmpeg_build/lib/libavcodec.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_highgui.so.2.4.6] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
I have searched around and have found a few mentions of changing the make file, but they weren't specific to OpenCV. I ran into the same error in Mint 15 as well, which is why I installed Ubuntu, hoping that would fix my problem.
I came across a post
here that says
"
After building both x264 and ffmpeg with --enable-pic and --extra-cflags=-fPIC options, they both seem to work just fine."
so I tried but now I'm getting an error saying that no working C compiler is found, yet GCC shows up as version 4.7.3. I'm at a dead end here.