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

libaio does not export io_getevents #314

Open
tomtefan opened this issue May 12, 2019 · 3 comments
Open

libaio does not export io_getevents #314

tomtefan opened this issue May 12, 2019 · 3 comments

Comments

@tomtefan
Copy link

Hi

I'm seeing:
lvs: relocation error: lvs: symbol io_getevents version LIBAIO_0.4 not defined in file libaio.so.1 with link time reference

ld /lib64/libaio.so.1.0.1
ld: warning: cannot find entry symbol _start; not setting start address
ld: /lib64/libaio.so.1.0.1: undefined reference to `io_getevents'

libaio builds fine but lvm2 does not:
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-fs/lvm2-2.02.183/temp/lvm.ysMgri.ltrans2.ltrans.o: in function _async_wait': <artificial>:(.text+0x596): undefined reference to io_getevents'

Re-adding the lto workaround for libaio solves the problem.

@LowLeeWolf
Copy link

Can confirm this on my system also.

@InBetweenNames
Copy link
Owner

It looks like certain symbols aren't appearing in the final libaio.so if LTO is in use:

With LTO:

0000000000000000      D  *UND*  0000000000000000              io_getevents
0000000000000000  w   D  *UND*  0000000000000000              _ITM_registerTMCloneTable
0000000000000000  w   D  *UND*  0000000000000000              _ITM_deregisterTMCloneTable
0000000000000000  w   D  *UND*  0000000000000000              __gmon_start__
0000000000000740 g    DF .text  000000000000003b  LIBAIO_0.4  io_destroy
00000000000008e0 g    DF .text  000000000000006a  LIBAIO_0.1  io_queue_init
00000000000008a0 g    DF .text  000000000000003b  LIBAIO_0.1  io_queue_release
00000000000007e0 g    DF .text  000000000000004f  LIBAIO_0.1  io_submit
0000000000000780 g    DF .text  000000000000004e  LIBAIO_0.4  io_setup
0000000000000840 g    DF .text  0000000000000059  LIBAIO_0.1  io_queue_run
0000000000000000 g    DO *ABS*  0000000000000000  LIBAIO_0.1  LIBAIO_0.1
0000000000000000 g    DO *ABS*  0000000000000000  LIBAIO_0.4  LIBAIO_0.4

Without:

0000000000000b60 g    DF .text  000000000000003b  LIBAIO_0.4  io_destroy
0000000000000aa0 g    DF .text  000000000000004f  LIBAIO_0.4  io_cancel
0000000000000bc0 g    DF .text  0000000000000029 (LIBAIO_0.1) io_queue_wait
0000000000000880 g    DF .text  000000000000000f  LIBAIO_0.4  io_queue_wait
0000000000000ba0 g    DF .text  0000000000000012 (LIBAIO_0.1) io_cancel
0000000000000840 g    DF .text  000000000000001e  LIBAIO_0.1  io_queue_init
0000000000000c00 g    DF .text  0000000000000034 (LIBAIO_0.1) io_getevents
0000000000000980 g    DF .text  00000000000000a3  LIBAIO_0.4  io_getevents
0000000000000860 g    DF .text  0000000000000006  LIBAIO_0.1  io_queue_release
0000000000000b00 g    DF .text  000000000000004e  LIBAIO_0.4  io_setup
0000000000000a40 g    DF .text  000000000000004f  LIBAIO_0.1  io_submit
00000000000008a0 g    DF .text  0000000000000059  LIBAIO_0.1  io_queue_run
0000000000000000 g    DO *ABS*  0000000000000000  LIBAIO_0.1  LIBAIO_0.1
0000000000000000 g    DO *ABS*  0000000000000000  LIBAIO_0.4  LIBAIO_0.4

I'll re-add the workaround with a comment linking this issue

InBetweenNames added a commit that referenced this issue May 13, 2019
Reference #314

Signed-off-by: Shane Peelar <[email protected]>
@pchome
Copy link
Contributor

pchome commented Dec 30, 2019

#459
With LTO and patched symver attribute:

0000000000001620 g    DF .text  0000000000000039  LIBAIO_0.1  io_queue_release
0000000000001380 g    DF .text  0000000000000039  LIBAIO_0.4  io_destroy
00000000000011c0 g    DF .text  000000000000004c (LIBAIO_0.1) io_queue_wait
0000000000001600 g    DF .text  000000000000000e  LIBAIO_0.4  io_queue_wait
0000000000001580 g    DF .text  0000000000000075  LIBAIO_0.1  io_queue_run
0000000000001420 g    DF .text  000000000000004d  LIBAIO_0.4  io_cancel
0000000000001180 g    DF .text  0000000000000036 (LIBAIO_0.1) io_cancel
0000000000001280 g    DF .text  00000000000000e3  LIBAIO_0.5  io_pgetevents
0000000000000000 g    DO *ABS*  0000000000000000  LIBAIO_0.1  LIBAIO_0.1
0000000000001660 g    DF .text  0000000000000062  LIBAIO_0.1  io_queue_init
0000000000000000 g    DO *ABS*  0000000000000000  LIBAIO_0.4  LIBAIO_0.4
0000000000000000 g    DO *ABS*  0000000000000000  LIBAIO_0.5  LIBAIO_0.5
00000000000013c0 g    DF .text  000000000000004c  LIBAIO_0.4  io_setup
00000000000014e0 g    DF .text  000000000000009c  LIBAIO_0.4  io_getevents
0000000000001220 g    DF .text  0000000000000057 (LIBAIO_0.1) io_getevents
0000000000001480 g    DF .text  000000000000004d  LIBAIO_0.1  io_submit

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

4 participants