dce中的重定位错误R_X86_64_PLTOFF64

时间:2016-06-15 23:13:45

标签: g++ ns-3 dce g++5.1

我一直在尝试编译直接代码执行(DCE) - 网络模拟器ns-3的扩展,它可以通过提供虚假的POSIX层在模拟器中运行真实程序(VLC,iperf) - 但没有成功自从我升级到ubuntu xenial。 要编译DCE,首先运行./waf configure,最后构建程序:

$ LANG=C ./waf build  
Waf: Entering directory `/home/teto/dce/build'
[ 10/367] lib/pkgconfig/libns3-dev-netlink-debug.pc:  -> build/lib/pkgconfig/libns3-dev-netlink-debug.pc
[116/367] lib/pkgconfig/libns3-dev-dce-debug.pc:  -> build/lib/pkgconfig/libns3-dev-dce-debug.pc
[248/367] cxxprogram: build/test/test-tsearch.cc.50.o -> build/bin_dce/test-tsearch
17:53:36 runner ['g++', '-Wl,--no-as-needed', '-pthread', '-pie', '-lrt', '-rdynamic', 'test/test-tsearch.cc.50.o', '-o', '/home/teto/dce/build/bin_dce/test-tsearch', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Llib', '-ltest']
[284/367] cxxprogram: build/example/dce-udp-simple.cc.68.o -> build/bin/dce-udp-simple
17:53:36 runner ['g++', '-Wl,--no-as-needed', '-pthread', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', 'example/dce-udp-simple.cc.68.o', '-o', '/home/teto/dce/build/bin/dce-udp-simple', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Llib', '-Llib', '-L/home/teto/ns3off/install/lib', '-L/home/teto/ns3off/install/lib', '-L/home/teto/ns3off/install/lib', '-lns3-dce', '-lns3-netlink', '-lns3-dev-core-debug', '-lrt', '-lns3-dev-internet-debug', '-lns3-dev-bridge-debug', '-lns3-dev-mpi-debug', '-lns3-dev-traffic-control-debug', '-lns3-dev-network-debug', '-lns3-dev-stats-debug', '-lns3-dev-core-debug', '-lrt', '-lns3-dev-network-debug', '-lns3-dev-stats-debug', '-lns3-dev-core-debug', '-lrt']
[286/367] cxxprogram: build/example/ccnx/dce-ccnd-simple.cc.69.o -> build/bin/dce-ccnd-simple
17:53:36 runner ['g++', '-Wl,--no-as-needed', '-pthread', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', 'example/ccnx/dce-ccnd-simple.cc.69.o', '-o', '/home/teto/dce/build/bin/dce-ccnd-simple', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Llib', '-Llib', '-L/home/teto/ns3off/install/lib', '-L/home/teto/ns3off/install/lib', '-L/home/teto/ns3off/install/lib', '-lns3-dce', '-lns3-netlink', '-lns3-dev-core-debug', '-lrt', '-lns3-dev-internet-debug', '-lns3-dev-bridge-debug', '-lns3-dev-mpi-debug', '-lns3-dev-traffic-control-debug', '-lns3-dev-network-debug', '-lns3-dev-stats-debug', '-lns3-dev-core-debug', '-lrt', '-lns3-dev-network-debug', '-lns3-dev-stats-debug', '-lns3-dev-core-debug', '-lrt']
[288/367] cxxprogram: build/example/ccnx/dce-ccnd-short-stuff.cc.70.o -> build/bin/dce-ccnd-short-stuff
17:53:36 runner ['g++', '-Wl,--no-as-needed', '-pthread', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-Wl,-Bdynamic', '-Wl,-Bdynamic', 'example/ccnx/dce-ccnd-short-stuff.cc.70.o', '-o', '/home/teto/dce/build/bin/dce-ccnd-short-stuff', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Llib', '-Llib', '-L/home/teto/ns3off/install/lib', '-L/home/teto/ns3off/install/lib', '-L/home/teto/ns3off/install/lib', '-lns3-dce', '-lns3-netlink', '-lns3-dev-core-debug', '-lrt', '-lns3-dev-internet-debug', '-lns3-dev-bridge-debug', '-lns3-dev-mpi-debug', '-lns3-dev-traffic-control-debug', '-lns3-dev-network-debug', '-lns3-dev-stats-debug', '-lns3-dev-core-debug', '-lrt', '-lns3-dev-network-debug', '-lns3-dev-stats-debug', '-lns3-dev-core-debug', '-lrt']
/usr/bin/ld: test/test-tsearch.cc.50.o(.text+0x2c5): unresolvable R_X86_64_PLTOFF64 relocation against symbol `free@@GLIBC_2.2.5'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/home/teto/dce/build'
Build failed
-> task in 'bin_dce/test-tsearch' failed (exit status 1): 
    {task 140451678565520: cxxprogram test-tsearch.cc.50.o -> test-tsearch}
['g++', '-Wl,--no-as-needed', '-pthread', '-pie', '-lrt', '-rdynamic', 'test/test-tsearch.cc.50.o', '-o', '/home/teto/dce/build/bin_dce/test-tsearch', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Llib', '-ltest']

我承认我已经没有想法来解决这个问题。它在升级我的编译器时首先发生: gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)

更多信息: https://github.com/direct-code-execution/ns-3-dce/issues/46

以下是结果:./waf build -v https://transfer.sh/tj7uf/temp

https://transfer.sh/qE5Cd/link-step结果:

LD_DEBUG=all LANG=C /usr/bin/g++ -Wl,--no-as-needed -pthread -pie -lrt -rdynamic test/test-tsearch.cc.50.o -o /home/teto/dce/build/bin_dce/test-tsearch -Wl,-Bstatic -Wl,-Bdynamic -Llib -ltest -lc > link_step 2>&1

(搜索R_X86_64_PLTOFF64)

期待任何提示

干杯

0 个答案:

没有答案