如何解决此libtool链接错误

时间:2016-02-11 14:14:43

标签: c gcc shared-libraries libtool fpic

用于链接的命令:

**libtool --tag=CC --mode=link gcc -I/usr/include/libxml2 -I/home/ovsdpdk/rpmbuild/BUILD/openvswitch-2.4.0.1/openvswitch-2.4.0/include/ -I/home/ovsdpdk/rpmbuild/BUILD/openvswitch-2.4.0.1/openvswitch-2.4.0/lib/ -O3  -lxml2 -lnetconf -lopenvswitch -lovsdb -lpthread -lcrypto -lssl -lrt -laio -avoid-version -module -shared -export-dynamic --mode=link -o ietf-interfaces.la .obj/ietf-interfaces.lo .obj/ovs_mediation.lo -rpath /usr/local/lib**

错误:

libtool: link: gcc -shared  -fPIC -DPIC  .obj/.libs/ietf-interfaces.o .obj/.libs/ovs_mediation.o   -lxml2 -lnetconf -lopenvswitch -lovsdb -lpthread -lcrypto -lssl -lrt -laio  -O3   -Wl,-soname -Wl,ietf-interfaces.so -o .libs/ietf-interfaces.so
/usr/bin/ld: /usr/local/lib/libopenvswitch.a(ovsdb-idl.o): relocation R_X86_64_TPOFF32 against `var.7533' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libopenvswitch.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status

0 个答案:

没有答案