【问题描述】
在openEuler 22.03 LTS系统上编译fio 3.3版本报multiple definition of `tsc_reliable'; 错误,详细报错如下:
# make CFLAGS=-fcommon
LINK t/fio-dedupe
/usr/bin/ld: t/arch.o:/root/fio/package/fio-3.3/t/arch.c:4: multiple definition of `tsc_reliable'; gettime.o:/root/fio/package/fio-3.3/gettime.c:31: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:449: t/fio-dedupe] Error 1

【解决方法】
修改fio源码路径下的t/arch.c,将第4行bool tsc_reliable;改为extern bool tsc_reliable;

再次执行make&&make install编译即可。
【问题描述】
在openEuler 22.03 LTS系统上编译fio 3.3版本报multiple definition of `tsc_reliable'; 错误,详细报错如下:
# make CFLAGS=-fcommon
LINK t/fio-dedupe
/usr/bin/ld: t/arch.o:/root/fio/package/fio-3.3/t/arch.c:4: multiple definition of `tsc_reliable'; gettime.o:/root/fio/package/fio-3.3/gettime.c:31: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:449: t/fio-dedupe] Error 1
【解决方法】
修改fio源码路径下的t/arch.c,将第4行bool tsc_reliable;改为extern bool tsc_reliable;
再次执行make&&make install编译即可。