netperf mips 移植

本文记录了在Linux主机上移植netperf到MIPS架构的过程。首先,从ftp.netperf.org下载netperf 2.6.0版本并解压,然后创建一个名为out的目录。在配置阶段遇到问题,通过设置config.cache解决cross compile的错误。最终,成功执行make和make install,将netperf和netserver二进制文件安装到out/bin目录下。

步骤

1. 在ftp://ftp.netperf.org/netperf/ 上下载2.6.0版本,解压
2. mkdir out
3. ./configure --host=mips-linux CC=/usr/local/mipsel-linux/usr/bin/mipsel-linux-gcc --prefix=`pwd`/out
会提示checking whether setpgrp takes no argument... configure: error: cannot check setpgrp when cross compiling
网上搜索的解决方法是, 先echo "ac_cv_func_setpgrp_void=yes" > config.cache, 再./configure --host=mips-linux CC=/usr/local/mipsel-linux/usr/bin/mipsel-linux-gcc --prefix=`pwd`/out --config-cache
4. make;makeinstall


完整log:

[xioliu@cn0512lnx02 gmac]$ cd netperf-2.6.0
[xioliu@cn0512lnx02 netperf-2.6.0]$ ls
acinclude.m4  config.sub    INSTALL        netperf.spec.in  README.solaris
aclocal.m4    configure     install-sh     NEWS             README.vmware
AUTHORS       configure.ac  m4             README           README.windows
autogen.sh    COPYING       Makefile.am    README.aix       Release_Notes
ChangeLog     depcomp       Makefile.in    README.hpux      src
config.guess  doc           missing        README.osx
config.h.in   inet_ntop.c   mkinstalldirs  README.ovms
[xioliu@cn0512lnx02 netperf-2.6.0]$ mkdir out
[xioliu@cn0512lnx02 netperf-2.6.0]$ ./configure --host=mips-linux CC=/usr/local/mipsel-linux/usr/bin/mipsel-linux-gcc --prefix=out
configure: error: expected an absolute directory name for --prefix: out
[xioliu@cn0512lnx02 netperf-2.6.0]$ ./configure --host=mips-linux CC=/usr/local/mipsel-linux/usr/bin/mipsel-linux-gcc --prefix=`pwd`/out
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 build system type... x86_64-unknown-linux-gnu
checking host system type... mips-unknown-linux-gnu
checking target system type... mips-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for mips-linux-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for mips-linux-gcc... /usr/local/mipsel-linux/usr/bin/mipsel-linux-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/local/mipsel-linux/usr/bin/mipsel-linux-gcc accepts -g... yes
checking for /usr/local/mipsel-linux/usr/bin/mipsel-linux-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /usr/local/mipsel-linux/usr/bin/mipsel-linux-gcc... gcc3
checking for mips-linux-ranlib... no
checking for ranlib... ranlib
configure: WARNING: using cross tools not prefixed with host triplet
checking for an ANSI C-conforming const... yes
checking for main in -lm... yes
checking how to run the C preprocessor... /usr/local/mipsel-linux/usr/bin/mipsel-linux-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking ifaddrs.h usability... no
checking ifaddrs.h presence... no
checking for ifaddrs.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking linux/tcp.h usability... yes
checking linux/tcp.h presence... yes
checking for linux/tcp.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/sctp.h usability... no
checking netinet/sctp.h presence... no
checking for netinet/sctp.h... no
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking syscall.h usability... yes
checking syscall.h presence... yes
checking for syscall.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/wait.h... (cached) yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking sys/sysinfo.h usability... yes
checking sys/sysinfo.h presence... yes
checking for sys/sysinfo.h... yes
checking for sys/wait.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking netinet/in_systm.h usability... yes
checking netinet/in_systm.h presence... yes
checking for netinet/i

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值