NS-3 dce and iperf3

451 views Asked by At

In NS-3 DCE (Network simulator 3 Direct Code Exectution), with NS-3 version 3.21 and dce version 1.4, one of the included binaries by default is iperf. This version of iperf is 2.0.5 however, and the newest version of iperf is 3.0.10. Since iperf3 is not backwards compatible with iperf2, and iperf3 offers some interesting new features, it would be very helpful if I could use iperf3 with NS-3 dce.

As is explained on the following link: http://www.nsnam.org/docs/dce/release/1.1/manual/html/dce-user-newapps.html there are certain requirements (like flags in the makefile) that have to be adjusted to generate a binary that can be used by dce.

I can't get it to work however. I tried changing all 3 Makefiles that came with iperf3 (-fpic CFLAG and -pie -rdynmic LDFLAGS), but I'm still getting an error when I'm trying to build it:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/gcrt1.o : relocation R_X86_64_32S against '__libc_csu_fini' can not be used when making a shared object: recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/gcrt1.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [iperf3_profile] Error 1
make[2]: Leaving directory 

Does anyone know what to do?

Any help is really appreciated!

1

There are 1 answers

0
Trần Việt Hoàng On

You can follow this guide to build iperf3 with libOS:

... the above error is due to bad compatibility between gcc profile option ('-pg') and PIC option.

because the main binary (iperf3) was built even with this error, you can see the iperf3 binary at (top)/src/.libs/iperf3.

disabling the build for iperf3_profile seems to be required for DCE build. patches are welcome ;)

However, currently you cannot run iperf3 due to missing symbol (__h_errno_location). This can be fixed by a patch of teto.