LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 625|回复: 0

安装vlc时 gcc 加参数 -fPIC 问题

[复制链接]
发表于 2011-12-11 15:42:19 | 显示全部楼层 |阅读模式
[root@nginx_bak ~]# uname -a
Linux nginx_bak 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

在64位的系统是配置安装vlc遇到下面问题。

[root@nginx_bak ~]# make
make[6]: Nothing to be done for `all-am'.
make[6]: Leaving directory `/usr/local/src/vlc/vlc/modules/codec/omxil'
make[5]: Leaving directory `/usr/local/src/vlc/vlc/modules/codec/omxil'
make[5]: Entering directory `/usr/local/src/vlc/vlc/modules/codec'
/bin/sh ../../libtool --tag=CC --mode=link gcc -std=gnu99 `top_srcdir="../.." top_builddir="../.." ../../vlc-config --cflags plugin libx264_plugin.la` -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -rpath '/usr/local/lib/vlc/plugins/codec' -avoid-version -module -export-symbol-regex ^vlc_entry -shrext .so -rpath "/usr/local/lib/vlc/plugins/codec" -no-undefined `top_srcdir="../.." top_builddir="../.." ../../vlc-config --ldflags plugin libx264_plugin.la`  -o libx264_plugin.la   libx264_plugin_la-x264.lo  `top_srcdir="../.." top_builddir="../.." ../../vlc-config -libs plugin libx264_plugin.la` ../../src/libvlccore.la ../../compat/libcompat.la
gcc -std=gnu99 -shared  .libs/libx264_plugin_la-x264.o -Wl,--whole-archive ../../compat/.libs/libcompat.a -Wl,--no-whole-archive  -Wl,--rpath -Wl,/usr/local/src/vlc/vlc/src/.libs -lx264 -lpthread -L/usr/local/src/vlc/x264-snapshot-20100524-2245 -lm ../../src/.libs/libvlccore.so  -mtune=athlon64 -Wl,-soname -Wl,libx264_plugin.so -o .libs/libx264_plugin.so
/usr/bin/ld: /usr/local/src/vlc/x264-snapshot-20100524-2245/libx264.a(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[5]: *** [libx264_plugin.la] Error 1
make[5]: Leaving directory `/usr/local/src/vlc/vlc/modules/codec'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/src/vlc/vlc/modules/codec'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/local/src/vlc/vlc/modules/codec'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/vlc/vlc/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/vlc/vlc'
make: *** [all] Error 2

求解

根据网上资料,说要在Makefile文件里面,给GCC 加参数-fPIC,具体怎么操作?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表