At Sun, 21 Dec 2014 06:21:23 -0800 (PST),
Michaël wrote:
>
> [1 <multipart/alternative (7bit)>]
> [1.1 <text/plain; UTF-8 (7bit)>]
> Hi,
>
> I think the commands are the same as for iperf2
>
> ./configure; make; make install
>
> But since iperf3 changed a lot in comparison to iperf2 (totally different
> directory structure for example), the iperf2 dce patch cannot be reused and
> has will be totally different as well. Instead of 6 Makefiles for example,
> there are only 3 now. The code fix for dce (adding 'sleep(1)' to
> compat/Thread.c can also not be reused since the compat folder does no
> longer exist, and neither does the Thread.c file or SwitchToThread()
> method.
>
> When i simply try to change the CFLAGS and LDFLAGS in the 3 Makefiles (like
> in the patch file for iperf2 or mentioned in the link I gave in my first
> email), I get the following error:
>
> /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
I tried iperf3 build and found that 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 ;)
> Iperf3 builds both a executable and shared library. Using the flags
> --disable-shared, --disable-static also don't seem to help. Using the
> shared library in iperf gives the error 'No main method found in executable
> file .../iperf3'
then I can launch a script with iperf3, but got an error
like this.
% LD_LIBRARY_PATH=../iperf-3.0.10/src/.libs ./waf --run dce-iperf3
relocation error: elf-cache/0/libiperf.so.0: symbol
__h_errno_location, version GLIBC_2.2.5 not defined in file
0002.so.6 with link time reference
We may need to add the missing symbol (__h_errno_location).
for your information at the moment.
-- Hajime