【问题描述】
在鲲鹏Linux系统编译iperf-2.0.4报unknown architecture of input file `Locale.o' is incompatible with aarch64 output错误(make编译前执行./configure --build=arm-linux --host=arm-linux),详细报错如下:
g++ -Wall -O2 -o iperf -O2 -pthread -DHAVE_CONFIG_H Client.o Extractor.o Launch.o List.o Listener.o Locale.o PerfSocket.o ReportCSV.o ReportDefault.o Reporter.o Server.o Settings.o SocketAddr.o gnu_getopt.o gnu_getopt_long.o main.o service.o sockets.o stdio.o tcp_window_size.o ../compat/libcompat.a
/usr/bin/ld: unknown architecture of input file `Locale.o' is incompatible with aarch64 output
/usr/bin/ld: unknown architecture of input file `service.o' is incompatible with aarch64 output
collect2: error: ld returned 1 exit status
make[2]: *** [iperf] Error 1
make[2]: Leaving directory `/home/test_software/iperf-2.0.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/test_software/iperf-2.0.4'
make: *** [all] Error 2

【解决方法】
1、执行如下命令,将src源码路径下的Locale.o和service.o重命名:
mv src/Locale.o src/Locale.o.bak
mv src/service.o src/service.o.bak
2、再次执行make编译即可编译成功;
【问题描述】
在鲲鹏Linux系统编译iperf-2.0.4报unknown architecture of input file `Locale.o' is incompatible with aarch64 output错误(make编译前执行./configure --build=arm-linux --host=arm-linux),详细报错如下:
g++ -Wall -O2 -o iperf -O2 -pthread -DHAVE_CONFIG_H Client.o Extractor.o Launch.o List.o Listener.o Locale.o PerfSocket.o ReportCSV.o ReportDefault.o Reporter.o Server.o Settings.o SocketAddr.o gnu_getopt.o gnu_getopt_long.o main.o service.o sockets.o stdio.o tcp_window_size.o ../compat/libcompat.a
/usr/bin/ld: unknown architecture of input file `Locale.o' is incompatible with aarch64 output
/usr/bin/ld: unknown architecture of input file `service.o' is incompatible with aarch64 output
collect2: error: ld returned 1 exit status
make[2]: *** [iperf] Error 1
make[2]: Leaving directory `/home/test_software/iperf-2.0.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/test_software/iperf-2.0.4'
make: *** [all] Error 2
【解决方法】
1、执行如下命令,将src源码路径下的Locale.o和service.o重命名:
mv src/Locale.o src/Locale.o.bak
mv src/service.o src/service.o.bak
2、再次执行make编译即可编译成功;