linux下编译faac及faad2出错:提示 recompile with -fPIC
在装ffmpeg时,编译faac和faad2都出现这一错误:
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libm.a(s_sin.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libm.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libfaac.la] Error 1
make[2]: Leaving directory `/root/faac-1.28/libfaac'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/faac-1.28'
make: *** [all] Error 2
google查了一天都尝试过始终没有解决啊,请各位大牛帮忙给看看!!!
------解决方案--------------------尝试使用shared library,不要使用static library编译。