axboe / liburing

Library providing helpers for the Linux kernel io_uring support
MIT License
2.85k stars 402 forks source link

io_uring_prep_sock_cmd missing from release tag 2.5? #1013

Closed bgemmill closed 10 months ago

bgemmill commented 10 months ago

From a fresh git clone, configure, and make of version 2.5, on ubuntu 22.04, like this:

git clone --depth 1 --branch liburing-2.5 https://github.com/axboe/liburing.git
cd liburing
./configure
make

I get this error:

ld: error: version script assignment of 'LIBURING_2.5' to symbol 'io_uring_prep_sock_cmd' failed: symbol not defined

Thinking I must have done something wrong, I grepped the codebase for io_uring_prep_sock_cmd, and it only appears once, inside ./src/liburing-ffi.map here.

Should there be a function of that name for the map file to export?

There looks to be a function called io_uring_prep_cmd_sock where "cmd" and "sock" are flipped.

axboe commented 10 months ago

Ah yes, that looks like an error in the ffi, it should be io_uring_prep_cmd_sock()... I'll commit a fix.

axboe commented 10 months ago

Well that's a bit annoying, as the ffi name is actually what I would consider correct. If I change this, then it could break things. But perhaps it's early enough that we don't have to worry about it, probably better to just get it correct.

axboe commented 10 months ago

Since I can't go back in time and fix 2.5, you probably just want to use the 'master' branch right now. This will go out with the 2.6 release, but that's still a bit out.

bgemmill commented 10 months ago

Thanks for having a look at this one.

I'm not currently using io_uring_prep_sock_cmd in either name at the moment, is there a way to configure and make version 2.5 such that it builds, or are my choices version 2.4 (and wait for 2.6) or master?

axboe commented 10 months ago

You basically just have to make that one-line edit in src/liburing-ffi.map:

https://github.com/axboe/liburing/commit/92b21aa1b4ea98e322c5eca9db1d94b837f4be75

and then it should work just fine. But if you don't want to edit anything, yes the choices would be 2.4 or just run master. master is basically just a few additions (and mostly on the testing side), it'll be identical to 2.5 in terms of stability/maturity for programs. Hence that would be my recommendation.

bgemmill commented 10 months ago

Ok, thanks a lot.