Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implicit declaration of function ‘io_uring_register_iowq_max_workers’ #147

Closed
danie-dejager opened this issue Nov 8, 2024 · 1 comment

Comments

@danie-dejager
Copy link

danie-dejager commented Nov 8, 2024

When compiling bfs with liburing 2.0 enabled on Amazon Linux 2023 I get the following failure:

src/ioq.c: In function ‘ioq_ring_init’:
src/ioq.c:886:9: error: implicit declaration of function ‘io_uring_register_iowq_max_workers’ [-Werror=implicit-function-declaration]
  886 |         io_uring_register_iowq_max_workers(&thread->ring, values);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Is my version of liburing too old to be used by bfs?

Attached:
config.log

Versions:
gcc (GCC) 11.4.1
GNU Make 4.3
liburing 2.0

Configure output:
[ GEN] gen/vars.mk
[ CC ] build/empty.c ✔
[ CC ] flags/Wmissing-var-decls.c ✘
[ CC ] flags/Wimplicit-fallthrough.c ✔
[ CC ] flags/Wimplicit.c ✔
[ CC ] flags/Wformat.c ✔
[ CC ] flags/Wmissing-decls.c ✔
[ CC ] flags/Wundef-prefix.c ✘
[ CC ] flags/Wshadow.c ✔
[ CC ] flags/Wsign-compare.c ✔
[ CC ] flags/Wstrict-prototypes.c ✔
[ CC ] flags/bind-now.c ✔
[ CC ] flags/deps.c ✔
[ GEN] gen/flags.mk
[ CC ] with/libcap.c ✔
[ CC ] with/liburing.c ✔
[ CC ] with/oniguruma.c ✔
[ CC ] with/libselinux.c ✔
[ CC ] with/libacl.c ✔
[ GEN] gen/pkgs.mk
[ CC ] has/--st-birthtim.c ✘
[ CC ] has/acl-is-trivial-np.c ✘
[ CC ] has/_Fork.c ✔
[ CC ] has/acl-get-tag-type.c ✔
[ CC ] has/acl-get-entry.c ✔
[ CC ] has/acl-get-file.c ✔
[ CC ] has/builtin-riscv-pause.c ✘
[ CC ] has/acl-trivial.c ✘
[ CC ] has/extattr-get-file.c ✘
[ CC ] has/extattr-get-link.c ✘
[ CC ] has/aligned-alloc.c ✔
[ CC ] has/extattr-list-file.c ✘
[ CC ] has/extattr-list-link.c ✘
[ CC ] has/confstr.c ✔
[ CC ] has/fdclosedir.c ✘
[ CC ] has/getdents.c ✘
[ CC ] has/getmntent-2.c ✘
[ CC ] has/getmntinfo.c ✘
[ CC ] has/getdents64.c ✔
[ CC ] has/getdents64-syscall.c ✔
[ CC ] has/getmntent-1.c ✔
[ CC ] has/getprogname.c ✘
[ CC ] has/posix-getdents.c ✘
[ CC ] has/getprogname-gnu.c ✔
[ CC ] has/pipe2.c ✔
[ CC ] has/posix-spawn-addfchdir.c ✘
[ CC ] has/st-acmtimespec.c ✘
[ CC ] has/posix-spawn-addfchdir-np.c ✔
[ CC ] has/st-birthtim.c ✘
[ CC ] has/st-birthtimespec.c ✘
[ CC ] has/st-acmtim.c ✔
[ CC ] has/st-flags.c ✘
[ CC ] has/strerror-r-posix.c ✘
[ CC ] has/statx.c ✔
[ CC ] has/strerror-r-gnu.c ✔
[ CC ] has/statx-syscall.c ✔
[ CC ] has/strerror-l.c ✔
[ CC ] has/string-to-flags.c ✘
[ CC ] has/tcgetwinsize.c ✘
[ CC ] has/strtofflags.c ✘
[ CC ] has/timer-create.c ✔
[ CC ] has/timegm.c ✔
[ CC ] has/tm-gmtoff.c ✔
[ CC ] has/uselocale.c ✔
[ GEN] gen/config.h
[ GEN] gen/config.mk

@tavianator
Copy link
Owner

It looks like io_uring_register_iowq_max_workers() was added in liburing 2.1. But liburing apparently didn't even provide a macro for the version number until 2.4. I could add something like

#ifdef IO_URING_CHECK_VERSION
#  if IO_URING_CHECK_VERSION(2, 1)
io_uring_register_iowq_max_workers(&thread->ring, values);
#  endif
#endif

but it would unnecessarily disable it on liburing 2.1-2.3.

Or I could add a ./configure test for it, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants