axboe / fio

Flexible I/O Tester
GNU General Public License v2.0
5.2k stars 1.26k forks source link

compile error on architecture mips64el #1078

Closed junyuewang closed 4 years ago

junyuewang commented 4 years ago

I got an error on mips64el, it looks like it is trying to build for mips32. Is it possible to make it work for mips64el? Thanks!

[junyue@localhost fio]$ make
FIO_VERSION = fio-3.22-23-gdb83
    CC crc/crc16.o
/tmp/cc4wVYbQ.s: Assembler messages:
/tmp/cc4wVYbQ.s:42: error:opcode not supported on this processor: mips3 (mips3) `dext $2,$2,0,32'
make: *** [Makefile:447:crc/crc16.o] error 1

below is configuration result

[junyue@localhost fio]$ ./configure 
Operating system              Linux
CPU                           mips
Big endian                    no
Compiler                      gcc
Cross compile                 no

Static build                  no
Wordsize                      64
zlib                          yes
Linux AIO support             no
Linux AIO support rw flags    no
Linux AIO over io_uring       no
POSIX AIO support             yes
POSIX AIO support needs -lrt  yes
POSIX AIO fsync               yes
POSIX pshared support         yes
pthread_condattr_setclock()   yes
pthread_sigmask()             yes
Solaris AIO support           no
__sync_fetch_and_add          yes
__sync_synchronize            yes
__sync_val_compare_and_swap   yes
libverbs                      no
rdmacm                        no
asprintf()                    yes
vasprintf()                   yes
Linux fallocate               yes
POSIX fadvise                 yes
POSIX fallocate               yes
sched_setaffinity(3 arg)      yes
sched_setaffinity(2 arg)      no
clock_gettime                 yes
CLOCK_MONOTONIC               yes
CLOCK_MONOTONIC_RAW           yes
CLOCK_MONOTONIC_PRECISE       no
clockid_t                     yes
gettimeofday                  yes
fdatasync                     yes
pipe()                        yes
pipe2()                       yes
pread()                       yes
sync_file_range               yes
EXT4 move extent              yes
Linux splice(2)               yes
GUASI                         no
libnuma                       no
strsep                        yes
strcasestr                    yes
strlcat                       no
getopt_long_only()            yes
inet_aton                     yes
socklen_t                     yes
__thread                      yes
RUSAGE_THREAD                 yes
SCHED_IDLE                    yes
TCP_NODELAY                   yes
Net engine window_size        yes
TCP_MAXSEG                    yes
RLIMIT_MEMLOCK                yes
pwritev/preadv                yes
pwritev2/preadv2              yes
IPv6 helpers                  yes
http engine                   yes
Rados engine                  no
Rados Block Device engine     no
setvbuf                       yes
Gluster API engine            no
s390_z196_facilities          no
HDFS engine                   no
MTD                           yes
libpmem                       no
libpmem1_5                    no
libpmemblk                    no
PMDK pmemblk engine           no
PMDK dev-dax engine           no
PMDK libpmem engine           no
DDN's Infinite Memory Engine  no
iscsi engine                  no
NBD engine                    no
lex/yacc for arithmetic       no
getmntent                     yes
getmntinfo                    no
Static Assert                 yes
bool                          yes
strndup                       yes
Valgrind headers              no
Zoned block device support    yes
Zoned block device capacity   no
libzbc engine                 no
march_armv8_a_crc_crypto      no
cuda                          no
Build march=native            yes
CUnit                         no
__kernel_rwf_t                yes
-Wimplicit-fallthrough=2      yes
MADV_HUGEPAGE                 yes
gettid                        no
statx(2)/libc                 no
statx(2)/syscall              yes
Lib-based ioengines dynamic   no
TCMalloc support              no

and machine info:

[junyue@localhost fio]$ uname -a
Linux localhost.localdomain 5.4.38-1.fc28.lemote.mips64el #1 SMP PREEMPT Mon May 4 23:36:26 CST 2020 mips64 mips64 mips64 GNU/Linux
axboe commented 4 years ago

Really shouldn't be any arch dependencies there, the arch defines for mips are totally generic:

#define read_barrier()      __asm__ __volatile__("": : :"memory")
#define write_barrier()     __asm__ __volatile__("": : :"memory")
#define nop         __asm__ __volatile__("": : :"memory")

Are you sure this isn't a toolchain issue?

axboe commented 4 years ago

Does it work if you do:

$ make clean
$ ./configure --disable-optimizations
$ make
axboe commented 4 years ago

If that still fails, edit Makefile and remove the -march=native addition.

junyuewang commented 4 years ago
$ ./configure --disable-optimizations

worked, thanks a lot!