[root@zsc65 example]# ../waf --run dce-iperf Waf: Entering directory `/mnt/n/dce/source/ns-3-dce/build' [ 11/398] lib/pkgconfig/libns3-dev-netlink-debug.pc: -> ../build/lib/pkgconfig/libns3-dev-netlink-debug.pc [116/398] lib/pkgconfig/libns3-dev-dce-debug.pc: -> ../build/lib/pkgconfig/libns3-dev-dce-debug.pc [119/398] lib/pkgconfig/libns3-dev-dce-quagga-debug.pc: -> ../build/myscripts/ns-3-dce-quagga/lib/pkgconfig/libns3-dev-dce-quagga-debug.pc Waf: Leaving directory `/mnt/n/dce/source/ns-3-dce/build' 'build' finished successfully (0.760s) 0.6s ElfCache:Add(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/libc-ns3.so) 0.6s ElfCache:CopyFile(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/libc-ns3.so, elf-cache/0/libc-ns3.so) 0.6s ElfCache:CopyFile(): copied /mnt/n/dce/source/ns-3-dce/build/lib/libc-ns3.so to elf-cache/0/libc-ns3.so 0.6s ElfCache:EditFile(0x7f73fb68cd80, elf-cache/0/libc-ns3.so) 0.6s ElfCache:WriteString(): wrote 0001.so.6 0.6s ElfCache:Add(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/libc-ns3.so) 0.6s ElfCache:Add(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/libpthread-ns3.so) 0.6s ElfCache:CopyFile(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/libpthread-ns3.so, elf-cache/0/libpthread-ns3.so) 0.6s ElfCache:CopyFile(): copied /mnt/n/dce/source/ns-3-dce/build/lib/libpthread-ns3.so to elf-cache/0/libpthread-ns3.so 0.6s ElfCache:EditFile(0x7f73fb68cd80, elf-cache/0/libpthread-ns3.so) 0.6s ElfCache:WriteString(): wrote 0002thread.so.0 0.6s ElfCache:Add(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/libpthread-ns3.so) 0.6s ElfCache:Add(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/librt-ns3.so) 0.6s ElfCache:CopyFile(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/librt-ns3.so, elf-cache/0/librt-ns3.so) 0.6s ElfCache:CopyFile(): copied /mnt/n/dce/source/ns-3-dce/build/lib/librt-ns3.so to elf-cache/0/librt-ns3.so 0.6s ElfCache:EditFile(0x7f73fb68cd80, elf-cache/0/librt-ns3.so) 0.6s ElfCache:WriteString(): wrote 0003t.so.1 0.6s ElfCache:Add(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/librt-ns3.so) 0.6s ElfCache:Add(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/libm-ns3.so) 0.6s ElfCache:CopyFile(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/libm-ns3.so, elf-cache/0/libm-ns3.so) 0.6s ElfCache:CopyFile(): copied /mnt/n/dce/source/ns-3-dce/build/lib/libm-ns3.so to elf-cache/0/libm-ns3.so 0.6s ElfCache:EditFile(0x7f73fb68cd80, elf-cache/0/libm-ns3.so) 0.6s ElfCache:WriteString(): wrote 0004.so.6 0.6s ElfCache:Add(0x7f73fb68cd80, /mnt/n/dce/source/ns-3-dce/build/lib/libm-ns3.so) 0.6s ElfCache:Add(0x7f73fb68cd80, /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../libgcc_s.so.1) 0.6s ElfCache:CopyFile(0x7f73fb68cd80, /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../libgcc_s.so.1, elf-cache/0/libgcc_s.so.1) 0.6s ElfCache:CopyFile(): copied /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../libgcc_s.so.1 to elf-cache/0/libgcc_s.so.1 0.6s ElfCache:EditFile(0x7f73fb68cd80, elf-cache/0/libgcc_s.so.1) 0.6s ElfCache:GetBaseAddress(): Could not find base address. assert failed. cond="pt_load_rw != 0", file=../model/elf-cache.cc, line=188 terminate called without an active exception Command ['/mnt/n/dce/source/ns-3-dce/build/bin/dce-iperf'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
这个错误表示libgcc_s.so的处理不对。
我在编译ns3的时候,最初使用了gcc 4.4.6,后来升级到gcc 4.8.2,但没有重编。
我在另一机器上先升了gcc4.8.2,再编的就没这个问题。
估计原因:使用老版本的gcc编译出来的elf-cache,用它找libgcc_s.so的base address出错。但重编后发现还有问题,采取下面的办法解决的。
解决办法:
[root@zsc65 example]# ls -l /usr/local/lib/libgcc_s.so.1
-rw-r--r-- 1 root root 450791 Jun 20 01:01 /usr/local/lib/libgcc_s.so.1
[root@zsc65 example]# cd /usr/local/lib
[root@zsc65 lib]# cp libgcc_s.so
libgcc_s.so libgcc_s.so.1
[root@zsc65 lib]# cp libgcc_s.so.1 libgcc_s.so.1.bak
[root@zsc65 lib]# cp /usr/local/lib64/libgc
libgcc_s.so libgcj_bc.so.1 libgcj.so libgcj-tools.la libgcj-tools.so.14.0.0
libgcc_s.so.1 libgcj_bc.so.1.0.0 libgcj.so.14 libgcj-tools.so
libgcj_bc.so libgcj.la libgcj.so.14.0.0 libgcj-tools.so.14
[root@zsc65 lib]# cp /usr/local/lib64/libgcc_s.so.1 .
cp: overwrite `./libgcc_s.so.1'? y