Summary: | app-crypt/tpm2-abrmd-2.4.1-r1 fails tests (lto): <artificial>:(.text+0x4c6): undefined reference to __wrap_set_logger | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Christopher Byrne <salah.coronya> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | proxy-maint |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/27482 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 618550 | ||
Attachments: | build.log |
Description
Agostino Sarubbo
2022-08-15 18:26:45 UTC
Created attachment 799773 [details]
build.log
build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: <artificial>:(.text+0x175): undefined reference to `__wrap_tcti_tabrmd_call_cancel_sync' <artificial>:(.text+0x25a): undefined reference to `__wrap_tcti_tabrmd_call_set_locality_sync' <artificial>:(.text+0x4c6): undefined reference to `__wrap_set_logger' <artificial>:(.text+0xf03): undefined reference to `__wrap_tcti_tabrmd_proxy_new_for_bus_sync' collect2: error: ld returned 1 exit status Well, this one's complicated. It appears to be an interaction between cmocka (used in tests), gcc and ld.bfd (the problem is even worse under ld,gold). clang/ld.lld is not affected and compiles file (but clang/ld.bfd is) I have a feeling that any program uses gcc/ld.bfd/cmocka is going to run into this problem. filter-lto does not work src_test with autotools at least, and I'm not sure what the best option is going forward. How did you try to use "filter-flto"? I imagine you have to use it in src_configure, "if use test;" and remember to inherit flag-o-matic.eclass. Something like "use test && filter-lto" in src_compile would work, but it would have the undesirable side effect of disabling LTO on the whole package, when only the tests need it disabled. Sounds totally fine to me. Doubt many regular users have tests turned on for ebuilds. (In reply to Joonas Niilola from comment #6) > Sounds totally fine to me. Doubt many regular users have tests turned on for > ebuilds. The issue is that you then have no idea if LTO is breaking something at runtime. Just filter lto unconditionally until tests work and add a comment saying such. (In reply to Sam James from comment #7) > > The issue is that you then have no idea if LTO is breaking something at > runtime. ... isn't that the default presumption when lto is turned on? :) but yeah don't mind turning it completely off either, that's probably the simplest and surest option here. (In reply to Joonas Niilola from comment #8) > (In reply to Sam James from comment #7) > > > > The issue is that you then have no idea if LTO is breaking something at > > runtime. > > ... isn't that the default presumption when lto is turned on? :) but yeah > don't mind turning it completely off either, that's probably the simplest > and surest option here. The whole idea of this work is to try find things which are likely to be broken at runtime and prevent it. If we have the tests failing with LTO for any reason, then we have to assume it's not safe. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b37aeca1bcdac3de7c1be1229ad0960c9be88b83 commit b37aeca1bcdac3de7c1be1229ad0960c9be88b83 Author: Christopher Byrne <salah.coronya@gmail.com> AuthorDate: 2022-09-26 21:08:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-27 21:42:35 +0000 app-crypt/tpm2-abrmd: Filter out LTO flags due test failures Closes: https://bugs.gentoo.org/865275 Signed-off-by: Christopher Byrne <salah.coronya@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> app-crypt/tpm2-abrmd/tpm2-abrmd-2.4.1-r1.ebuild | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) |