0
votes

I'm trying to install netperf 2.7.0 in a VM running Ubuntu 18.04. Since the version installed using apt-get is 2.6.0, I had to download the TAR file from https://github.com/HewlettPackard/netperf/releases and go thru the install/compilation process

The installation is very straightforward if compiled with no parameters: ./configure

In that case the installation is successfull.

However, I'm installing netperf to run with flent for bandwidth benchmarking, so netperf needs to be compiled with the --enable-demo option.

So, when I type ./configure --enable-demo, all seems to be ok

$make also looks fine but at the end shows some errors:

Makefile:304: recipe for target 'netperf' failed make[3]: * [netperf] Error 1 make[3]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src' Makefile:352: recipe for target 'all-recursive' failed make[2]: [all-recursive] Error 1 make[2]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src' Makefile:277: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0' Makefile:215: recipe for target 'all' failed make: [all] Error 2 collect2: error: ld returned 1 exit status Makefile:304: recipe for target 'netperf' failed make[3]: [netperf] Error 1 make[3]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src' Makefile:352: recipe for target 'all-recursive' failed make[2]: [all-recursive] Error 1 make[2]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src' Makefile:277: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0' Makefile:215: recipe for target 'all' failed make: * [all] Error 2

Finally $make install shows the following output:

Making install in src make[1]: Entering directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src' Making install in missing make[2]: Entering directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src/missing' Making install in m4 make[3]: Entering directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src/missing/m4' make[4]: Entering directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src/missing/m4' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src/missing/m4' make[3]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src/missing/m4' make[3]: Entering directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src/missing' make[4]: Entering directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src/missing' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src/missing' make[3]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src/missing' make[2]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src/missing' make[2]: Entering directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src' gcc -o netperf netperf.o netlib.o netsh.o nettest_bsd.o nettest_dlpi.o nettest_unix.o nettest_xti.o nettest_sctp.o nettest_sdp.o nettest_omni.o net_uuid.o dscp.o netcpu_procstat.o -lm netlib.o: In function demo_interval_final': netlib.c:(.text+0x43db): undefined reference todemo_interval_display' netlib.o: In function demo_stream_interval': netlib.c:(.text+0x4401): undefined reference todemo_interval_tick' netlib.o: In function demo_rr_interval': netlib.c:(.text+0x4477): undefined reference todemo_interval_tick' nettest_omni.o: In function send_omni_inner': nettest_omni.c:(.text+0x99ec): undefined reference todemo_interval_tick' nettest_omni.c:(.text+0x9a03): undefined reference to demo_interval_tick' nettest_omni.c:(.text+0x9a2c): undefined reference todemo_interval_tick' nettest_omni.o:nettest_omni.c:(.text+0x9a3b): more undefined references to `demo_interval_tick' follow collect2: error: ld returned 1 exit status Makefile:304: recipe for target 'netperf' failed make[2]: * [netperf] Error 1 make[2]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src' Makefile:352: recipe for target 'install-recursive' failed make[1]: * [install-recursive] Error 1 make[1]: Leaving directory '/home/administrator/Downloads/netperf-netperf-2.7.0/src' Makefile:277: recipe for target 'install-recursive' failed make: *** [install-recursive] Error 1

When I verify if netperf was installed I get no answer:

bash: /usr/local/bin/netperf: No such file or directory

So, the files netperf and netderver are missing after the installation.

To sum up, the installation fails when the "enable-demo" is used during compilation.

Am I missing something? I'd appreciate any clue on this issue.

Thank you.

1

1 Answers

0
votes

netlib.c:(.text+0x4401): undefined reference to demo_interval_tick'

nettest_omni.c:(.text+0x99ec): undefined reference to demo_interval_tick'

The files are 5 years old: sudo apt install g++-4.8

cd netperf-netperf-2.7.0/
export CC=gcc-4.8 CXX=g++-4.8 && ./configure --enable-demo
make
sudo make install    // No errors