ibperl.a: could not read symbols: Bad value

问题描述:

在make net-snmp的时候,报如下错误:

libtool: link: gcc -shared  .libs/snmp_agent.o .libs/snmp_vars.o .libs/agent_read_config.o .libs/agent_registry.o .libs/agent_index.o .libs/agent_sysORTable.o .libs/agent_trap.o .libs/kernel.o .libs/agent_handler.o mibgroup/snmpv3/.libs/usmConf.o mibgroup/agentx/.libs/master.o mibgroup/agentx/.libs/subagent.o mibgroup/utilities/.libs/execute.o mibgroup/utilities/.libs/iquery.o mibgroup/mibII/.libs/vacm_conf.o mibgroup/agentx/.libs/protocol.o mibgroup/agentx/.libs/client.o mibgroup/agentx/.libs/master_admin.o mibgroup/agentx/.libs/agentx_config.o .libs/snmp_perl.o   -Wl,-rpath -Wl,/root/tools/net-snmp-5.5.1/snmplib/.libs -Wl,-rpath -Wl,/usr/local/lib ../snmplib/.libs/libnetsnmp.so -lcrypto -L/usr/local/lib -L/usr/gnu/lib -L/usr/local/lib/perl5/5.16.0/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lc  -Wl,-E   -Wl,-soname -Wl,libnetsnmpagent.so.20 -o .libs/libnetsnmpagent.so.20.0.1
/usr/bin/ld: /usr/local/lib/perl5/5.16.0/x86_64-linux/CORE/libperl.a(op.o): relocation R_X86_64_32S against `PL_sv_yes' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/perl5/5.16.0/x86_64-linux/CORE/libperl.a: could not read symbols: Bad value



问题分析:

是在编译perl的时候没有使用fPIC


解决办法:

命令行输入如下内容:

CFLAGS='-m64 -mtune=nocona' ./Configure -des -A ccflags=-fPIC

你可能感兴趣的:(ibperl.a: could not read symbols: Bad value)