• iperf-2.0.9 在 Linux下的编译 与 海思平台的交叉编译


    iperf-2.0.9 可以用来测试网络带宽,网速等,需要了解具体功能的可以到网上查一下,它的官网是 https://iperf.fr/,安装包和源码可以从这个路径(https://iperf.fr/iperf-download.php)下载,本文使用的是 iPerf 2.0.9 版本。

    一、编译环境

    我这里使用的编译环境是 Ubuntu 14.04.5 LTS
    在这里插入图片描述
    使用的交叉编译器是 arm-hisiv100nptl-linux-gcc 4.4.1 的,如下:
    在这里插入图片描述

    二、在Ubuntu下编译步骤

    2.1 编译步骤

    在Ubuntu下的编译过程就下面几步,非常简单:解压、创建目标目录、指定编译选项、安装。

    tar zxvf iperf-2.0.9-source.tar.gz
    cd iperf-2.0.9
    mkdir result 
    ./configure --prefix=`pwd`/result --disable-shared --enable-static
    make && make install
    
    • 1
    • 2
    • 3
    • 4
    • 5

    编译选项说明
    --prefix=`pwd`/result :指定安装目录
    --disable-shared :禁止编译动态库
    --enable-static :使能编译动态库

    2.2 编译过程打印

    /home/samba/00_thirdLib/iperf# tar zxvf iperf-2.0.9-source.tar.gz
    iperf-2.0.9/
    iperf-2.0.9/config.guess
    iperf-2.0.9/missing
    ...
    ...省略无用打印
    iperf-2.0.9/INSTALL
    /home/samba/00_thirdLib/iperf# cd iperf-2.0.9
    /home/samba/00_thirdLib/iperf/iperf-2.0.9# mkdir result 
    /home/samba/00_thirdLib/iperf/iperf-2.0.9# ./configure --prefix=`pwd`/result --disable-shared --enable-static
    configure: WARNING: unrecognized options: --disable-shared, --enable-static
    checking for a BSD-compatible install... /usr/bin/install -c
    ...
    ...省略无用打印
    configure: WARNING: unrecognized options: --disable-shared, --enable-static
    /home/samba/00_thirdLib/iperf/iperf-2.0.9# make && make install
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16

    三、使用交叉编译器编译步骤

    3.1 编译步骤

    使用 arm-hisiv100nptl-linux-gcc 交叉编译工具编译的话,步骤和上面差不多,就是配置编译选项的步骤有点区别,步骤如下:

    tar zxvf iperf-2.0.9-source.tar.gz
    cd iperf-2.0.9
    mkdir result 
    CC=arm-hisiv100nptl-linux-gcc CXX=arm-hisiv100nptl-linux-g++ ./configure --build=i386-linux --host=arm-linux --target=arm-linux --disable-shared --enable-static --prefix="`pwd`/result"
    make && make install
    
    • 1
    • 2
    • 3
    • 4
    • 5

    以上就是编译 iperf-2.0.9 的全部过程了,这个程序在Linux下编译,总体还算顺利,之前编译 iperf 3.x.x 的还需要修改Makefile,不过工具的用法都差不多,因为急着用,就下载iperf-2.0.9 这个来使用,记录一下编译过程。

  • 相关阅读:
    Ubuntu 22.04上安装Anaconda,及 conda 的基础使用
    Pygame实现推箱子
    JAVA导出Excel文件
    复习一下dp动规
    【单元测试】--维护和改进单元测试
    我为什么会性格内向,能不能内向性格?
    pNA修饰肽:Z-FLE-pNA,Z-Phe-Leu-Glu-pNA,CAS号: 104634-10-8
    2022年全球高被引科学家公布
    使用 compose 的 Canvas 自定义绘制实现 LCD 显示数字效果
    MassTransit 入门(一)
  • 原文地址:https://blog.csdn.net/wkd_007/article/details/126063483