axboe / fio

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

t/io_uring.c failing to build on on armv7hl #923

Closed pterjan closed 4 years ago

pterjan commented 4 years ago
FIO_VERSION = fio-3.18
Running configure ...
Operating system              Linux
CPU                           arm
Big endian                    no
Compiler                      gcc
Cross compile                 no

Static build                  no
Wordsize                      32
zlib                          yes
Linux AIO support             yes
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()                   no
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                   no
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
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
march_armv8_a_crc_crypto      no
cuda                          no
Build march=native            yes
CUnit                         no
__kernel_rwf_t                yes
-Wimplicit-fallthrough        yes
MADV_HUGEPAGE                 yes
gettid                        yes
TCMalloc support              no

gcc -o t/io_uring.o -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement -g -ffast-math  -D_GNU_SOURCE -include config-host.h -Wimplicit-fallthrough -I. -I. -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -march=native -DBITS_PER_LONG=32 -DFIO_VERSION='"fio-3.18"' -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INTERNAL -DFIO_INC_DEBUG -c t/io_uring.c
t/io_uring.c: In function 'io_uring_register_buffers':
t/io_uring.c:103:17: error: '__NR_sys_io_uring_register' undeclared (first use in this function); did you mean 'SYS_io_uring_register'?
  103 |  return syscall(__NR_sys_io_uring_register, s->ring_fd,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 SYS_io_uring_register
t/io_uring.c:103:17: note: each undeclared identifier is reported only once for each function it appears in
t/io_uring.c: In function 'io_uring_register_files':
t/io_uring.c:120:17: error: '__NR_sys_io_uring_register' undeclared (first use in this function); did you mean 'SYS_io_uring_register'?
  120 |  return syscall(__NR_sys_io_uring_register, s->ring_fd,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 SYS_io_uring_register
t/io_uring.c: In function 'io_uring_setup':
t/io_uring.c:126:17: error: '__NR_sys_io_uring_setup' undeclared (first use in this function); did you mean 'SYS_io_uring_setup'?
  126 |  return syscall(__NR_sys_io_uring_setup, entries, p);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
      |                 SYS_io_uring_setup
t/io_uring.c: In function 'io_uring_enter':
t/io_uring.c:132:17: error: '__NR_sys_io_uring_enter' undeclared (first use in this function); did you mean 'SYS_io_uring_enter'?
  132 |  return syscall(__NR_sys_io_uring_enter, s->ring_fd, to_submit,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
      |                 SYS_io_uring_enter
t/io_uring.c:134:1: warning: control reaches end of non-void function [-Wreturn-type]
  134 | }
      | ^
t/io_uring.c: In function 'io_uring_setup':
t/io_uring.c:127:1: warning: control reaches end of non-void function [-Wreturn-type]
  127 | }
      | ^
t/io_uring.c: In function 'io_uring_register_buffers':
t/io_uring.c:105:1: warning: control reaches end of non-void function [-Wreturn-type]
  105 | }
      | ^
t/io_uring.c: In function 'io_uring_register_files':
t/io_uring.c:122:1: warning: control reaches end of non-void function [-Wreturn-type]
  122 | }
      | ^
make: *** [Makefile:386: t/io_uring.o] Error 1

I noticed arm doesn't set ARCH_HAVE_IOURING so is it expected for that test to be built?

axboe commented 4 years ago

Pushed a fix for this.

pterjan commented 4 years ago

Thanks for the impressively quick fix!