netperf-2.7.0 交叉编译

1. Windows 端netperf 2.7.0下载地址

因为测试会用到Windows端的二进制,mark一下:
Netperf windows端二进制下载地址

2. 下载源码

lyl@dell:~/meari_work/third_party_lib$ git clone https://github.com/HewlettPackard/netperf.git
lyl@dell:~/meari_work/third_party_lib$ 
lyl@dell:~/meari_work/third_party_lib$ cd netperf/
lyl@dell:~/meari_work/third_party_lib/netperf (master)$ git checkout -b netperf-27 netperf-2.7.0 //回滚到指定的tag
切换到一个新分支 'netperf-27'
lyl@dell:~/meari_work/third_party_lib/netperf (netperf-27)$ 

3. 交叉编译安装

./configure CC=arm-anykav500-linux-uclibcgnueabi-gcc --host=arm-linux --prefix=/home/lyl/install/arm-anykav500-linux-uclibcgnueabi-gcc/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

原因:
由于在语句中判断ac_cv_func_setpgrp_void是否设置,如果没有设置必然会报错。
有两种解决方法:

  1. 2.4.0以及之前版本,直接注释掉configure 中cannot check setpgrp when cross compiling的下一行{ (exit 1); exit 1; };即可
  2. 2.5.0以及之后就没有这一行了,需要手动设置echo “ac_cv_func_setpgrp_void=yes” > config.cache
然后,继续运行
./configure CC=arm-anykav500-linux-uclibcgnueabi-gcc --host=arm-linux --prefix=/home/lyl/install/arm-anykav500-linux-uclibcgnueabi-gcc/netperf  --config-cache //(注意这里有一个--config-cache选项,对应方法二)

configure成功执行,但是make又报错:
makeinfo: command not found
解决方法:
sudo apt-get install texinfo

make install
大功告成!

4. 其他

windows端执行 netserver(2.7.0),设备端上使用2.5.0的netperf会卡住,换成2.7.0就OK了。 mark一下

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值