1. 下载
svn checkout http://www.netperf.org/svn/netperf2 netperf2
svn checkout http://www.netperf.org/svn/netperf4 netperf4
主要参考
2. 编译
root@zanget:~# cd netperf4/trunk root@zanget:trunk#./configure CC=arm-linux-gcc --host=arm-linux --prefix=/opt/s3c-2416/rootfs/custom/netperf configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used.
//…
checking for sched_setaffinity... yes checking for pkg-config... /usr/bin/pkg-config checking for GLIB - version >= 2.6.0... no *** Could not run GLIB test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GLIB is incorrectly installed. configure: error: *** GLIB >= 2.6 is required to build netperf4; please make sure you have *** the development headers installed. The latest version of GLIB is *** always available at ftp://ftp.gnome.org/pub/gnome/sources/glib/. |
搜索无果,切换为netperf2
root@zanget:~# cd netperf2/trunk root@zanget:trunk# ./configure CC=arm-linux-gcc --host=arm-linux --prefix=/opt/s3c-2416/rootfs/custom/netperf
//…
checking types of arguments for select... int,fd_set *,struct timeval * checking whether setpgrp takes no argument... configure: error: cannot check setpgrp when cross compiling |
参考文章,打开configure搜索ac_cv_func_setpgrp_void,删掉行7220:
{ echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6; }
if test "${ac_cv_func_setpgrp_void+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
{ { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
{ (exit 1); exit 1; };
}
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
root@zanget:trunk# make && make install |
成功编译、安装后,就可到/opt/s3c-2416/rootfs/custom/netperf下找到相关文件了。之后只需要将他发布到板子上即可。