0

我一直在尝试编译直接代码执行(DCE)——网络模拟器 ns-3 的扩展,它可以通过提供假 POSIX 层在模拟器中运行真实程序(VLC、iperf)——自从我升级到 ubuntu 后没有成功谢尼尔。要编译 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)

期待任何提示

干杯

4

0 回答 0