【问题描述】
netperf编译安装multiple definition of `loc_nodelay'错误,详细报错如下:
/usr/bin/ld: nettest_omni.o:(.bss 0x208): multiple definition of `loc_nodelay'; nettest_bsd.o:(.bss 0x20): first defined here
/usr/bin/ld: nettest_omni.o:(.bss 0x20c): multiple definition of `rem_nodelay'; nettest_bsd.o:(.bss 0x24): first defined here
/usr/bin/ld: nettest_omni.o:(.bss 0x210): multiple definition of `loc_sndavoid'; nettest_bsd.o:(.bss 0x30): first defined here
/usr/bin/ld: nettest_omni.o:(.bss 0x214): multiple definition of `loc_rcvavoid'; nettest_bsd.o:(.bss 0x34): first defined here
/usr/bin/ld: nettest_omni.o:(.bss 0x218): multiple definition of `rem_sndavoid'; nettest_bsd.o:(.bss 0x38): first defined here
/usr/bin/ld: nettest_omni.o:(.bss 0x21c): multiple definition of `rem_rcvavoid'; nettest_bsd.o:(.bss 0x3c): first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [makefile:305: netperf] error 1
make[3]: leaving directory '/home/os-base-test/netperf-2.7.0/netperf-netperf-2.7.0/src'
make[2]: *** [makefile:352: all-recursive] error 1
make[2]: leaving directory '/home/os-base-test/netperf-2.7.0/netperf-netperf-2.7.0/src'
make[1]: *** [makefile:277: all-recursive] error 1
make[1]: leaving directory '/home/os-base-test/netperf-2.7.0/netperf-netperf-2.7.0'
make: *** [makefile:215: all] error 2
error: excute "make" failed, please check it.
【解决方法】
1、先执行make clean
2、执行make cflags=-fcommon编译(针对gcc 10以上版本)
感谢分享
感谢分享
感谢分享