HewlettPackard / netperf

Netperf is a benchmark that can be used to measure the performance of many different types of networking. It provides tests for both unidirectional throughput, and end-to-end latency.
MIT License
849 stars 186 forks source link

Unable to compile netperf on centos 10 #81

Open yanglei-rh opened 1 month ago

yanglei-rh commented 1 month ago
# git clone https://github.com/HewlettPackard/netperf.git
Cloning into 'netperf'...
remote: Enumerating objects: 5252, done.
remote: Counting objects: 100% (324/324), done.
remote: Compressing objects: 100% (94/94), done.
remote: Total 5252 (delta 234), reused 305 (delta 229), pack-reused 4928
Receiving objects: 100% (5252/5252), 16.75 MiB | 1.55 MiB/s, done.
Resolving deltas: 100% (3930/3930), done.
# cd netperf/
# ./autogen.sh 
configure.ac:28: installing './compile'
configure.ac:19: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:19: You should use the 'AC_CONFIG_HEADERS' macro instead.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:745: AM_CONFIG_HEADER is expanded from...
configure.ac:19: the top level
configure.ac:34: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:34: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:34: the top level
configure.ac:37: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:37: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:37: the top level
configure.ac:44: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:44: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:44: the top level
configure.ac:46: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:46: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:46: the top level
configure.ac:47: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:47: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:47: the top level
configure.ac:52: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:52: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:52: the top level
configure.ac:60: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:60: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
acinclude.m4:45: OLD_TYPE_SOCKLEN_T is expanded from...
configure.ac:60: the top level
configure.ac:65: warning: The macro `AC_HEADER_TIME' is obsolete.
configure.ac:65: You should run autoupdate.
./lib/autoconf/headers.m4:743: AC_HEADER_TIME is expanded from...
configure.ac:65: the top level
configure.ac:67: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:67: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
src/missing/m4/salen.m4:19: AC_CHECK_SA_LEN is expanded from...
configure.ac:67: the top level
configure.ac:76: warning: The macro `AC_TYPE_SIGNAL' is obsolete.
configure.ac:76: You should run autoupdate.
./lib/autoconf/types.m4:776: AC_TYPE_SIGNAL is expanded from...
configure.ac:76: the top level
configure.ac:479: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:479: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:479: the top level
configure.ac:638: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:638: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:638: the top level
configure.ac:652: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:652: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:652: the top level
configure.ac:657: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:657: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:657: the top level
configure.ac:689: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:689: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:689: the top level
configure.ac:696: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:696: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:696: the top level
configure.ac:703: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:703: You should run autoupdate.
./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from...
configure.ac:703: the top level
# ./configure --bu# make
make  all-recursive
make[1]: Entering directory '/root/netperf-2.7.1'
Making all in src
make[2]: Entering directory '/root/netperf-2.7.1/src'
Making all in missing
make[3]: Entering directory '/root/netperf-2.7.1/src/missing'
Making all in m4
make[4]: Entering directory '/root/netperf-2.7.1/src/missing/m4'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/root/netperf-2.7.1/src/missing/m4'
make[4]: Entering directory '/root/netperf-2.7.1/src/missing'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/root/netperf-2.7.1/src/missing'
make[3]: Leaving directory '/root/netperf-2.7.1/src/missing'
make[3]: Entering directory '/root/netperf-2.7.1/src'
gcc -DHAVE_CONFIG_H -I. -I..      -MT netlib.o -MD -MP -MF .deps/netlib.Tpo -c -o netlib.o netlib.c
netlib.c: In function ‘bind_to_specific_processor’:
netlib.c:2343:9: error: implicit declaration of function ‘sched_setaffinity’; did you mean ‘SYS_sched_setaffinity’? [-Wimplicit-function-declaration]
 2343 |     if (sched_setaffinity(getpid(), len, &netperf_cpu_set)) {
      |         ^~~~~~~~~~~~~~~~~
      |         SYS_sched_setaffinity
make[3]: *** [Makefile:454: netlib.o] Error 1
make[3]: Leaving directory '/root/netperf-2.7.1/src'
make[2]: *** [Makefile:474: all-recursive] Error 1
make[2]: Leaving directory '/root/netperf-2.7.1/src'
make[1]: *** [Makefile:376: all-recursive] Error 1
make[1]: Leaving directory '/root/netperf-2.7.1'
make: *** [Makefile:315: all] Error 2
ild=x86_64
heywji commented 1 month ago

Hit this same issue